I've been developing with raylib for quite a while now.
I've gotten libcurl to work, but it doesn't work with windows.h
, because of the functions names overriding others.
However, there is a workaround, by mentioning these defines (in curl.h
):
#define NOGDICAPMASKS - this disables CC_, LC_, PC_, CP_ TC_ RC_
#define NOVIRTUALKEYCODES - this disables VK_
#define NOWINMESSAGES - this disables WM_ EM_ LB_
#define NOWINSTYLES - this disables WS_, CS_, ES_, LBS_, SBS_, CBS_
#define NOSYSMETRICS - this disables SM_
the list goes on an on...
Keep in mind that I don't need these, I won't use any of these since I'm trying to make it as cross-platform as I can, only libcurl includes these BUT it doesn't use them in any way.
What I am asking is, where could I find a full list of these, and if not a define that STOPS the including of PlaySound()
, PlaySoundA()
, etc.. and other functions related to sound, since they are interferring with PlaySound()
from raylib.
CodePudding user response:
The #define
s you mention are Win32 SDK defines. They instruct windows.h
(more accurately, various other Win32 headers that windows.h
itself #include
s) to not define/declare various symbols.
The #define
you are looking for to omit a declaration of PlaySound(A|W)
(in mmsystem.h
) is:
#define MMNOSOUND
Here is the full table of defines in mmsystem.h
:
* Define: Prevent inclusion of:
* -------------- --------------------------------------------------------
* MMNODRV Installable driver support
* MMNOSOUND Sound support
* MMNOWAVE Waveform support
* MMNOMIDI MIDI support
* MMNOAUX Auxiliary audio support
* MMNOMIXER Mixer support
* MMNOTIMER Timer support
* MMNOJOY Joystick support
* MMNOMCI MCI support
* MMNOMMIO Multimedia file I/O support
* MMNOMMSYSTEM General MMSYSTEM functions
Alternatively:
#define WIN32_LEAN_AND_MEAN
Which will prevent windows.h
from #include
'ing a bunch of headers, including mmsystem.h
.