Pinyo's Programming and Software Notes

Monday, May 28, 2007

Installing and Configuring CDT in Eclipse

(May 28, 2007)

Today, I tried to use CDT to develop a very simple program, HelloWorld. However, I encountered so many difficulties: cannot debug (error launching session) and weird exit value: -1073741515 (no output occurred, program terminated immediately). Oh, my OS is Windows XP 32 bits, and this blog is intended for Windows system only.

However, program was built successfully, but I could not run it by double clicking on its executable file. It said "cannot find cygwin1.dll". Thus, I went to update environment variables PATH by appending C:\cygwin\bin. This solved the problem, and I could run the program from outside Eclipse environment.

For debug problem, it can be fixed by deleting spawner.dll in directory:

C:\eclipse_32\plugins\org.eclipse.cdt.core.win32_3.1.0.200606261600\os\win32\x86

This is due to CDT bug in Windows box. Thanks to http://max.berger.name/howto/cdt/ar01s04.jsp#configuring.

But, I still could not run the program without debugging inside Eclipse. My program terminated immediately after I ran it. Eclipse displayed exit value: -1073741515. I tried copy the cygwin1.dll to the executable directory. Then, every thing seemed fine. The real problem is after I updated system variable, I did not restart Eclipse to allow it re-read system variables. Namely, after updating any system variables, we need to restart applications to make the change effective.

Labels: ,