I’m using cocos2d-x 3.7.1. I don’t get any console log output in XCode when calling cc.log from javascript. I’m using debug build but still no output. If I use the CCLOG macro from C++ it works fine, but no javascript logs are routed to my console.
Do you have any ideas how I get it work / what I’m doing wrong?
I’ve had the same issue with the latest master (~v3.8) and pre-built binaries after running cocos gen-libs with default arguments. The key here is that -m release is the default setting and cocos does only write logs in the debug mode.
I have the same problem with cc.log in javascript (cocos2d-x v3.8).
If I apply your solution the cc.log works fine … BUT … if I want to rebuild my win32 simulator it fail with this errors:
13:53:08 1> 0 File(s) copied
13:53:08 1>RuntimeJsImpl.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:LBR' specification
13:53:08 1>libjscocos2d_2013.lib(js_manual_conversions.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in RuntimeJsImpl.obj
13:53:08 1>libjscocos2d_2013.lib(js_manual_conversions.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in RuntimeJsImpl.obj
13:53:08 1>libjscocos2d_2013.lib(ScriptingCore.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in RuntimeJsImpl.obj
.....
13:53:09 1>libSpine_2013.lib(spine-cocos2dx.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in RuntimeJsImpl.obj
13:53:10 1>libSpine_2013.lib(spine-cocos2dx.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in RuntimeJsImpl.obj
13:53:10 1> Creating library C:\Users\Petr\Projects\Cocos\TechsophiaSamples\SmaughTest\frameworks\runtime-src\proj.win32\Debug.win32\SmaughTest.lib and object C:\Users\Petr\Projects\Cocos\TechsophiaSamples\SmaughTest\frameworks\runtime-src\proj.win32\Debug.win32\SmaughTest.exp
13:53:10 1>MSVCRT.lib(cinitexe.obj) : warning LNK4098: defaultlib 'msvcrtd.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
13:53:10 1>C:\Users\Petr\Projects\Cocos\TechsophiaSamples\SmaughTest\frameworks\runtime-src\proj.win32\../../../simulator/win32/SmaughTest.exe : fatal error LNK1319: 162 mismatches detected
13:53:10 ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========