-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[build] raylib doesn't build under mingw-w64 #243
Comments
Ouch... the infamous I've seen this issue about conflicting types several times... #if !(defined(WINGDIAPI) && defined(APIENTRY))
#include <windows.h>
#else
#include <stddef.h>
#endif You can try defining WINGDIAPI at compilation... let me know if it works... About |
I compared Just for reference, here it is the header definitions system on /************************************************************************
* Begin system-specific stuff.
*/
/* __WIN32__ */
#if !defined(__WIN32__) && (defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__))
# define __WIN32__
#endif
/* GLAPI, part 1 (use WINGDIAPI, if defined) */
#if defined(__WIN32__) && defined(WINGDIAPI)
# define GLAPI WINGDIAPI
#endif
/* GLAPI, part 2 */
#if !defined(GLAPI)
# if defined(_MSC_VER) /* Microsoft Visual C++ */
# define GLAPI __declspec(dllimport)
# elif defined(__LCC__) && defined(__WIN32__) /* LCC-Win32 */
# define GLAPI __stdcall
# else /* Others (e.g. MinGW, Cygwin, non-win32) */
# define GLAPI extern
# endif
#endif
/* APIENTRY */
#if !defined(APIENTRY)
# if defined(__WIN32__)
# define APIENTRY __stdcall
# else
# define APIENTRY
# endif
#endif
/*
* End system-specific stuff.
************************************************************************/ in comparison to the #if !(defined(WINGDIAPI) && defined(APIENTRY))
#include <windows.h>
#else
#include <stddef.h>
#endif Note that GLAPI void APIENTRY glVertex3f( GLfloat x, GLfloat y, GLfloat z ); while the WINGDIAPI void APIENTRY glVertex3f( GLfloat x, GLfloat y, GLfloat z ); |
Ok, as I see it, Actually, WINGDIAPI is not defined in #ifdef _GDI32_
#define WINGDIAPI
#else
#define WINGDIAPI DECLSPEC_IMPORT
#endif And When I see all this, I keep asking myself: really? it needs to be that way? needs to be so complex? Just created raylib to make things easier and simpler... programming shouldn't be that convoluted... |
I hear you there on that one! Nobody likes KISS anymore. I'll try tinkering with it more. Any idea why it doesn't like near/far? I've never encountered that before and they aren't reserved words. |
Oh... This is interesting. I'm on another machine with MinGW-w64 installed and it built fine. I think I do have some extra mingw headers installed on the other machine... I suspect that it picked up some headers that nobody anticipated it picking up. Here are build outputs without and with |
Hi @Phyllostachys! Thanks for the info! It seems in one machine there are some headers around that complicate things... do you have Visual Studio installed in any of the two machines? Which version? Maybe it creates some environment definitions... About http://stackoverflow.com/questions/1749904/what-is-the-difference-between-far-pointers-and-near-pointers Just renamed in commit 4ec65c0 Glad to read it compiles now. I recommend you to use raylib develop branch, it contains latest updates and I try to keep the branch stable. Hopefully raylib 1.7 will be published anythime soon. :) |
I have MSVC command line build tools install on both. I'll have to see what is installed in MinGW on the other machine to see what is extra. I'll try the develop branch too. Thanks a bunch! |
Thanks to you for trying the library and reporting the issue! :) |
I tried building raylib 1.6 in MinGW-w64 but there are name conflicts with the wingdi system that MinGW-w64 exposes. I tried taking that include path out but
GL/gl.h
, as required by GLFW3, is in the w32api folder path which includes thewingdi.h
files.The log looks like this:
It also doesn't seem to like the names
near
andfar
::-( I can't really think of a way around it.
The text was updated successfully, but these errors were encountered: