I build my cocos2d application in Debug mode, and the CCLog messages don't show in the debug console, but if I use NSLog the logs show successfully.
CCLOG(@"Start Load"); //not work
NSLog(@"Start Load"); //work successfully
A fast, easy to use, free, and community supported 2D game engine
I build my cocos2d application in Debug mode, and the CCLog messages don't show in the debug console, but if I use NSLog the logs show successfully.
CCLOG(@"Start Load"); //not work
NSLog(@"Start Load"); //work successfully
/*
Ahh, whoops, hadn't upgraded yet. Apologies. I've corrected my post to be more correct, though Clain's way is better.
*/
Try putting this in your projects .pch file:
for cocos2d < v0.8.1
#define DEBUG
for cocos2d >= v0.8.1
#define COCOS2D_DEBUG 1
the cclogs should start working then.
HTH,
Mark
Sorry for bringing up old post, but what exactly should you change in your target settings to get CCLOG to work?
Appears to be "Other C flags". Add a minus before the flag.
edit:
but i cant get that to work. The flag does nothing. When checking if it exists in code using #ifdef, it appears it isn't.
edit2:
putting D in front seems to work, for example -DCOCOS2D_DEBUG (haven't tried that specifically). Is that the way you're supposed to do it?
You must log in to post.