Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Extra libraries, Code snippets, applications etc. » C++ language problems and code snippets » Pre processor and macro error
Pre processor and macro error [message #55685] Mon, 30 November 2020 15:22 Go to previous message
Xemuth is currently offline  Xemuth
Messages: 316
Registered: August 2018
Location: France
Senior Member
I am working on GLFW package, I want it to be cross platforme, so as plugin/png I did this kind of trick (only pay attention to Windows part):
https://i.imgur.com/G9P5GMb.png

According to this image, my "glfw3.h" is interpreted after having defined the target (_GLFW_WIN32)

In "glfw3.h" the file internal.h get included and have this following block of code :

#if defined(_GLFW_COCOA)
 #include "cocoa_platform.h"
#elif defined(_GLFW_WIN32)
 #include "win32_platform.h"
#elif defined(_GLFW_X11)
 #include "x11_platform.h"
#elif defined(_GLFW_WAYLAND)
 #include "wl_platform.h"
#elif defined(_GLFW_OSMESA)
 #include "null_platform.h"
#else
 #error "No supported window creation API selected"
#endif


A this point, on my computer, the flag _GLFW_WIN32 should have been set but it's not the case. I don't get why
https://i.imgur.com/0kvqvGb.png

so here come my question, why when having this block :
#if defined(_WIN32)
	#define _GLFW_WIN32 1
#elif defined(_APPLE)
	#define _GLFW_COCOA 1
#elif defined(_LINUX)
	#define _GLFW_X11 1
#elif defined(_WAYLAND)
	#define _GLFW_WAYLAND 1
#elif define(_OMESA)
	#define _GLFW_OMESA 1
#endif

and being on W10 compiling with CLANG or MSVS don't result in _GLFW_WIN32 being set ? What I am missing ?

Thanks in advance
Xemuth


 
Read Message
Read Message
Read Message
Previous Topic: strange MinGw return
Goto Forum:
  


Current Time: Sat Feb 27 14:18:29 CET 2021

Total time taken to generate the page: 0.01329 seconds