Gen-libs on win32 missing/not working

I’ve previously generated libs on Win32.

I’ve been working on iOS, OSX recently and happily ran gen-libs

Tried to gen-libs for win32 yesterday after a clean pull of the last cocos2d-x 3.17 and Cocos Console v2.3 doesn’t list gen-libs in the help. When I run cocos gen-libs -p win32 it hangs for a while as if it’s searching for something, then I get

Error: argument ‘gen-libs’ not found.
Try with cocos -h

It’s as if I’m missing something, but I have no idea what it is…

Here is the output for cocos-h

C:\cocos2d-x\tools\cocos2d-console\bin/cocos.py 2.3 - cocos console: A command line tool for Cocos2d-x.

Available commands:
run Compiles, deploy and run project on the target.
luacompile Encrypt and/or compile lua files.
deploy Compile and deploy a project to a device/simulator.
compile Compile projects to binary.
gen-simulator Generate Cocos Simulator.
new Creates a new project.
jscompile Compile and/or compress js files.

Available arguments:
-h, --help Show this help information.
-v, --version Show the version of this command tool.
–ol [‘en’, ‘zh’, ‘zh_tr’] Specify the language of output messages.
–agreement [‘y’, ‘n’] Skip the agreement with specified value.

Example:
cocos new --help
cocos run --help

Have you tried the CMake method? I’m assuming gen-libs was used to generate the Cocos2d-x libraries so you wouldn’t have to recompile them every time you clean your project.

Check out the instructions here to see if they’re useful for you:

http://docs.cocos2d-x.org/cocos2d-x/en/installation/CMake-Guide.html#prebuilt-libraries-feature

1 Like

Use Cmake as @R101 mentioned

:frowning: So I have to install something else in order to get this building in prebuilt mode? Has gen-libs been removed from windows cocos console?

Yeah sort of. We are moving to CMake for everything so the effort was put there to keep the build common on any platform you target.

Ok, I’ll ignore for now. I was able to build them just by loading the libs project and building them that way. As I won’t be spending much time with the Windows build I’ll leave it like that for now. I’ll revisit if I have to go to Make on OSX.