开发者

How to use an OBJ file?

开发者 https://www.devze.com 2023-01-24 16:00 出处:网络
I encountered a very interesting thing.Somebody开发者_JS百科 gave me only an OBJ file, even not C/C++ header file. But I have a few signatures of the functions in the OBJ file. Can I use only these si

I encountered a very interesting thing. Somebody开发者_JS百科 gave me only an OBJ file, even not C/C++ header file. But I have a few signatures of the functions in the OBJ file. Can I use only these signatures and obj file to Link the code in the OBJ file to my app?

If it works, how I can do it? I get not point now.

Thanks in advance!


During the link step, simply add the object file to the sources. How to do this varies with the compiler and linker used, but it may be as simple as adding it to the compilation command line.

Note that C++ uses different name-mangling rules from C, and you may need to use extern "C".

0

精彩评论

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

关注公众号