library is corrupt when calling predicates from C/C++ on both 64bit platforms
Posted: 2 Jul 2021 11:53
A c/c++ 64bit project is set up to call predicates inside a visual prolog 10 project which is also 64bit. The c++ declaration is:
The predicates is:
and the def file was added with
EXPORTS
connection
The exported function "connection" has been found through tool dumpbin /exports, However, when the c++ project was compiled, it showed "error LNK1127 library is corrupt"(the lib file generated by visual prolog). I checked the similar code on both 32bit platforms, it worked well. Is there is a solution as my main program is large and is c++ 64bit?
Thanks
Jonasydy
Code: Select all
extern "C" wchar_t * connection(const wchar_t * STR);
Code: Select all
connection : (string STR) -> string ConnectionValid language stdcall as "connection".
EXPORTS
connection
The exported function "connection" has been found through tool dumpbin /exports, However, when the c++ project was compiled, it showed "error LNK1127 library is corrupt"(the lib file generated by visual prolog). I checked the similar code on both 32bit platforms, it worked well. Is there is a solution as my main program is large and is c++ 64bit?
Thanks
Jonasydy