开发者

MSVC++ compile only / disable linker

开发者 https://www.devze.com 2023-02-25 04:57 出处:网络
I need to compile some C++ code that will be called from Java with JNI, and these C++ functions have to call an Assembl开发者_如何学编程y function (assembled with NASM), so the C++ functions in the .d

I need to compile some C++ code that will be called from Java with JNI, and these C++ functions have to call an Assembl开发者_如何学编程y function (assembled with NASM), so the C++ functions in the .dll loaded by JNI are just wrappers for the Assembly functions.

But I'm not able to resolve the undefined external reference to the Assembly function before the code has been compiled into a .dll that I can link with my .obj file generated by NASM. So, how do I "disable" the linker so there will be no complaints when I build the C++ module?


To link against the obj files generated by NASM, open the properties of your C++ project, select Configuration Properties > Linker > Input, then add your obj files to the Additional Dependencies list (delimited by semicolons).

0

精彩评论

暂无评论...
验证码 换一张
取 消