4
我正在使用autotools作爲我的庫的構建系統。最近庫被移植到Windows。圖書館編譯和鏈接成功,雖然我遇到了一個奇怪的錯誤。配置和製作後只有靜態庫。 Evertything看起來不錯,除了從libtool
警告:libtool:未定義符號不允許t in i686-pc-mingw32共享
libtool: undefined symbols not allowed in i686-pc-mingw32 shared
我已經通過這個代碼導出爲Windows計算機上的所有符號:
#ifdef _WIN32
# ifdef DLL_EXPORT
# define LIBRARY_API __declspec(dllexport)
# else
# define LIBRARY_API __declspec(dllimport)
# endif
#endif
#ifndef _WIN32
# define LIBRARY_API
#endif
,並在每一個單一的定義,我有:
class LIBRARY_API myClass {
// ...
筆記:
Opera婷系統:Windows 8的x86_64的
編譯器套件:MinGW的x86_64的,MSYS 86