Thanks for the replies... It *should* build with MSVC now. I'm gonna have
to fire up my laptop at some point and try building ROS on that, to find
out.
The main issue I have at the moment is how to get MinGW/GCC to handle
things. As has been pointed out, the header uses MSVC-specific stuff.
So I need to figure out how to do it in a way so that GCC won't regurgitate
it at me later.
Doing this has at least shut up all the warnings about "cdecl" only being
applicable to functions:
#ifndef DEFINE_GUIDEX
#ifdef __GNUC__
#define DEFINE_GUIDEX(name) EXTERN_C const GUID name
#else
#define DEFINE_GUIDEX(name) EXTERN_C const CDECL GUID name
#endif
#endif
Having changed my code now so that it reads:
dev_info = SetupDiGetClassDevsExW(&KSCATEGORY_AUDIO, ......);
It's still doing what it has always done, when linking:
[LD] output-i386/base/services/audiosrv/audiosrv.exe
obj-i386/base/services/audiosrv/pnp.o: In function
`RegisterForDeviceNotifications':
/home/silverblade/ReactOS/reactos/base/services/audiosrv/pnp.c:132:
undefined reference to `_KSCATEGORY_AUDIO'
(this occurs multiple times, whenever KSCATEGORY_AUDIO is used)
I've tried INIT_GUID and PUT_GUIDS_HERE and all the things I can think of
to make it work. i've even tried removing the EXTERN_C from the macros at
the top.
Where am I going wrong?
On Sat, 29 Sep 2007 10:49:11 +0100, "Ged Murphy" <gedmurphy(a)gmail.com>
wrote:
http://www.winehq.org/pipermail/wine-devel/2004-March/025393.html
On 9/28/07, James Tabor
<jimtabor(a)adsl-64-217-116-74.dsl.hstntx.swbell.net>
wrote:
Ged wrote:
> IMO, the 3 solutions are to either
> 1. assign your GUID manually using the { ... { ... }} convention
> 2. change the ksmedia.h header to be more GCC friendly
> 3. add support for __decelspec(uuid()) and __uuidof to our code base.
It
> might be worth checking Wine for this as I
think it's been done by
them
> > before.
> >
> > Hope that helps,
> > Ged.
>
> From wine/include/winnt.h line 76:
>
> #ifndef DECLSPEC_UUID
> # if defined(_MSC_VER) && (_MSC_VER >= 1100) && defined
(__cplusplus)
> # define DECLSPEC_UUID(x) __declspec(uuid(x))
> # else
> # define DECLSPEC_UUID(x)
> # endif
> #endif
> _______________________________________________
> Ros-dev mailing list
> Ros-dev(a)reactos.org
>
http://www.reactos.org/mailman/listinfo/ros-dev
>
--
Andrew