Code::Blocks Forums

User forums => Help => Topic started by: zorglub! on June 18, 2009, 03:14:35 pm

Title: Linking problems (cont...)
Post by: zorglub! on June 18, 2009, 03:14:35 pm
Hi
These are newbees questions but i'm fairly lost...
I have setup a project.
I have chosen a built target ( debug)
I have a C source file...

When compiling ( compile only...), here is the log message

gcc -march=i586 -Wall -g     encheres.c  -c -o encheres.o
gcc  -o encheres encheres.o   
encheres.o: In function `main':
/home/claude/projets/encheres/Encheres/encheres.c:75: warning: the `gets' function is dangerous and should not be used.
Process terminated with status 0 (0 minutes, 1 seconds)
0 errors, 1 warnings

Il I get it right ( newbee I said..)
first line is compile stage only due to -c option
second line is link stage...

Now, I click "build"...here is what CB spits at me


-------------- Build: Debug in Encheres ---------------

Linking stage skipped (build target has no object files to link)
Nothing to be done.

What should I do to avoid this ?

Thks


 
Title: Re: Linking problems (cont...)
Post by: MortenMacFly on June 18, 2009, 04:19:03 pm
What should I do to avoid this ?
Add the file to your project. Then compile the project and not only the file.
Title: Re: Linking problems (cont...)
Post by: zorglub! on June 18, 2009, 05:08:41 pm
Ah;...thks that was the catch !!!
rgds