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