User forums > Help

crt2.o / Vista headaches, now with -v goodness.

<< < (4/5) > >>

ironlizard:
I installed wxpack. Same problem.
Turns out all of this $#%# was completely unnecessary.
The fix is at http://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.4.2_to_develop_Code::Blocks_(MSW)
(bottom of the page)

As follows:
 
--- Quote ---undefined reference to `_imp__wxTheApp' (& others)

If you encounter this one, try changing your linker options.

   1. MENU: Settings->configure plugins->compiler->other->advanced options (for me it was Settings->Compiler->Other->Advance)
   2. Choose: "Link object files to executable".
   3. It should be: $linker -o $exe_output $libdirs $link_objects $libs $link_options

Worked for me. Original credits to rickg22 (see this thread) - rykon
--- End quote ---

And so ends this three day saga. The story of a quest to avoid using managed code with dependencies on just in time compiling frameworks is over. Now I can begin the task of ... *$%# it's been so long I forgot what the hell I needed this for. Well, at any rate, I can now rest assured that whatever task I had set myself to, before this untimely failure set off my attention deficit difficulties, can now be accomplished with relative ease. Or something.

ironlizard:
Wait, what? Why? Everything is working now. Will editing mingw.bat remind me of the incredibly important task I've forgotten? Will it take out the trash I've completely forgotten until this very moment after being edited? I DON'T UNDERSTAND!

net:
UNDER WINDOWS VISTA YOU MUST HAVE CRT2.O, CRTBEGIN.O AND CRTEND.O
LOCATED ON THE BASE PROJECT FOLDER

IF YOU MISS TO DO THAT
LD WILL NOT LINK! :shock:

very truly yours
THE NET CENTINELL

ironlizard:
GIVING THE LINKER A PROPER SET OF ARGUMENTS SEEMED TO WORK WITHOUT THE NEED FOR STUFFING FILES IN THE PROJECT DIRECTORY THAT DON'T BELONG THERE BUT THANKS FOR THE REPLY. I THINK YOUR CAPS LOCK IS STUCK, BY THE WAY.

theultramage:
I'd like to note that this same problem still exists (C:BB mingw configuration sucks a lot).
After noticing the -v comment in the title, here's what I saw mingw-g++.exe invoke:

--- Quote ---ld -Bdynamic -o bin\Debug\test.exe crt2.o crtbegin.o -LC:\Unix\bin\MinGW\lib obj\Debug\main.o -lstdc++ -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt crtend.o
ld: crt2.o: No such file: No such file or directory
--- End quote ---
If you think about it, the error is clear. These are simple .o files, not libraries - therefore using -L won't help here.

I'd also like to point out that if I run the same initial command from the commandline, I get

--- Quote --- ld -Bdynamic -o C:\test\bin\Debug\test.exe C:/Unix/bin/MinGW/lib/crt2.o C:/Unix/bin/MinGW/lib/gcc/mingw32/3.4.5/crtbegin.o -LC:\Unix\bin\MinGW\lib -LC:/Unix/bin/MinGW/lib/gcc/mingw32/3.4.5 -LC:/Unix/bin/MinGW/lib/gcc -LC:/Unix/bin/MinGW/mingw32/lib -LC:/Unix/bin/MinGW/lib C:\test\obj\Debug\main.o -lstdc++ -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt C:/Unix/bin/MinGW/lib/gcc/mingw32/3.4.5/crtend.o
--- End quote ---
and it links just fine. So who exactly is screwing up here?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version