User forums => Help => Topic started by: corepuncher on August 01, 2009, 10:09:18 pm
Title: Installed, but it won't work
Post by: corepuncher on August 01, 2009, 10:09:18 pm
I have windows vista 64 and installed Code::Blocks today. I tried to build and run the default C++ "Hello world" program, but it does not work. Instead, I get 16 errors. Are there more steps to get this to work than I am aware of?
||Info: resolving __fmode by linking to __imp___fmode | ||Info: resolving __fpreset by linking to __imp___fpreset | ||warning: auto-importing has been activated without --enable-auto-import specified on the command line.| This should work unless it involves constant data structures referencing symbols from auto-imported DLLs.C:\Program Files (x86)\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\crt2.o:crt1.c:(.text+0x167)||undefined reference to `___cpu_features_init'| C:\Program Files (x86)\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\crt2.o:crt1.c:(.text+0x21e)||undefined reference to `__pei386_runtime_relocator'| C:\Program Files (x86)\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\libstdc++.a(locale_init.o):locale_init.cc:(.text+0x908)||undefined reference to `__CRT_MT'| C:\Program Files (x86)\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\libstdc++.a(locale_init.o):locale_init.cc:(.text+0x9bc)||undefined reference to `__CRT_MT'| C:\Program Files (x86)\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\libstdc++.a(locale_init.o):locale_init.cc:(.text+0x9ef)||undefined reference to `__CRT_MT'| C:\Program Files (x86)\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\libstdc++.a(locale_init.o):locale_init.cc:(.text+0xa8c)||undefined reference to `__CRT_MT'| C:\Program Files (x86)\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\libstdc++.a(locale_init.o):locale_init.cc:(.text+0xb4c)||undefined reference to `__CRT_MT'| C:\Program Files (x86)\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\libgcc.a(gthr-win32.o):(.text+0xc3)||undefined reference to `___mingwthr_key_dtor'| C:\Program Files (x86)\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\libgcc.a(unwind-sjlj.o):(.text+0x28)||undefined reference to `___mingwthr_key_dtor'| C:\Program Files (x86)\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\libgcc.a(unwind-sjlj.o):(.text+0x6d)||undefined reference to `__CRT_MT'| fu000001.o:(.idata$2+0xc)||undefined reference to `_libmsvcrt_a_iname'| fu000002.o:(.idata$2+0xc)||undefined reference to `_libmsvcrt_a_iname'| fu000004.o:(.idata$2+0xc)||undefined reference to `_libmsvcrt_a_iname'| fu000005.o:(.idata$2+0xc)||undefined reference to `_libmsvcrt_a_iname'| nmth000000.o:(.idata$4+0x0)||undefined reference to `__nm___fmode'| nmth000003.o:(.idata$4+0x0)||undefined reference to `__nm___fpreset'| ||=== Build finished: 16 errors, 1 warnings ===|
Title: Re: Installed, but it won't work
Post by: stahta01 on August 01, 2009, 10:51:40 pm
Which MinGW Version?
The command
Code
gcc.exe -v
Returns below for me.
Code
gcc version 3.4.5 (mingw-vista special r3)
Which Code::Blocks version? 8.02 or SVN number?
Tim S
Title: Re: Installed, but it won't work
Post by: corepuncher on August 02, 2009, 04:09:33 pm
Hello Tim.
If I type gcc.exe -v in a cmd window, it shows:
gcc version 2.95 9990728 <release>
The codeblocks version I downloaded is 8.02.
I appreciate your input, thanks!
Title: Re: Installed, but it won't work
Post by: Jenna on August 02, 2009, 04:28:31 pm
This means you have an older version of MinGW in yoiur path. Make sure, that the bin-directory of the MinGW-version coming with C::B comes first in the systems path-variable, or change to a more recent (nightly-)build of :B.
The 8.02 release uses the system-path, newer versions prepend the master-path (set in the toolchains-tab) to the system-path.