chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] dll import libs for MinGW


From: Brandon J. Van Every
Subject: Re: [Chicken-users] dll import libs for MinGW
Date: Wed, 08 Feb 2006 05:00:01 -0800
User-agent: Thunderbird 1.5 (Windows/20051201)

Sergey Khorev wrote:
BJV> I have been scratching my head wondering why my CMake build doesn't BJV> generate any dll import libraries with MinGW. I find that chicken.h has BJV> lines about __declspec(dllexport) that look wrong. It appears that this BJV> is done only for MSVC compilers. I don't think this is correct. In BJV> particular, MinGW is not at all like Cygwin. The relevant section is:

The MinGW build works so probably the problem is not in Chicken sources but in the way they are built.
I would recommend you to try build Chicken with MSYS and see which commands 
does libtool use to build dll.
Well, CMake doesn't take any automagical advantage of Cygwin or MinGW dll generation or linkage features. This is by design. If you want import libraries, you're supposed to have __declspec(dllexport) in your code like a good little Windows programmer. I think what I'm saying is, Cygwin and MinGW are allowing programmers to be lazy in a way that is not standard drill for Windows programming in general.

Is there any reason to suppress __declspec(dllexport) in a Cygwin or MinGW Autoconf build? If it doesn't hurt anything then they should just all do it the same way.

BTW why do you need import libraries? ld in both MinGW and Cygwin can link to 
dlls directly with the -l swith (e.g. -lchicken will try bind to libchicken.dll 
along with some other filenames)
I do not assume that just because Chicken is built with MinGW that it is going to be used with MinGW. IIUC MinGW and MSVC code are often intermixed. That is, if I grab a library from somewhere I shouldn't have to care whether MinGW or MSVC built it.



Cheers,
Brandon Van Every





reply via email to

[Prev in Thread] Current Thread [Next in Thread]