Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: nathanf534 on August 03, 2010, 11:11:34 pm

Title: Adding libraries
Post by: nathanf534 on August 03, 2010, 11:11:34 pm
I am new to both Ubuntu (9.10) and code::blocks, so I am having some trouble including a library.

Code
-------------- 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.
Title: Re: Adding libraries
Post by: MortenMacFly on August 04, 2010, 06:32:13 am
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.