- make your DLL file with export symbols project by VC++, you should have AAA.dll and AAA.lib
- to generate libAAA.a for msys or cygwin to use, you should:
- generate AAA.def by pexports.exe in msys
% pexports.exe AAA.dll > AAA.def - generate libAAA.a by dlltool.exe in msys
% dlltool.exe -D AAA.dll -d AAA.def -l libAAA.a
- generate AAA.def by pexports.exe in msys
- remember to re-define AAAAPI_EXPORTS as blank which is generated by VC++ in AAA.h as you create the export symbol project.
#define AAAAPI_EXPORTS __declspec(dllimiport)
--> #define AAAAPI_EXPORTS
or you will get the link error:
error LNK2001: unresolved external symbol __imp__FUNC
「msys’s Road」分類文章彙整
use VC++ generated DLL files in msys
發文作者 cotton5415 於 四月 25, 2010
發表於 msys's Road, Win32's Road | 已加上的標籤: cotton5415, dll, msys dll, msys imp__, msys vc++, msys __imp__ | 張貼留言 »