5 messages in com.mysql.lists.plusplusRe: Building Shared library with mingw| From | Sent On | Attachments |
|---|---|---|
| Carlos Flores | 25 Mar 2006 15:19 | |
| Warren Young | 31 Mar 2006 07:53 | |
| Carlos Flores | 03 Apr 2006 14:12 | |
| Warren Young | 04 Apr 2006 16:57 | |
| Carlos Flores | 18 Apr 2006 11:40 |
| Subject: | Re: Building Shared library with mingw![]() |
|---|---|
| From: | Carlos Flores (caf...@gmail.com) |
| Date: | 04/18/2006 11:40:57 AM |
| List: | com.mysql.lists.plusplus |
Warren Young wrote
Evil has nothing to do with it. They are _necessary_ for Visual C++, and I thought they were necessary for MinGW since GCC supports the syntax.
But this comment of yours made me wonder, what happens if you try to build a DLL with the declspecs turned off? Guess what: it works! I don't know why MinGW's GCC bothers to support this syntax if it doesn't do the right thing with it.
In fact there is a little history behind the _decspec(dllexport/dllimport), they seemed to have a lot of usage for address translation in the days of DOS and win16, which where almost the same thing. Their work was to provide (at compile time) the addresses that the system will give inside the memory of the program in order to emulate static library behavior, but it does not happens any more on win32 (and surely win64) so I think the keywords were left for compatibility and/or new behavior of address translation.
MinGW supports it because it needs to use the native built libraries of the system, and they are all marked with those keywords, so they added ld som e new interfaces, auto-import, auto-export and runtime-pseudo-relloc, which are workaround for importing UNIXish libraries to windows.




