Setting up a new project

Hello there. Been a while since the last time I have visited these forums :smile:

I am trying to build cocos2dx on windows 7(x64) and having some issues.

I have tried installing VS2015 express and VS2013 express and use the “cocos compile -p win32” command. No luck: saying that it cannot find VS2012/13 in the registry. I have also tried to build the game with QtCreator (my first choice) and no luck also, it says: “:-1: error: LNK1104: cannot open file ‘luacocos2d.lib’”.

What is this library?
Is this the cocos2d lua binding lib?
Where can I find/build it?

Thanks

what version of Cocos2d-lua are you using?

cocos2d-x-3.10, Newest atm i guess

Edit: I also see this in the CMakeLists
target_link_libraries(${APP_NAME} cocos2d luacocos2d)

luacocos2d ???

I think this is it :smile:
I found this: \cocos2d-x-3.10\cocos\scripting\lua-bindings\proj.win32\libluacocos2d.vcxproj

Its getting late here, but I am trying this first thing in the morning

UPDATE: I saw that there is a variable BUILD_LUA_LIBS in CMake so if anyone is trying to manually configure it using cmake just check this option. This library that is missing is actually the lua code-base + cocos lua extensions (hence the name ‘luacocos2d’) :smile:

Still having issues. How to resolve:

“Can’t find correct Visual Studio’s path in the registry”

I dont know what I am doing wrong here.

I have tried it on: Window7 x64, Ubuntu x64, Ubuntu x86 and nothing. I have noticed that when I create new Lua project and try to compile it first fails since there is a cpp file that is ommited lua_module_registered.cpp. After I try fixing it it compiles but it wont run. Error: “libraries: libfmod.so.6: cannot open shared object file: No such file or directory” even though I have the library in both 32 and 64 bit version… Isnt this supposed to be a trivial task - setting up a new project in cocos?

Help is appreciated

I don’t do a lot of Windows things. I can run cocos new MyTest -p com.com.com -l lua -d .
and it makes a new project. I open the XCode project and compile and it runs.

I am not sure how to help you on Windows.

Hello everyone! I want to use lua code in my cpp code and vice versa. For now I found some functions in documentation that sounds like thay can help me. ScriptHandlerMgr::addObjectHandler, LuaStack::executeFunction, but I cant found samples how to use this in my code! If some experienced lua programmers read this please help me and show some code examples and may be simple source or tutorials. Thanks