当前位置: 代码迷 >> Symbian >> symbian open c++ 里头用vector 出错
  详细解决方案

symbian open c++ 里头用vector 出错

热度:1077   发布时间:2013-02-26 00:00:00.0
symbian open c++ 里面用vector 出错
下面是我的Mmp 文件:
SYSTEMINCLUDE   \epoc32\include
SYSTEMINCLUDE   \epoc32\include\stdapis\sys
SYSTEMINCLUDE   \epoc32\include\stdapis\stlport
SYSTEMINCLUDE   \epoc32\include\stdapis
SYSTEMINCLUDE   \epoc32\include\libc

LIBRARY euser.lib apparc.lib cone.lib eikcore.lib
LIBRARY eikcoctl.lib avkon.lib
LIBRARY eikctl.lib etext.lib
LIBRARY aknnotify.lib

LIBRARY esock.lib
LIBRARY bluetooth.lib
LIBRARY btmanclient.lib
LIBRARY sdpagent.lib
LIBRARY sdpdatabase.lib
LIBRARY charconv.lib
LIBRARY aknskins.lib
LIBRARY backend.lib

#ifdef EPOC32
LIBRARY  libstdcpp.lib
#else
FIRSTLIB ../udeb/libstdcpp.lib
STATICLIBRARY   eexe.lib 
#endif

#ifdef WINSCW
OPTION CW -wchar_t on
#endif

还有cpp中的调用:
#include <vector>
#include <string>

int BtSearch(vector<string&> searc_bt_vec);
------解决方案--------------------------------------------------------
STL和STLPORT差不了多少

楼主的错误,应该是基于一个MMP的路径顺序的问题,正确的顺序应该是

SYSTEMINCLUDE \epoc32\include\stdapis
SYSTEMINCLUDE \epoc32/include\stdapis\sys
SYSTEMINCLUDE \epoc32\include\stdapis\stlport

这个顺序不能错,否则编译就会有问题
  相关解决方案