User forums > Using Code::Blocks
Problem with headers/search directories
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 ---
I'm not a professional programmer; on the contrary, I'm pretty much a novice who writes small C programs for himself. I will be using the Windows Update Agent API in this project, eventually. According to my interpretation of MSDN documentation, PSDK is necessary for usage of the Windows Update Agent API; if I'm wrong in my interpretation, could you link me to any web pages that will guide me on usage of this API without linking to the PSDK?
CBuser:
--- Quote from: dmoore on July 09, 2007, 10:39:20 pm ---you might need to reorder your search directories. what do your project and compiler search paths currently look like?
--- End quote ---
Correction: My project has a single search directory entry "D:\psdk\wua_api_headers_i386" and my compiler has a single entry "D:\Program Files\Microsoft SDK\include". I also added "D:\Program Files\Microsoft SDK\Lib" as a compiler search directory for testing, but this didn't seem to help.
dmoore:
did you try setting the project search directory to "D:\Program Files\Microsoft SDK\include"
and leaving the compiler search directory as "D:\cygwin\usr\include\mingw" (or whatever the default compiler search path is)
(I assume this is how it is in your Dev-CPP setup -- If it is different, post the differences.)
note that the project dirs get priority over the compiler dirs.
NB: you can post the project files if they are small enough. they get deleted by the mods pretty quickly.
CBuser:
Please note my correction above. I tried as you suggested:
Compiler:
- D:\cygwin\usr\include\mingw
Project:
- D:\psdk\wua_api_headers_i386
- D:\Program Files\Microsoft SDK\include
First two errors in the build log:
Compiling: generic.c
In file included from D:/Program Files/Microsoft SDK/include/windef.h:166,
from D:/cygwin/usr/include/mingw/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:237:1: warning: "_cdecl" redefined
<built-in>:77:1: warning: this is the location of the previous definition
D:/Program Files/Microsoft SDK/include/winnt.h:674:2: #error Must define a target architecture.
dmoore:
what are your dev-cpp compiler path settings? tool->compiler options->directories->c includes and ->c++ includes
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version