News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Adding libraries

Started by nathanf534, August 03, 2010, 11:11:34 PM

Previous topic - Next topic

nathanf534

I am new to both Ubuntu (9.10) and code::blocks, so I am having some trouble including a library.


-------------- Build: Debug in test ---------------

g++ -Wall -fexceptions  -g     -c /home/nathan/test/main.cpp -o obj/Debug/main.o
g++ -L/usr/lib  -o bin/Debug/test obj/Debug/main.o    file:///usr/lib/libpcap.a
g++: file:///usr/lib/libpcap.a: No such file or directory
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings


libpcap.a is located in usr/lib

any suggestions of how I can fix this, or any more information you need to help me?

Thank you very much.

MortenMacFly

Quote from: nathanf534 on August 03, 2010, 11:11:34 PM
g++ -L/usr/lib  -o bin/Debug/test obj/Debug/main.o    file:///usr/lib/libpcap.a
Remove the "file://" protocol handler in you linker options. I am not aware that GCC can handle this.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]