Archive for October, 2007

h1

wxDev-C++ problems

October 22, 2007

(Edit: 1 November 2007)
Found out this is a bug of MinGW, and has nothing to do with wxDev-C++ either.

Stumbled into wxDev-C++ problems today, as I tried to compile the template wxWidgets dialog. Refer to my last post about the same old bugs again, and here we got ourself a new problem.

Open up your Compile Log, and there it is:
windows.h: No such file or directory

Another configuration problem, eh? Go to Tools -> Compiler Options -> Directories -> Resource Includes, add this directory.
\Dev-Cpp\include

Problem solved. Hopefully there wont be any pesky config problem anymore. <_<

h1

MinGW bugs under Windows Vista

October 19, 2007

(Edit: 1 November 2007)
Found out this is a bug of MinGW, and has nothing to do with Dev-C++.

Recently I installed Dev-C++ under Windows Vista, but when I try to compile the template DLL, it gives the following error in compile log.

gcc.exe: installation problem, cannot exec `cc1′: No such file or directory

In Dev-C++, go to Tools -> Compiler Options -> Directories -> Binaries, add this following directory
\Dev-Cpp\libexec\gcc\mingw32\3.4.2

Compile the project again. Okay, now what?

ld: crt2.o: No such file: No such file or directory
ld: dllcrt2.o: No such file: No such file or directory
ld: crtbegin.o: No such file: No such file or directory
ld: crtend.o: No such file: No such file or directory
ld: cannot find -lgcc

(Update: 1 November 2007)
To workaround this errors, you need to do the following steps:

  1. Copy dllcrt2.o and crt2.o from \Dev-Cpp\lib to \MinGW\lib.
  2. Copy crtbegin.o and crtend.o from \Dev-Cpp\lib\gcc\mingw32\3.4.2 (version may vary depending on your mingw version) to \MinGW\lib.
  3. In Dev-C++, go to Tools -> Compiler Options -> Directories -> Libraries, add this following directory
    \Dev-Cpp\lib\gcc\mingw32\3.4.2
    (again, version may vary depending on your mingw version)

Compile your project, it should work now. Now I try to compile the C version, oh no more errors.

In file included from dllmain.c:3:
C:/Dev-Cpp/include/windows.h:47:20: stdarg.h: No such file or directory
In file included from C:/Dev-Cpp/include/winnt.h:37,
from C:/Dev-Cpp/include/windef.h:253,
from C:/Dev-Cpp/include/windows.h:48,
from dllmain.c:3:
C:/Dev-Cpp/include/string.h:24:20: stddef.h: No such file or directory
In file included from C:/Dev-Cpp/include/winnt.h:37,
from C:/Dev-Cpp/include/windef.h:253,
from C:/Dev-Cpp/include/windows.h:48,
from dllmain.c:3:

blah blah blah

Here’s the fix. In Dev-C++, go to Tools -> Compiler Options -> Directories -> C Includes, add this directory
\Dev-Cpp\lib\gcc\mingw32\3.4.2\include
(I dont want to repeat that again)

Okay now everything is working. Hopefully these should solve your problem regarding compiling with Dev-C++ under Windows Vista.