0
我试图让TIdTCPClient在我的非可视组件运行。我以下内容添加到我的.h文件中:
#include "IdBaseComponent.hpp"
#include "IdComponent.hpp"
#include "IdTCPClient.hpp"
#include "IdTCPConnection.hpp"
...
private:
TIdTCPClient *mTCPClient;
这一切编译罚款,但当然不包括印在构建呢。
所以,我做这在我的.cpp文件:
#pragma link "IdBaseComponent"
#pragma link "IdComponent"
#pragma link "IdTCPClient"
#pragma link "IdTCPConnection"
...
mTCPClient = new TIdTCPClient(NULL);
编译过程中出现了:
[ILINK32 Error] Fatal: Unable to open file 'IDBASECOMPONENT.OBJ'
这一切工作,如果我只是拖放组件到窗体上,同线添加为我手动添加在我的组件(除了新的),它都编译好。我无法弄清楚。
感谢
我最终在.cpp中添加了#pragma link“IndyCore.bpi”并且工作正常。似乎从$(BDS)\ lib获得相同的发布和调试版本库。这当然会得到发布版本,所以你的方式更好。 – 2010-02-16 15:16:02