cocos2d / cocos2d-x

Cocos2d-x is a suite of open-source, cross-platform, game-development tools utilized by millions of developers across the globe. Its core has evolved to serve as the foundation for Cocos Creator 1.x & 2.x.
https://www.cocos.com/en/cocos2d-x
18.22k stars 7.05k forks source link

Error compiling SimpleGame for BlackBerry target #2101

Closed ghost closed 11 years ago

ghost commented 11 years ago

I receive the following error when compiling the SimpleGame sample:

qcc -o SimpleGame main.o Classes/HelloWorldScene.o Classes/GameOverScene.o Classes/AppDelegate.o -lcocos2dx -lCocosDenshion -lEGL -lGLESv2 -lbps -lcurl -lxml2 -ltiff -ljpeg -lpng -lfreetype -lscreen -lm -lz -lOpenAL -lalut -lasound -V4.6.3,gcc_ntoarmv7le_cpp -w1 -lang-c++ -g -Wl,-z,relro -Wl,-z,now -L/Applications/bbndk/target_10_x_x_xxx/qnx6/../target-override/armle-v7/lib -L/Applications/bbndk/target_10_x_x_xxx/qnx6/../target-override/armle-v7/usr/lib -L../../../../../cocos2dx/proj.blackberry/Device-Debug -L../../../../../CocosDenshion/proj.blackberry/Device-Debug -L../../../../../cocos2dx/platform/third_party/blackberry/libraries/armle-v7 -Wl,../../../../../cocos2dx/proj.blackberry/Device-Debug/libcocos2dx.a

../../../../../cocos2dx/proj.blackberry/Device-Debug/libcocos2dx.a(CCImageCommonWebp.o): In function WebPGetFeatures': /Users/doturner/Documents/workspace-bbndk/cocos2d-x/cocos2dx/proj.blackberry/Device-Debug/../../../cocos2dx/platform/third_party/blackberry/include/libwebp/decode.h:394: undefined reference toWebPGetFeaturesInternal'

ghost commented 11 years ago

This is caused by the webp library not being included in the linker libraries. Solution is to add it:

image

ghost commented 11 years ago

Needs fixing by updating the project properties of the samples

djogon commented 11 years ago

Unfortunately - I get the same error even though -lwebp is included in linking parameters. See below

\ Internal Builder is used for build ** qcc -o main.o ../main.cpp -V4.6.3,gcc_ntoarmv7le_cpp -w1 -I/Applications/bbndk/target_10_1_0_1020/qnx6/usr/include/freetype2 -I/Applications/bbndk/target_10_1_0_1020/qnx6/../target-override/usr/include -I../../Classes -I../../../ -I../../../cocos2dx -I../../../cocos2dx/include -I../../../cocos2dx/kazmath/include -I../../../cocos2dx/platform -I../../../cocos2dx/platform/blackberry -I../../../CocosDenshion/include -D_FORTIFY_SOURCE=2 -c -g -fstack-protector-strong qcc -o Classes/HelloWorldScene.o ../../Classes/HelloWorldScene.cpp -V4.6.3,gcc_ntoarmv7le_cpp -w1 -I/Applications/bbndk/target_10_1_0_1020/qnx6/usr/include/freetype2 -I/Applications/bbndk/target_10_1_0_1020/qnx6/../target-override/usr/include -I../../Classes -I../../../ -I../../../cocos2dx -I../../../cocos2dx/include -I../../../cocos2dx/kazmath/include -I../../../cocos2dx/platform -I../../../cocos2dx/platform/blackberry -I../../../CocosDenshion/include -D_FORTIFY_SOURCE=2 -c -g -fstack-protector-strong qcc -o Classes/AppDelegate.o ../../Classes/AppDelegate.cpp -V4.6.3,gcc_ntoarmv7le_cpp -w1 -I/Applications/bbndk/target_10_1_0_1020/qnx6/usr/include/freetype2 -I/Applications/bbndk/target_10_1_0_1020/qnx6/../target-override/usr/include -I../../Classes -I../../../ -I../../../cocos2dx -I../../../cocos2dx/include -I../../../cocos2dx/kazmath/include -I../../../cocos2dx/platform -I../../../cocos2dx/platform/blackberry -I../../../CocosDenshion/include -D_FORTIFY_SOURCE=2 -c -g -fstack-protector-strong qcc -o HelloCocos2D main.o Classes/HelloWorldScene.o Classes/AppDelegate.o -lCocosDenshion -lwebp -lEGL -lGLESv2 -lbps -lcurl -lxml2 -lOpenAL -lalut -lasound -ljpeg -lpng -lfreetype -lscreen -lm -lz ...ETC...

../../../cocos2dx/proj.blackberry/Device-Debug/libcocos2dx.a(CCImageCommonWebp.o): In function WebPGetFeatures': /Users/djogon/Projects/cocos2d-2.1rc0-x-2.1.2/cocos2dx/proj.blackberry/Device-Debug/../../../cocos2dx/platform/third_party/blackberry/include/libwebp/decode.h:394: undefined reference toWebPGetFeaturesInternal' ../../../cocos2dx/proj.blackberry/Device-Debug/libcocos2dx.a(CCImageCommonWebp.o): In function WebPInitDecoderConfig': /Users/djogon/Projects/cocos2d-2.1rc0-x-2.1.2/cocos2dx/proj.blackberry/Device-Debug/../../../cocos2dx/platform/third_party/blackberry/include/libwebp/decode.h:429: undefined reference toWebPInitDecoderConfigInternal' ../../../cocos2dx/proj.blackberry/Device-Debug/libcocos2dx.a(CCImageCommonWebp.o): In function cocos2d::CCImage::_initWithWebpData(void*, int)': /Users/djogon/Projects/cocos2d-2.1rc0-x-2.1.2/cocos2dx/proj.blackberry/Device-Debug/../../platform/CCImageCommonWebp.cpp:65: undefined reference toWebPDecode' cc: /Applications/bbndk/host_10_1_0_132/darwin/x86/usr/bin/ntoarm-ld error 1 Build complete for project HelloCocos2D

I verified that libwebp.a is in the proper place (along with libtiff.a)

Any ideas?

djogon commented 11 years ago

figured it out. One has to go to "Extra Options" under QCC linker and add the webp library there. tiff library is already in there webp is missing. Sigh.

adagar commented 11 years ago

Where are you guys accessing these properties? I'm not seeing them in xcode.

minggo commented 11 years ago

BlackBerry is not supported because of c++ 11.

godyZ commented 11 years ago

@doturner Please, could you open a bug in redmine in future? We are in process of migrating all the issues to redmine and github issue won't be available after August.