[quote=“jpo”]I wonder how many people are successfully building JUCE apps with mingw ? Using the version 4.7.2 from http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/gcc-4.7-release/ I was getting link errors with __mingw_uuidof<…> , apparently the uuid of a few COM interfaces used by juce are not available in mingw headers. I had to link the application with the following file in order to fix these link errors:
[code]#ifdef WIN32
#include <windows.h>
#include <shobjidl.h>
#ifndef MSC_VER
#define UUID_DECL(type,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8)
extern “C++” {
static const IID uuid##type = {l,w1,w2, {b1,b2,b3,b4,b5,b6,b7,b8}};
template<> const GUID &_mingw_uuidof() {
return uuid##type;
}
template<> const GUID &__mingw_uuidof<type*>() {
return __mingw_uuidof();
}
}
UUID_DECL(IDataObject, 0x0000010e, 0x0000, 0x0000, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
UUID_DECL(IShellLinkW, 0x000214f9, 0x0000, 0x0000, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
UUID_DECL(IPersistFile, 0x0000010b, 0x0000, 0x0000, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
UUID_DECL(IDropSource, 0x00000121, 0x0000, 0x0000, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
UUID_DECL(IDropTarget, 0x00000122, 0x0000, 0x0000, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
UUID_DECL(IEnumFORMATETC, 0x00000103, 0x0000, 0x0000, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
UUID_DECL(IOleClientSite, 0x00000118, 0x0000, 0x0000, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
UUID_DECL(IOleInPlaceSite, 0x00000119, 0x0000, 0x0000, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
UUID_DECL(IOleInPlaceFrame, 0x00000116, 0x0000, 0x0000, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
UUID_DECL(IStorage, 0x0000000b, 0x0000, 0x0000, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
#endif
#endif
[/code]
But I wonder why nobody else did run into this issue ?[/quote]
Hi,
I can’t compile this file, it returns “error: expected identifier or ‘(’ before string constant” on all UUID_DECL calls.
tried with gcc and g++, several ming error handling configs, sjlj, dw2, even 64bit seh.
I’m new to c++, and I want to stick with gnu for desktop apps, but I’m a little experiencied with c++ macros yet.
Whats the trick to make this work?
Thanks,
Regards