[semi OT] how to link a mingw32 Qt4 app to a msvc6 lib ?

Thiago Macieira thiago at kde.org
Fri Jan 6 22:18:24 CET 2006


Alexander Neundorf wrote:
>#ifdef _MSCVER
>
>#define FOO_CALL __stdcall
>
>#if defined FOO_EXPORTS
>   #define FOO_DLL_SPEC __declspec(dllexport)
>#else
>   #define FOO_DLL_SPEC __declspec(dllimport)
>#endif
>
>#else  // this was the gcc/linux path:
>  #define FOO_CALL
>  #define FOO_DLL_SPEC
>#endif
>
>FOO_DLL_SPEC int FOO_CALL foo_init();
>
>Now I don't know how to define FOO_CALL and FOO_DLL_SPEC with mingw gcc.
> The library is compiled with the settings as given here, i.e. with
> __stdcall. Do I have to use them same with mingw gcc ? Does it use the
> same keywords then ?

Make the mingw codepath above be the same as the MS C codepath. I'm not 
sure about __stdcall, though. If gcc chokes on it, remove. But I am sure 
the declspec stuff works on gcc/win32.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

1. On frumscafte, hwonne time_t wæs náht, se scieppend þone circolwyrde 
wundorcræftlíge cennede and seo eorðe wæs idel and hit wæs gód.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20060106/f32d3861/attachment.pgp


More information about the Kde-buildsystem mailing list