Code Blocks 17.12: how can i add include directies?

imagine that i have installed DirectX SDK or even the OpenGL.
how can i add the include directory?
these is an adicional include directory.
Project -> Build options -> Search Directories Tab -> Compiler tab for header file directories, Linker for library file directories.
like you see on image, i add it(but not on linker):
https://imgur.com/a/vMtqE

if i close the Code blocks and then open it, the files are on list ;)
but why i get several errors?
like the '__in'?
Can you post the exact error messages? Sounds like linker errors.
see the image:
https://imgur.com/a/4XNU5

C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include\dxgi.h|286|error: '__in' has not been declared|
Last edited on
Not sure, I searched the errors, this might help? Sounds like Microsoft is doing some non-standard stuff.
https://stackoverflow.com/questions/28641678/compile-error-with-dxgi-h
http://www.cplusplus.com/forum/general/72858/

(Honestly, I suggest using OpenGL or Vulkan anyway.)
i did that before, but the errors continue :(
C:\Program Files\mingw-w64\x86_64-7.2.0-win32-seh-rt_v5-rev1\mingw64\lib\gcc\x86_64-w64-mingw32\7.2.0\include\c++\x86_64-w64-mingw32\bits\c++locale.h||In function 'int std::__convert_from_v(int* const&, char*, int, const char*, ...)':|
now it's another error. these don't make sence to me.
why i can't use Directx 11 on Code Blocks?
unless i need some compiler options
(yes the mingw-w64 was installed by me independent... but the standard give me the same errors, i tested)
unless the mingw isn't prepared for directx 11
Yeah I'm as lost as you are. But you didn't post the actual error, you just posted the function it's happening in. Copy the whole error message.
i copy all, but see the image for you understand more:
https://imgur.com/a/bleES

directx SDK can be different from GNU compiler?
Last edited on
More guessing on my part, but this guy seems to be having the same problem as you
https://stackoverflow.com/questions/28953860/issue-with-mingw-file-clocale-h-can-i-change-the-code

So it sounds like there are conflicting macro definitions in the function definitions, with what's in the directx headers and what's in the standard library. You might have to rename the macros yourself to be more unique.
yes maybe you have right. but how can i create these macros? or a class macro?
const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args);

const streamsize __put = __out.rdbuf()->sputn(__s, __n);
what you can tell me more?
Last edited on
What happens if you rename every instance you see of __out to, for example, __my_out ?

(Also, in case this is annoying you, please realize I don't actually know the absolute correct answer to this problem, as it's due to a non-standard implementation that Microsoft is doing in its headers*, because MS probably never designed DX to be standard-conforming for GCC. So all of what I type are suggestions that may or may not work, sadly.)
*leading double underscores are reserved words
Last edited on
"||=== Build failed: 50 error(s), 30 warning(s) (0 minute(s), 8 second(s)) ===|"
more off them... i can't change all functions!!!
what i can do is recreate the macros\class
or get the header file with that macros
Last edited on
Tools like notepad++ can do "replace all" text functions, if you have multiple instances you need to change.

I have one more random idea, and then I'm probably out of ideas.
Try to
1
2
3
#undef __out
#undef __in
(etc.) 


before and especially after any directx header include.

But other than that: my apologies, I'm out of ideas... (other than to use visual studio for developing DX). Feel free to bump this again if no one else responds in a reasonable amount of time.
Last edited on
Directx SDK is donned by Microsoft. so GNU isn't compatible with it.
i don't know what is the GNU Directx 11 limitations, but that i must try it.
thanks for all... thank you
Topic archived. No new replies allowed.