User forums > Help

HelloWorld program failes to link

(1/2) > >>

Ancient Dragon:

--- Quote ---Compiling: main.cpp
Execution of 'g++.exe.lnk -Wall -fexceptions  -g     -c C:\dvlp\HelloWorld\main.cpp -o obj\Debug\main.o' in 'C:\dvlp\HelloWorld' failed.
Nothing to be done.
--- End quote ---

I just installed C::B with MiniGW compiler on 64-bit Vista Home Premium (I also have VC++ 2008 Express installed).  At first C::B produced error that it could not find the compiler.  I finally got that figured out, but now it produces the agove error.  I looked in the MiniGW bin folder and there is no program named "g++.exe.lnk".  Nor did it produce a *.o file from the *.cpp file.

Anyone know what is wrong?

MortenMacFly:

--- Quote from: Ancient Dragon on August 28, 2009, 07:23:56 pm ---I looked in the MiniGW bin folder and there is no program named "g++.exe.lnk".

--- End quote ---
Install the GCC / G++ compiler. Just MinGW is not enough. Follow the instructions on the MinGW webpage.

stahta01:

--- Quote from: Ancient Dragon on August 28, 2009, 07:23:56 pm ---I just installed C::B with MiniGW compiler on 64-bit Vista Home Premium

--- End quote ---

NOTE: The MinGW GCC packaged with Code::Blocks 8.02 is not good enough for normal Vista; not idea about Home Edition.

What version of MinGW did you install?

--- Code: ---gcc -v

--- End code ---

Tim S.



Jenna:
What makes me wonder is g++.exe.lnk.
It seems your g++ in the toolchain points to a link of to g++.exe not to th executable itself.

That does not work from inside C::B !!!

Ancient Dragon:
Thanks for your comments.  I uninstalled C::B, installed MiniGW in c:\MiniGW (the default), then reinstalled C::B without MiniGW.  Tried to compiled Hello World c++ again, and it failed with the same problem as before.

Ok, I finally figured out the problem.  I had to go into the toolchain executables window and reset the compiler and linker to both use g++.exe instead of the default g++.exe.lnk. 

Navigation

[0] Message Index

[#] Next page

Go to full version