简体   繁体   中英

Compilation error when using LuaPlus

I found a nice tutorial on how to implement LuaPlus into an C++ Project using Visual Studio 2010.
http://www.zynox.net/luaplus-1-compiling-basic-usage/ But I can't get it to work because of some error messages..

mainproject\main.cpp(51): error C2664: ‘GetCurrentDirectoryW’ : cannot convert parameter 2 from ‘char [260]‘ to ‘LPWSTR’

50. char pPath[ MAX_PATH ];
51. GetCurrentDirectory(MAX_PATH,pPath);
52. strcat_s(pPath,MAX_PATH,"\\test.lua");

I tried to use TCHAR instead of char, but then it says:

no instance of overloaded function “strcat_s” matches the argument list

So for testing purposes I just deleted these three lines and replaced them with a static path:

const char* pPath = "C:\\Users\\fancyBubble\\Documents\\Visual Studio 2010\\Projects\\LuaPlusTutorial\\MainProject\\test.lua";

and now I get:

fatal error LNK1104: cannot open file ‘..\Debug\LUAPlus.lib’

I'm absolutely clueless how to fix this. I even tried to use the same version of LuaPlus that the tutorial-creator probably used, but the error messages didn't go away.

I don't really know what I did wrong, but the admin uploaded the whole solution:
http://www.zynox.net/?wpfb_dl=3

Using this combined with greatwolf's comment it works great. :)

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