How to use library from project?
Posted: Thu Dec 23, 2010 9:09 am
Hi,
Ubuntu 10.10, 64bit. GCC/G++ 4.4.5. Installed Codelite 2.8 .0.4537. Made simple "hello world" console program, it works.
So now how I got the problem:
1. New workspace
2. Made library project, dynamic (shared) library. Two c++ files, one header file. First problem I hit here is that c++ files are NOT compiled with -fPIC compiler switch as required. Fixed it by adding -fPIC to library project settings.
3. Executable console project which ought to call library - cannot include from lib project, cannot link etc.
How it is supposed to work? How in general I set dependencies - libA is to be build first, because libB and libC depends on it, but then executable shall depends on all libraries, build last and link with lib[A,B,C] properly
Help is greatly appreciated
regards
Ubuntu 10.10, 64bit. GCC/G++ 4.4.5. Installed Codelite 2.8 .0.4537. Made simple "hello world" console program, it works.
So now how I got the problem:
1. New workspace
2. Made library project, dynamic (shared) library. Two c++ files, one header file. First problem I hit here is that c++ files are NOT compiled with -fPIC compiler switch as required. Fixed it by adding -fPIC to library project settings.
3. Executable console project which ought to call library - cannot include from lib project, cannot link etc.
How it is supposed to work? How in general I set dependencies - libA is to be build first, because libB and libC depends on it, but then executable shall depends on all libraries, build last and link with lib[A,B,C] properly
Help is greatly appreciated
regards