PDA

View Full Version : [SOLVED] Unable to compile c++ programm, which uses cln library.



leftwin
April 20th, 2014, 11:19 AM
Hello to everybody!
I wrote a simple programm for my school project, but when I'm trying to compile it on my PC with Ubuntu 14.04 :


g++ -lcln -o ferma ferma.cpp

I get errors:
http://bpaste.net/show/218812/

I suppose that there is no errors in my programm, because It succesfully compiles on my PC with gentoo.

And here is my code:
http://bpaste.net/show/218813/

I have got gcc 4.8.2 and libcln6 installed. Also I tried installing that library from source code.

dwhitney67
April 20th, 2014, 01:20 PM
Specify the library that you wish to link against last, not first, in your g++ statement. For example:


g++ -o ferma ferma.cpp -lcln

leftwin
April 20th, 2014, 03:13 PM
Thank you a lot! I'm wondering why does it compile on gentoo machine.