Xtreem
asked on
Linker errors LNK2019/LNK1561 (entry points) building custom wrapper (CRCW) code using C++ interop to use COM API DLL
I have implemented the code on this MSDN page in Visual Studio 2003:
http://msdn2.microsoft.com/library/f31k2c87.aspx
It was created from the 'Add New Project' dialogue using 'Visual C++ Projects>>Empty Project (.NET)', which is an empty project that uses managed extensions for C++.
It compiles but I get a linker error:
error LNK2019: unresolved external symbol _main referenced in function _mainCRTStartup
...which I solved using the Accepted Answer from https://www.experts-exchange.com/questions/21452684/Linker-error-LNK2019-unresolved-external-symbol-main-referenced-in-function-mainCRTStartup.html, namely http://support.microsoft.com/?id=814472.
However, now I'm getting:
fatal error LNK1561: entry point must be defined
Judging from the Accepted Answer in https://www.experts-exchange.com/questions/21452684/Linker-error-LNK2019-unresolved-external-symbol-main-referenced-in-function-mainCRTStartup.html, it would seem that the problem is due to including comdef.h as the Accepted Answer suggests using managed Math class rather than unmanaged math.h for that Question's particular problem, as opposed to the solution described in http://support.microsoft.com/?id=814472
I seem to be almost there, but still got one or two small obstacles yet to overcome. Any ideas?
http://msdn2.microsoft.com/library/f31k2c87.aspx
It was created from the 'Add New Project' dialogue using 'Visual C++ Projects>>Empty Project (.NET)', which is an empty project that uses managed extensions for C++.
It compiles but I get a linker error:
error LNK2019: unresolved external symbol _main referenced in function _mainCRTStartup
...which I solved using the Accepted Answer from https://www.experts-exchange.com/questions/21452684/Linker-error-LNK2019-unresolved-external-symbol-main-referenced-in-function-mainCRTStartup.html, namely http://support.microsoft.com/?id=814472.
However, now I'm getting:
fatal error LNK1561: entry point must be defined
Judging from the Accepted Answer in https://www.experts-exchange.com/questions/21452684/Linker-error-LNK2019-unresolved-external-symbol-main-referenced-in-function-mainCRTStartup.html, it would seem that the problem is due to including comdef.h as the Accepted Answer suggests using managed Math class rather than unmanaged math.h for that Question's particular problem, as opposed to the solution described in http://support.microsoft.com/?id=814472
I seem to be almost there, but still got one or two small obstacles yet to overcome. Any ideas?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This problem was consequential of another problem described in this Question:
https://www.experts-exchange.com/questions/21527418/Problems-compiling-custom-wrapper-CRCW-code-using-C-interop.html
...which was resolved there by an Expert.
This Question shall now be requested to be closed.