Page 1 of 1

Static link to POCO libraries

Posted: Thu Jan 15, 2015 1:40 am
by shanep
Hello All,

I am having a hard time trying to figure out how to static link the POCO libraries I have. I have included the needed lib*.a files in the project settings -> linker section.

When I try to run the application, I get an "error while loading shared libraries: libPocoFoundation.so.30: cannot open shared object file" message.

Any help would be appreciated!!
Thanks!

Output from build:

Code: Select all

/bin/sh -c '/usr/bin/make -j2 -e -f  Makefile'
----------Building project:[ ProxyServer - Release ]----------
make[1]: Entering directory `/home/spechacek/Documents/Projects/Codelite/ProxyServer'

/usr/bin/g++   -c  "/home/spechacek/Documents/Projects/Codelite/ProxyServer/main.cpp" -O2 -Wall -DNDEBUG  -o ./Release/main.cpp.o -I. -I. -I/home/spechacek/lib/poco-1.6.0-all/Foundation/include -I/home/spechacek/lib/poco-1.6.0-all/Util/include -I/home/spechacek/lib/poco-1.6.0-all/JSON/include -I/home/spechacek/lib/poco-1.6.0-all/XML/include

/usr/bin/g++  -o ./Release/ProxyServer @"ProxyServer.txt" -L. -L/home/spechacek/lib/poco-1.6.0-all/lib/Linux/x86_64  -lPocoFoundation -lPocoUtil -lPocoXML -lPocoJSON
make[1]: Leaving directory `/home/spechacek/Documents/Projects/Codelite/ProxyServer'

0 errors, 0 warnings

Re: Static link to POCO libraries

Posted: Thu Jan 15, 2015 7:10 am
by Gibbon1
Not a codelite problem.

Look here, I think you need to add the -static option. See

https://digitalseeds.wordpress.com/2012 ... c-linking/