User forums > Using Code::Blocks
Problem with headers/search directories
CBuser:
On another computer which has PSDK, Cygwin, and Dev-C++ installed in the same directory paths as this computer (though Dev-C++ doesn't use my Cygwin installation, and I've un-installed Dev-C++ from this computer), my compiler includes are as follows:
C:
- D:\Dev-Cpp\include
C++:
- D:\Dev-Cpp\lib\gcc\mingw32\3.4.2\include
- D:\Dev-Cpp\include\c++\3.4.2\backward
- D:\Dev-Cpp\include\c++\3.4.2\mingw32
- D:\Dev-Cpp\include\c++\3.4.2
- D:\Dev-Cpp\include
Note that my project is setup as a C (not C++) Win32 DLL.
The Dev-C++ project has the following directory entries:
Library:
- D:\Program Files\Microsoft SDK\Lib
- D:\psdk\wua_api_headers_i386
Include:
- D:\Program Files\Microsoft SDK\include
- D:\psdk\wua_api_headers_i386
CBuser:
--- Quote from: raph on July 09, 2007, 10:32:06 pm ---I would use mingw as compiler (like dev-c++ did).
You don't need Microsoft's psdk.
--- End quote ---
For whatever reason, this is something I over-looked, perhaps because I didn't understand it well. I'm not sure what the differences are between MinGW and Cygwin, or how to specify MinGW as the compiler. Currently in CB I have 'Cygwin GCC' selected as the compiler; I don't see any mention of 'MinGW'. I installed MinGW and tried selecting 'GNU GCC Compiler' as the compiler (not knowing what else to try). CB was unable to detect my installation of MinGW, so I pointed it there manually ("D:\MinGW"), but buiding results in the error blow.
Compiling: generic.c
mingw32-gcc.exe: installation problem, cannot exec `cc1': No such file or directory
As for Dev-C++, the compiler is set as 'Default compiler', with no other options, therefore I've never tampered with this (it just worked).
Unfortunately, I'm no less confused at this point. Any ideas?
stahta01:
--- Quote from: CBuser on July 10, 2007, 07:44:38 am ---
Compiling: generic.c
mingw32-gcc.exe: installation problem, cannot exec `cc1': No such file or directory
--- End quote ---
That error is common for Windows Vista. What version of windows are you using?
If Vista see link below.
http://wiki.codeblocks.org/index.php?title=Installing_MinGW_with_Vista
Tim S
CBuser:
I am indeed running Windows Vista on this computer. Actually, before you posted, I found the cc1.exe file and added it's path as an 'additional path' to the toolchain executables--this resulted in a successful compile. However, when I added compiler search directory "D:\Program Files\Microsoft SDK\include" to my project, again, I'm flooded with errors. I then read your post, continued to follow the suggestions provided (manually adding several compiler and linker search directories to the global compiler settings), but the errors I receive when trying to build do not change.
Example of the first couple or so errors:
Compiling: generic.c
In file included from D:/Program Files/Microsoft SDK/include/windef.h:166,
from /mingw/include/excpt.h:20,
from D:/Program Files/Microsoft SDK/include/windows.h:157,
from D:\c\genericdll\generic.c:2:
D:/Program Files/Microsoft SDK/include/winnt.h:674:2: #error Must define a target architecture.
In file included from D:/Program Files/Microsoft SDK/include/windows.h:164,
from D:\c\genericdll\generic.c:2:
D:/Program Files/Microsoft SDK/include/winuser.h:10564: warning: declaration does not declare anything
D:/Program Files/Microsoft SDK/include/winuser.h:10569: warning: declaration does not declare anything
In file included from D:/Program Files/Microsoft SDK/include/objbase.h:403,
from D:/Program Files/Microsoft SDK/include/ole2.h:69,
from D:/Program Files/Microsoft SDK/include/windows.h:207,
from D:\c\genericdll\generic.c:2:
D:/Program Files/Microsoft SDK/include/objidl.h:264: error: redefinition of typedef 'IRpcChannelBuffer'
stahta01:
--- Quote from: CBuser on July 10, 2007, 08:20:01 am ---D:/Program Files/Microsoft SDK/include/winnt.h:674:2: #error Must define a target architecture.
--- End quote ---
You have to define
_M_IX86
To avoid that error.
Note, I don't have the time to reply any more to this thread.
Tim S
Navigation
[0] Message Index
[*] Previous page
Go to full version