[odb-users] libodb with cmake
Boris Kolpackov
boris at codesynthesis.com
Fri Feb 20 07:39:18 EST 2015
Hi Alex,
Alex Beimler <beimler at jaeschke.de> writes:
> Is there a option to setup the build-dir for the obj-Files?
This is a standard autotools build system. You can build out-of-tree.
> My application links:
> g++ ... -std=c++14 ... -g -Wall .......cpp.o ... ...-odb.cxx.o ...
> -o application ... libodb.a libodb-sqlite.a
When linking statically, the order in which you list libraries is
important. You need to go from the most specific to the most
generic. So it should be libodb-sqlite.a libodb.a.
Note also that you can disable building of shared/static libraries
with the --disable-shared/--disable-static configure options.
Finally, for completeness, if you have both shared and static
libraries, then the linker will prefer the shared. To change
this, you can use the -Wl,-Bstatic and -Wl,-Bdynamic options
on the g++ command line, e.g.,
g++ ... -Wl,-Bstatic -lodb-sqlite -lodb -Wl,-Bdynamic ...
Boris
More information about the odb-users
mailing list