Page 1 of 1

Compile [C++] example on command line

Posted: Tue Jul 19, 2016 6:01 pm
by solven
There is a fine example on the following page which we would like to compile and run from the command-line on Ubuntu 14:
https://wiki.openoffice.org/wiki/Docume ... onnections

We've installed the SDK, run the setsdkenv script and now would like to compile on the command line like g++ main.cpp (where main.cpp contains the sample code). This however throws many errors (e.g. in the /usr/include/sal/*.h file). Is there a straightfoward way to do this? (E.g., are we missing a library?)

Re: Compile [C++] example on command line

Posted: Fri Jul 22, 2016 10:50 am
by hanya
Welcom to the forum.

You have to pass some flags to your compiler. See Makefile in the SDK examples and sdk/settings direcotry.