Code::Blocks Forums

User forums => Help => Topic started by: musasabi on January 10, 2012, 11:58:05 pm

Title: [SOLVED] Code::Blocks will compile, but now I only get an object file
Post by: musasabi on January 10, 2012, 11:58:05 pm
Hey everyone,

I'm sitting down to spend some free time tearing through the OpenGL Superbible this month, and attempting to start all development under Linux.

Presently, I've gotten Code::Blocks to compile... two out of three things. First, of course, I just did up a Hello World to make sure I had compiler paths correct and Code::Blocks knew how to use gnome-terminal (I'm on Gnome 3). Second, I just compiled and ran the stock GLUT project provided with Code::Blocks, since the Blue Book relies on GLUT.

Then, I typed out the first bit of example code in the book. I had to go grab their source code, add their GLTools/include/ directory to the search directories, and link with libGL and libglut. All well and good, no undefined functions or other funny business.

However, I hit F9 and Code::Blocks prompts me that "The project hasn't been built yet...". I check bin/Debug/ and, sure enough, it's empty. When I looked in obj/Debug/, though, I found an appropriately titled .o file in there.

What's going on here? Why is the linker getting hung up?

Oh, and I'm using Code::Blocks 10.05 and this is a fresh Arch install (as in, fetched this morning).

Thanks in advance. =)
Title: Re: (Arch Linux) Code::Blocks will compile, but now I only get an object file
Post by: MortenMacFly on January 11, 2012, 07:50:07 am
However, I hit F9 and Code::Blocks prompts me that "The project hasn't been built yet...". I check bin/Debug/ and, sure enough, it's empty. When I looked in obj/Debug/, though, I found an appropriately titled .o file in there.
Mind searching the forums? There have been several answers to that questions and usually one of the answers matched.
Title: Re: (Arch Linux) Code::Blocks will compile, but now I only get an object file
Post by: musasabi on January 11, 2012, 01:50:53 pm
My first response to the issue was to get on Google, but I couldn't find anyone specifically dealing with unlinked object files. Secondarily, I searched these forums before I posted this. As a mod of another forum with ~2,000 international users who are extremely active, I definitely understand the irritation of repeat questions. ;) I also know that moat forum search engines tend to produce meaningless results. In particular, my search here returned maybe 8 results that were all different "has not been built" style errors.

So, no, I wouldn't mind. ;) But I already gave it a go to no avail. In light of that, anyone got a course of action for me?
Title: Re: (Arch Linux) Code::Blocks will compile, but now I only get an object file
Post by: oBFusCATed on January 11, 2012, 01:57:52 pm
Have you looked at the full log for clues?
Title: Re: (Arch Linux) Code::Blocks will compile, but now I only get an object file
Post by: stahta01 on January 11, 2012, 02:33:22 pm
Have you looked at the full log for clues?

http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F (http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F)

Tim S.
Title: Re: (Arch Linux) Code::Blocks will compile, but now I only get an object file
Post by: musasabi on January 11, 2012, 04:46:54 pm
Wow, that feature (compiler output) is burried. Logical place, to be sure, but burried.

Anyway, yes, that did it for me. I had a rogue .lib linked that didn't exist anymore, so gcc would dump mid-linking.

Thank you all very much. =)