Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Linker Errors in Hello World program
Linker Errors in Hello World program [message #1065007] Sat, 22 June 2013 23:32 Go to next message
Eclipse UserFriend
hi
just installed CDT into eclipse juno
I also installed MinGW

I have problems building the standard C++ Hello World program
(C programs are working fine)

Console output:

05:15:44 **** Incremental Build of configuration Debug for project test ****
Info: Internal Builder is used for build
g++ -o test.exe "src\\test.o"
/mingw/lib/libmingwex.a(pformat.o):pformat.c:(.text+0x3f4): undefined reference to `__chkstk_ms'
/mingw/lib/libmingwex.a(pformat.o):pformat.c:(.text+0x66f): undefined reference to `__chkstk_ms'
/mingw/lib/libmingwex.a(pformat.o):pformat.c:(.text+0xa94): undefined reference to `__chkstk_ms'
/mingw/lib/libmingwex.a(pformat.o):pformat.c:(.text+0x13df): undefined reference to `__chkstk_ms'
C:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: /mingw/lib/libmingwex.a(pformat.o): bad reloc address 0x34 in section `.rdata'
C:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: final link failed: Invalid operation
collect2: ld returned 1 exit status

05:15:44 Build Finished (took 467ms)
Re: Linker Errors in Hello World program [message #1103289 is a reply to message #1065007] Fri, 06 September 2013 11:28 Go to previous messageGo to next message
Eclipse UserFriend
I am having almost the exact same problem in Eclipse Helios. Any solutions?
Re: Linker Errors in Hello World program [message #1103456 is a reply to message #1103289] Fri, 06 September 2013 16:25 Go to previous messageGo to next message
Eclipse UserFriend
I would first double-check to make sure you have the MinGW bin folder added in the PATH environment variable (though I have to believe you have it defined, otherwise the C/C++ compiler wouldn't work.

Next look at the log file (right-click on your C/C++ project and at the bottom click on Properties. Twirl down C/C++ Build and click on Logging. Make sure that you have "Enable build logging checked and then copy the path for the Log file location so you can paste it into Windows Explorer to view the folder contents). Odds are if you've used the defaults for everything then the logs get written in C:\Users\{YOUR-USERNAME}\workspace\.metadata\.plugins\org.eclipse.cdt.ui\ and you will find a file called global-build.log and for each project a {your-project-name}.log file.

If that doesn't help, you can boost the "chatter" in the log by adding the 'verbose' option to the linker. Just below the "Logging" (above) you will see Settings. Click on that, then under MinGW C++ Linker click on Miscellaneous. In the right-hand side at the top you'll see the field for Linker flags and enter: --verbose (Note: that has TWO hyphens/dashes.

Finally... when you created your project, did you make sure you selected MinGW GCC in the Toolchains (right-hand pane from where you select the Hello World C++ Project)?

SenseiC bows out
Re: Linker Errors in Hello World program [message #1106494 is a reply to message #1103456] Wed, 11 September 2013 02:59 Go to previous message
Eclipse UserFriend
Google was very helpful Smile
http://stackoverflow.com/questions/18649173/how-to-solve-undefined-reference-to-chkstk-ms-on-mingwingw
Previous Topic:Separate folders for .h and .cpp files?
Next Topic:make error 127 with beaglebone angstrom release
Goto Forum:
  


Current Time: Mon May 12 02:57:00 EDT 2025

Powered by FUDForum. Page generated in 0.04377 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top