ben pack

No Rank
Points: 0
Hi Roger,
I hope I have found the correct syntax for the .def file:
LIBRARY test_dll
IMPORTS
test_dll.add_one
Using this file, the function 'add_one' in the VS DLL works correctly.
Furthermore I tried to call a class function in a another VS DLL from within the 'add_one' and this works too, which means that it is possible to call a class function in a VS DLL by means of a wrapper function.
Of course, mkexp has to be used again to generat a .a from the class .dll and it it has to be included into the XE project.This was just a first trial, but I expect that it will work in this way.
Again many thanks for spending the coffee break to write the hint with the module definition file which was the solution.
Regards,
Ben
Read More...
Hi Roger,
that had been my assumption too, but that resulted in an error message:
[ilink64 Fehler] Fatal: Error processing .DEF file
Of course IMPORTS makes more sense.
Regards,Ben
Read More...
Hi Roger,
thanks for both responses.I have also seen the article in your second post, but thought it was valid for Win32, but anyway it gives addtional understanding.
Using DLLs created with the XE8 works well as expected.
I never had to use a module definition file before, but created now one whhich looks like
LIBRARY test_dll
EXPORTS
add_one
and added it to the project Unfortunately I still have the linker error as before and an additional warning
[ilink64 Warnung] Warning: Attempt to export non-public symbol 'add_one'
I will look futher in this directions.
Ben
Read More...
Thanks for the hint.
Maybe there is a workaround by using 'C'-style wrapper function to the classes.It means, the C++ Builder calls a C function in the VS DLL, and this function calls class functions within the DLL.
Is there a chnace that it works?
I can't try myself, but will ask the manufacturer of the DLL to generate such a DLL.
Read More...
Sorry for my late response.
I ranmkexp test.a test.dlland added test.a to the project.
I still get the ilink64 unresolved external error:[ilink64 Error] Error: Unresolved external 'test_class::test_class()' referenced from F:\MAINFORM.O
Could it be that the 64-bit VisualStudio dll and lib have COFF format and have to be converted to OMF before (as in 32-bit programs) ?
Or may the include file of the dll class is the problem.It looks like:
class __declspec(dllexport) test_class{public:test_class();~test_class();
bool do_something(float* array, int n);};
Thanks.
Read More...
I have to use a 64-bit DLL created in Visula Studio 2014. Besides the .dll file, the .h (class declaration) and .lib file are supplied.
In the 64-bit version of XE7 I did not see a possibility to add the dll to the 64-bit project.
Is there any description / tutorial how to do so ?
Thanks for help !
Read More...