Home > Back-end >  Call a header file failed
Call a header file failed

Time:09-28

So I write a vc + + libraries and header files into c + + builder projects,
Lib file has been through the console can be used in BCB, but in the calling header file times wrong, screenshots are as follows:



How to settle for guidance is why thank you

CodePudding user response:

Your top one for help

CodePudding user response:

Your top one

CodePudding user response:

Come on come on come on

CodePudding user response:

You said library, it is to point to. The lib? VC lib format, unlike c + + Builder, can't use them directly, namely use of conversion tool, is not 100% sure,

CodePudding user response:

reference 4 floor ccrun response:
library, you said mean. Lib? VC lib format, unlike c + + Builder, can't use them directly, namely the use of conversion tool, is not 100% sure,


But the error the head file class has question is why

CodePudding user response:

reference 5 floor hzm_michael reply:
but error the head file class has a problem is why


No, the error message you no understand,
[Link Error] Unresolved external 'XXX' referenced from XXX
This is no connection between the tip and header files, header files only used at compile time, the tip is link error, usually one part and the realization of the function object is not found in your question, you said a written using vc + + library, but you didn't say in a dynamic library or static library, if it is a dynamic library, need to use the import generates c + + Builder can import library (lib) file and then add to the project, if it is vc + + static library, try format conversion,

CodePudding user response:

refer to 6th floor ccrun response:
Quote: refer to the fifth floor hzm_michael reply:

But an error the head file class has a problem is why


No, the error message you no understand,
[Link Error] Unresolved external 'XXX' referenced from XXX
This is no connection between the tip and header files, header files only used at compile time, the tip is link error, usually one part and the realization of the function object is not found in your question, you said a written using vc + + library, but you didn't say in a dynamic library or static library, if it is a dynamic library, need to use the import generates c + + Builder can import library (lib) file and then add to the project, if it is vc + + static library, trying to convert format.

Is a dynamic library, I can generate c + + builder.lib file,

Header files inside the statement class,


The class __declspec (dllexport) cUsbComm
//class cUsbComm: public CWnd
{
Public:
CUsbComm ();
Virtual ~ cUsbComm ();

CodePudding user response:

When dynamic library export with export
Import library is introduced into the time to use the import
In addition you is this DLL export VC classes, in c + + Builder, problems will be a lot,
  • Related