Author Topic: Linking problems (cont...)  (Read 25309 times)

Offline zorglub!

  • Multiple posting newcomer
  • *
  • Posts: 11
Linking problems (cont...)
« 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


 

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: Linking problems (cont...)
« Reply #1 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline zorglub!

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: Linking problems (cont...)
« Reply #2 on: June 18, 2009, 05:08:41 pm »
Ah;...thks that was the catch !!!
rgds