在使用mingw进行编译时,我应该包含哪些库?

时间:2013-10-21 09:33:58

标签: c++ linux windows mingw mapi

我正在尝试使用MinGW编译器(在Linux上)为Windows编译MAPI example

我尝试了直截了当的方法:

$ i686-w64-mingw32-g++ swpmain.h swpmain.cpp swap.h swap.cpp
//
// bunch of warnings here...
//
/tmp/ccggw42y.o:swap.cpp:(.text+0x2f9): undefined reference to `_MAPIInitialize@4'
/tmp/ccggw42y.o:swap.cpp:(.text+0x31c): undefined reference to `_MAPIAllocateBuffer@8'
/tmp/ccggw42y.o:swap.cpp:(.text+0x350): undefined reference to `_MAPIUninitialize@0'
/tmp/ccggw42y.o:swap.cpp:(.text+0x41a): undefined reference to `_MAPIAllocateBuffer@8'
/tmp/ccggw42y.o:swap.cpp:(.text+0x445): undefined reference to `_MAPIAllocateBuffer@8'
/tmp/ccggw42y.o:swap.cpp:(.text+0x65f): undefined reference to `_MAPIAllocateBuffer@8'
/tmp/ccggw42y.o:swap.cpp:(.text+0xf5b): undefined reference to `_MAPIFreeBuffer@4'
/tmp/ccggw42y.o:swap.cpp:(.text+0xf6c): undefined reference to `_MAPIFreeBuffer@4'
/tmp/ccggw42y.o:swap.cpp:(.text+0x1782): undefined reference to `_MAPIFreeBuffer@4'
collect2: ld returned 1 exit status

ld错误暗示我忘了包含一些库 - 但我无法弄清楚哪一个。我尝试在usr /中搜索文件,但我只找到mapi.hmapix.h标题 - 没有库。

我在这里做错了什么?

0 个答案:

没有答案