开发者

placing Indy TIdTCPClient into a non-visual package

i All,

I am trying to get TIdTCPClient to run in my non-visual component. I add the following to my .h file:

#include "IdBaseComponent.hpp"
#include "IdComponent.hpp"
#include "IdTCPClient.hpp"
#include "IdTCPConnection.hpp"
...
private:
   TIdTCPClient *mTCPClient;

It all compiles fine, but of course Indy is not included in the build yet.

So I do this in my .cpp file:

#pragma link "IdBaseComponent"
#pragma link "IdComponent"
#pragma link "IdTCPClient"
#pragma link "IdTCPConnection"
...
mTCPClient = new TIdTCPClient( NULL );

during compile I get:

[ILINK32 Error] Fatal: Unable to open file 'IDBASECOMPONENT.OBJ'
开发者_Go百科

This all works if I just drop the component onto a form, the same lines are added as I manually add in my component (except the new) and it all compiles fine. I can't figure it out.

Thanks


Have you tried adding the Indy package to your Requires section, just add the required .bpi files from the lib folder in the CodeGear installation path.

You can do this by the Project menu:

Project > Add to Project... (Shift+F11) > Requires > Browse...

Find the Indy*.bpi files in either lib\Debug or lib\Release and add the required ones to your project.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜