« first day (1364 days earlier)      last day (1472 days later) » 

9:50 AM
Hi guys,
I am trying to compile this code (https://stackoverflow.com/questions/57778069/how-can-i-programmatically-set-the-default-input-and-output-audio-device-for-an?answertab=votes#tab-top) SetDefaultAudioPlaybackDevice();
I just installed mingw-w10.
My first issue had to do with a conflicting macro in sal.h, namely __in and __out that conflicted with libstdc++ so I removed those macros.
Afterwards, the compiler complains about

undefined reference to `_GUID const& __mingw_uuidof<IPolicyConfig>()'
 
1 message moved from Lounge<C++>
@sockevalley editing system headers is a really bad way to break what you're doing
 
Haha, I know, this all is a bit unofficial so I reckon that's the only solution atm.
 
Suggestion to use the nuwen distribution of mingw
it's curated by the STL maintainer for MS
 
Cheers, do you reckon it would solve my problems if I where to switch from my current mingw-w64 version?
 
it's less likely to need header edits, because that's really really bad
 
10:00 AM
in my sal.h file I found this:

/* FIXME: __in macro conflicts with argument names in libstdc++. For this reason,
* we disable it for C++. This should be fixed in libstdc++ so we can uncomment
* it in fixed version here. */
#if !defined(__cplusplus) || !defined(__GNUC__)
#define __in
#define __out
#endif
And that's causing my errors in the code initially.
 
isn't GNUC defined with mingw? weird
 
Mainly due to my version of mingw-w64.
 
this is why you don't use GCC on windows...
you use clang or cl
 
Dunno tbh, not sure what compiler frontend the project uses
 
mingw is GCC
hence GNUC
 
10:05 AM
Yeah
I wonder what I got for solutions to fix this shiat
Maybe it's better that I ask the mingw-w64 project on sourceforge instead.
 
again... I'd recommend using the nuwen distribution
 
Is that dist most adjusted for windows development?
 
massively
 
10:28 AM
I'll give it a go, reckon I can always ask the maintainer of Nuwen some help.
 
 
8 hours later…
6:06 PM
@Mgetz I was thinking of sending him an email or something lol
 
6:22 PM
@Mgetz I used tried Nuwen's dist and his "sal.h" file have the same "FIXME" comment :/
 
6:55 PM
@Mgetz According to this conversation: https://sourceforge.net/p/mingw-w64/mailman/mingw-w64-public/thread/05a47d18-d959-4b63-0cac-b9ef3013cdef%40126.com/
"> I suggest we comment out `__in` and `__out` from _driverspecs.h_. The
> compatibility with GNU libstdc++ and LLVM libcxx is more essential than
> that with Windows in my opinion."
Looks like uncommenting may be the choice to go lol
 

« first day (1364 days earlier)      last day (1472 days later) »