Home > Back-end >  Call the previous CTP technology in XE3 comprehensive trading platform API interface problems
Call the previous CTP technology in XE3 comprehensive trading platform API interface problems

Time:09-27

I am using XE3 CTP development using the previous technology in integrated trading platform API interface, call DLL a derived class object creation times [ilink32 Error] Error: Unresolved external 'CThostFtdcTraderApi: : CreateFtdcTraderApi (const char *, const const bool)' referenced the from E: \ AUTOTRADETEST \ WIN32 \ DEBUG \ UNIT1 OBJ Error, I have used before using this DLL implib LIB to libraries to regenerate the also not line, ask ace to give directions, should how to solve some problems,

CodePudding user response:

You put the VC part of the source code posted

CodePudding user response:

The key is generated by the lib files are added to the project?

CodePudding user response:

refer to the original poster cofcocj8 response:
I am using XE3 CTP development using the previous technology in integrated trading platform API interface, call DLL a derived class object creation times [ilink32 Error] Error: Unresolved external 'CThostFtdcTraderApi: : CreateFtdcTraderApi (const char *, const const bool)' referenced the from E: \ AUTOTRADETEST \ WIN32 \ DEBUG \ UNIT1 OBJ Error, I have used before using this DLL implib LIB to libraries to regenerate the also not line, ask ace to give directions, should how to solve some problems,



BCB using vc DLL is used to derive the classes, it is not feasible method, because of two kinds of the compiler class memory distribution processing is different, unless the DLL can output binary compatibility (compiler) interface,


CodePudding user response:

reference fxworld reply: 3/f
BCB using vc DLL is used to derive the classes, it is not feasible method, because the memory distribution of two kinds of the compiler class processing is not the same, unless the DLL can output binary compatibility (compiler) interface,


I now application is written in VC DLL export class, the use of c + + Builder in the UI, call DLL in the class,
DLL export class design pattern is very important,

CodePudding user response:

reference 4 floor ccrun response:
I now application is written in VC DLL export class, the use of c + + Builder in the UI, call DLL in class,
DLL export class design pattern is very important,


It should be binary compatibility, such as output class as a base class does not contain class variables, don't virtual destructor, add a deleteself member function, derived class is the best pure abstract class, interface is basically using c + + class, and COM interfaces are basically the same,

Or limit without so much?


CodePudding user response:

Yes, pure virtual class, a similar interface pattern, the advantage is high compatibility, the generated DLL export classes can be directly used in c + +/Delphi,

CodePudding user response:

thank you very much

CodePudding user response:

Lz is finally how to solve? I lib is generated and added to the project, or a newspaper would error,
PUserApi=CThostFtdcTraderApi: : CreateFtdcTraderApi ();

The header file
The class TRADER_API_EXPORT CThostFtdcTraderApi
{
Public:
///to create TraderApi
///@ param pszFlowPath store subscription information file directory, default to the current directory
///@ return create UserApi
The static CThostFtdcTraderApi * CreateFtdcTraderApi (const char * pszFlowPath="");
.
};

CodePudding user response:

VC directly derived CLASS that other programmers don't think for the VC programmers use, encounter this kind of situation I general processing method is to use VC to packaging, export standard C function calls to C + + BUILDER or any other language, including to use C #,

CodePudding user response:

The building Lord, how much do you QQ? I want to ask you some questions, we must have a complementary,
  • Related