简体   繁体   中英

How link .obj files in Visual Studio?

My problem is:

I have compiled LuaJit with VisualStudio and its genereated a.Obj file, a dll and.lib file. i just want to link the.obj file in my win32 application to generate a single EXE file. If its possible,i still need to add the Lua headers?

Thanks anyway.

Use the header file to define LuaJit symbols for your code that deals with Lua.

To link you only need the lib and dll. Add the lib file to your link dependencies under Project Properties > Linker > Input. Put the DLL next to your EXE when you run.

You need to make the project produce a.lib file containing the code (instead of in addition to the dll) and link that. It could be that you can by switching the project setting (look for one labelled lib, or static). Otherwise, you'll have to modify the project settings. (set output type to lib rather than dll).

I never tried linking a.obj file directly, it might be possible. Lib files are more standard.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM