(1)
/libstdc%2B%:-No-such-file-or-directory(gcc-4.4.0)-
libstdc++.: No such file or directory(gcc-4.4.0)
Because d:/msys/mingw/lib/gcc/mingw32/4.4.0/libstdc++. does not exist.
Try to hack d:/msys/mingw/lib/gcc/mingw32/4.4.0/libstdc++.la and change
library_names to an empty string
(2)
/u1/52454/showart_1280627.html
This should create (the Win32 shared library) and (the Win32 import library for the DLL).
(3)
/cygwin-ug-net/#dll-build
However, if you are building a dll as an export library, you will probably want to use the complete syntax:
gcc -shared -o cyg${module}.dll /
-Wl,--out-implib=lib${module}. /
-Wl,--export-all-symbols /
-Wl,--enable-auto-import /
-Wl,--whole-archive ${old_libs} /
-Wl,--no-whole-archive ${dependency_libs}
The name of your library is ${module}, prefixed with cyg for the DLL and lib for the import library.
Cygwin DLLs use the cyg prefix to differentiate them from native-Windows MinGW DLLs, see the MinGW website for more details.
${old_libs} are all your object files,
bundled together in static libs or single object files and the ${dependency_libs} are import libs you need to link against,
'-lpng -lz -L/usr/local/special -lmyspeciallib'.
(4)
/blog/404580
有了dll文件需要导出def文件:
pexports >
有了dll和def文件,需要导出MinGW的.a文件:
dlltool --dllname --def --output-lib
有了dll和def文件,需要导出一个VC的lib文件:
lib /machine:i386 /def:
注意:
C++的dll不具有2进制级别的共享性,也就是说VC的MinGW的C++ dll不能混用。
而C的可以。
pexports和dlltool的MinGW的工具,lib是VC的工具。