Static link to POCO libraries

General questions regarding the usage of CodeLite
shanep
CodeLite Curious
Posts: 1
Joined: Wed Jan 14, 2015 5:13 am
Genuine User: Yes
IDE Question: c++
Contact:

Static link to POCO libraries

Post 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
Gibbon1
CodeLite Expert
Posts: 167
Joined: Fri Jul 22, 2011 5:32 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Static link to POCO libraries

Post 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/
Post Reply