Mathieu Malaterre wrote:
On Mon, May 5, 2008 at 9:21 PM, Mathieu Malaterre
<[EMAIL PROTECTED]> wrote:
On Mon, May 5, 2008 at 9:10 PM, Mathieu Malaterre
<[EMAIL PROTECTED]> wrote:
>
On Mon, May 5, 2008 at 8:59 PM, Bill Hoffman <[EMAIL PROTECTED]> wrote:
> > Mathieu Malaterre wrote:
> >
> >
> > >
> > > -> that's exactly what is driving me nuts, CheckFunctionExists.c is a
> > > 5 line c code, it forward declare the function but does not include
> > > *anything*.
> > >
> > That is what concerns me, it does not include anything. It maybe
required
> > to include something to find the symbol...
> >
> >
> > >
> > > And I can confirm that compilation by hand works:
> > >
> > > /usr/local/bin/gcc.exe -DCHECK_FUNCTION_EXISTS=UuidCreate -o foo.o
> > > -c /usr/share/cmake-2.4.8/Modules/CheckFunctionExists.c
> > >
> > > ...
> > >
> > >
> > Use debug-trycompile.
> >
> > Then cd into the directory and run make, what is different than what
works?
>
> no :(
>
> If that help here is the nm dump of rpcrt4:
>
> $ nm /lib/w32api/librpcrt4.a | grep UuidCre
> 00000000 T [EMAIL PROTECTED]
> 00000000 I [EMAIL PROTECTED]
> 00000000 T [EMAIL PROTECTED]
> 00000000 I [EMAIL PROTECTED]
> 00000000 T [EMAIL PROTECTED]
> 00000000 I [EMAIL PROTECTED]
> 00000000 T [EMAIL PROTECTED]
> 00000000 I [EMAIL PROTECTED]
>
> So it's definitely there.
>
> And grep in /usr/include/w32api, I get:
>
> rpcdce.h:RPC_STATUS RPC_ENTRY UuidCreate(UUID*);
> rpcdce.h:RPC_STATUS RPC_ENTRY UuidCreateNil(UUID*);
> rpcdce.h:RPC_STATUS RPC_ENTRY UuidCreateSequential(UUID*);
> rpcdce2.h:RPC_STATUS RPC_ENTRY UuidCreateNil(UUID*);
> rpcdcep.h:long __stdcall I_UuidCreate(GUID*);
>
> ...
>
>
> --
> Mathieu
>
Is there a difference in between:
__attribute__((__stdcall__))
and
__attribute__((__cdecl__))
Thanks,
--
Mathieu
Yup that did it:
char __attribute__((__stdcall__)) UuidCreate(void*);
int main()
{
UuidCreate(0);
return 0;
}
So there is a mangling that is not cdecl compatible...
Any suggestions ?
Yes, write your own try compile that #includes windows.h for the
declaration of UuidCreate.
-Bill
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake