Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: chwsks on January 02, 2010, 10:09:42 pm

Title: I am having a link problem--where do I find the information?
Post by: chwsks on January 02, 2010, 10:09:42 pm
I get the following error when I try to create a simple "hello world" using "fltk" :
Code
ld          cannot find -lXft
=== Build finished: 1 errors, 0 warnings ===

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

Code
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.
Title: Re: I am having a link problem--where do I find the information?
Post by: oBFusCATed on January 02, 2010, 10:17:11 pm
See here: http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F

Then fix your linker settings
Title: Re: I am having a link problem--where do I find the information?
Post by: stahta01 on January 02, 2010, 10:22:59 pm
Then fix your linker settings

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

Tim S.
Title: Re: I am having a link problem--where do I find the information?
Post by: chwsks on January 03, 2010, 12:07:18 am
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.