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

I am having a link problem--where do I find the information?

Started by chwsks, January 02, 2010, 10:09:42 PM

Previous topic - Next topic

chwsks

I get the following error when I try to create a simple "hello world" using "fltk" :
ld          cannot find -lXft
=== Build finished: 1 errors, 0 warnings ===


But, the same program can be built using these commands in the terminal:


g++ -Wall -o main.o -c main.cpp
g++ main.o  -lfltk -lfltk_images -o main


I know where my libraries are and I know what libraries I want to use--just do not know how to tell code blocks to use them.

oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

stahta01

Quote from: oBFusCATed on January 02, 2010, 10:17:11 PM
Then fix your linker settings

Project -> Build Options
Tab "Linker Settings"
Add Libs under "Link Libraries"

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

chwsks

Thank you Tim S., but it did not work for me. What I had to do was:

project -> properties -> project build options [button]->linker settings [tab] -> and add the proper libraries.

I am not sure why what you suggested did not work, because both you and someone else at another forum gave me the same answer--so I am assuming that I missed something.

Thanks again.