User forums > Help

C::B tries to launch cygwin gcc at startup -> ntvdm error dialog

(1/2) > >>

erix53:
I've been using Code::Blocks 10.05 on XP SP3 without problems for a few days; today, when starting up, it showed the attached error dialog and does so every time I launch it. Whatever button I choose, it then starts up and seems to work fine.

After some tests, I found that it seems to be scanning the disk directory tree (at every launch) and apparently during this process it tries to execute the cygwin version of gcc, which of course is not a valid Windows executable and so produces that error.
The compiler is not set to use cygwin's gcc (which is in a completely unrelated directory), but is set to use the gcc included with Code::Blocks (and does so when compiling), so I am a bit puzzled.

All I did yesterday was to make a new console project (which worked and still works fine) but I fail to see any relation. May I have inadvertently changed something?

In case it may be relevant: I installed Code::Blocks as limited user, in a folder where I have full access rights.


MortenMacFly:

--- Quote from: erix53 on March 28, 2012, 06:42:11 pm ---All I did yesterday was to make a new console project (which worked and still works fine) but I fail to see any relation. May I have inadvertently changed something?

--- End quote ---
Well this error has its root in the GCC executable you are using, not in C::B. The Cygwin executables should run just fine under Windows, as they target Windows.

Either you executable or the Cygwin environment is broken. What happens if you try to launch this from the command line? If it fails, too then complain to the Cygwin people. Its not a C::B issue.

BTW: I am working with Cygwin projects over years - they just work, bot: with old and recent Cygwin.

erix53:

--- Quote from: MortenMacFly on March 29, 2012, 06:58:16 am ---Well this error has its root in the GCC executable you are using, not in C::B. The Cygwin executables should run just fine under Windows, as they target Windows.

Either you executable or the Cygwin environment is broken. What happens if you try to launch this from the command line? If it fails, too then complain to the Cygwin people. Its not a C::B issue.

--- End quote ---

Thanks for the answer; I did some searching in that direction. I see a few problems here:

- cygwin's gcc.exe (which is a symlink) gives the same error if launched from Windows, but works fine from a cygwin shell. In fact, this seems to be a known behavior:
http://cygwin.com/ml/cygwin/2004-12/msg00902.html
(I updated cygwin about a month ago, so it's should be up-to-date)

- I'm still perplexed about C::B calling an executable in a completely unrelated directory just because it's called "gcc.exe". I could have a program of mine with the same name, there could be permission problems, etc. Is there a way to disable this auto-search at startup?

- The mystery still remains about why C::B worked fine for a few days: I'm quite sure I didn't touch anything in cygwin.

MortenMacFly:

--- Quote from: erix53 on March 29, 2012, 09:44:00 am ---- I'm still perplexed about C::B calling an executable in a completely unrelated directory just because it's called "gcc.exe". I could have a program of mine with the same name, there could be permission problems, etc. Is there a way to disable this auto-search at startup?

--- End quote ---
Well - it calls what you setup in the compiler's setup for the toolchain executables. C::B does only what you did setup. Did you verify your setup?

erix53:

--- Quote from: MortenMacFly on March 29, 2012, 10:40:47 am ---Well - it calls what you setup in the compiler's setup for the toolchain executables. C::B does only what you did setup. Did you verify your setup?

--- End quote ---

The selected compiler (GN GCC Compiler i.e. MinGW32) seems to work fine (see first attachment); I didn't change it:

-------------- Build: Debug in WicomTest ---------------

mingw32-g++.exe -Wall -fexceptions  -g     -c C:\E\programmi\elib\Wicom\prove\WicomTest\main.cpp -o obj\Debug\main.o


The problem happens only when I launch C::B from Windows, not when I compile.
I guess I should disable "Cygwin GCC" from the compiler settings to avoid it being executed at C::B launch, but the Delete button seems to be disabled (see second attachment).
Or I could find out the actual (current) cygwin executable and put its path in the configuration panel, but that seems a rather dirty and fragile workaround... for a program I don't use.

It's probably my inexperience with C::B, but I was unable to find information about this in the manual or in the FAQ.

Navigation

[0] Message Index

[#] Next page

Go to full version