我目前正在努力解决编译器问题。问题是,我使用名为“欧洲国家”(用 C++ 编写)的 MoSync 示例应用程序之一来编写自己的应用程序。但是当我编译修改后的代码时,它给了我以下错误响应:
Controller.cpp:24:错误:未解析的符号“__ZTVN13Flightmanager6FlightE”,
我已经多次查看示例,并且已经将示例中的代码复制到我的示例中,但它没有解决任何问题。在 paticutlar 中,我可能理解错误的含义(我确实有 c 经验),但我从未见过这样的结构化错误。我还查看了命名空间约定,但应该没有任何问题。
//飞行.h
namespace Flightmanager
{
class Flight
{
public:
static int flightCounter;
/**
* The constructor creates the user interface.
*/
Flight(char *flightnumber, char *gate, char *departure, char *additionalinfo, char *destinationairport, char *destinationairportshort) {
this->_id = flightCounter;
flightCounter ++;
this->_flightnumber = flightnumber;
this->_gate = gate;
this->_departure = departure;
this->_additionalinfo = additionalinfo;
this->_destinationairport = destinationairport;
this->_destinationairportshort = destinationairportshort;
}
virtual ~Flight();
}
//控制器.h
#include [all other includes]
#include "../Model/Flight.h"
namespace Flightmanager
{
Controller::Controller():
mFlightArray(NULL),
mCurrentlyShownScreen(NULL)
{
initScreenSizeConstants();
initPlatformType();
//error: Unresolved symbol '__TZVN13Flightmanager6FlightE'.
initData();
//error: Unresoled symbol '__TZVN13Flightmanager6Flight13flightCounterE'.
mFlightTableView = new TableViewController(*this);//error: Unresoled symbol '__TZVN13Flightmanager6Flight13flightCounterE'.
mFlightDetailView = new DetailViewController();
}
}
我使用 MoSync 版本 3.2 构建日期:121219-1556
谢谢