User forums > Using Code::Blocks

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

(1/1)

chwsks:
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 ===

--- End code ---

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

--- End code ---

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:
See here: http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F

Then fix your linker settings

stahta01:

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

--- End quote ---

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

Tim S.

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.

Navigation

[0] Message Index

Go to full version