Linking errors in upgrading to 2.2

The other day I decided to upgrade from 2.0 to 2.2. However during compilation I got a whole lot of linking errors. I /thought/ I fixed them all (since it was failing on Box2D) but then it started to fail in finding cocos2dx. Even though it previously passed….

I would like to also mention that HelloCPP, cocos2dx, extensions, CocosDenshion and Box2D compile fine on their own. Any help would be appreciated.

The exact errors are the following:

C:\cocos2dx\cocos2dx\proj.blackberry\Simulator\libcocos2dx.a(CCImage.o): In function `cocos2d::CCImage::_initWithTiffData(void*, int)':
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator/../../../cocos2dx/platform/CCImageCommon_cpp.h:650: undefined reference to `TIFFClientOpen'
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator/../../../cocos2dx/platform/CCImageCommon_cpp.h:658: undefined reference to `TIFFGetField'
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator/../../../cocos2dx/platform/CCImageCommon_cpp.h:659: undefined reference to `TIFFGetField'
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator/../../../cocos2dx/platform/CCImageCommon_cpp.h:660: undefined reference to `TIFFGetField'
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator/../../../cocos2dx/platform/CCImageCommon_cpp.h:661: undefined reference to `TIFFGetField'
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator/../../../cocos2dx/platform/CCImageCommon_cpp.h:662: undefined reference to `TIFFGetField'
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator/../../../cocos2dx/platform/CCImageCommon_cpp.h:673: undefined reference to `_TIFFmalloc'
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator/../../../cocos2dx/platform/CCImageCommon_cpp.h:676: undefined reference to `TIFFReadRGBAImageOriented'
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator/../../../cocos2dx/platform/CCImageCommon_cpp.h:694: undefined reference to `_TIFFfree'
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator/../../../cocos2dx/platform/CCImageCommon_cpp.h:698: undefined reference to `TIFFClose'
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator\libcocos2dx.a(CCImage.o): In function `BitmapDC':
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator/..\..\platform\blackberry/CCImage.cpp:57: undefined reference to `FT_Init_FreeType'
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator\libcocos2dx.a(CCImage.o): In function `~BitmapDC':
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator/..\..\platform\blackberry/CCImage.cpp:65: undefined reference to `FT_Done_FreeType'
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator\libcocos2dx.a(CCImage.o): In function `cocos2d::BitmapDC::buildLine(wchar_t*, unsigned int, FT_FaceRec_*, int, unsigned int)':
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator/..\..\platform\blackberry/CCImage.cpp:123: undefined reference to `FT_Load_Char'
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator\libcocos2dx.a(CCImage.o): In function `cocos2d::BitmapDC::divideString(FT_FaceRec_*, char const*, int, int)':
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator/..\..\platform\blackberry/CCImage.cpp:137: undefined reference to `FT_Load_Char'
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator/..\..\platform\blackberry/CCImage.cpp:153: undefined reference to `FT_Load_Char'
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator/..\..\platform\blackberry/CCImage.cpp:162: undefined reference to `FT_Load_Char'
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator\libcocos2dx.a(CCImage.o): In function `cocos2d::BitmapDC::computeLineStart(FT_FaceRec_*, cocos2d::CCImage::ETextAlign, char, int)':
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator/..\..\platform\blackberry/CCImage.cpp:208: undefined reference to `FT_Get_Char_Index'
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator/..\..\platform\blackberry/CCImage.cpp:208: undefined reference to `FT_Load_Glyph'
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator\libcocos2dx.a(CCImage.o): In function `cocos2d::BitmapDC::getBitmap(char const*, int, int, cocos2d::CCImage::ETextAlign, char const*, float)':
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator/..\..\platform\blackberry/CCImage.cpp:263: undefined reference to `FT_New_Face'
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator/..\..\platform\blackberry/CCImage.cpp:268: undefined reference to `FT_New_Face'
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator/..\..\platform\blackberry/CCImage.cpp:273: undefined reference to `FT_Select_Charmap'
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator/..\..\platform\blackberry/CCImage.cpp:276: undefined reference to `FT_Set_Pixel_Sizes'
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator/..\..\platform\blackberry/CCImage.cpp:307: undefined reference to `FT_Load_Char'
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator/..\..\platform\blackberry/CCImage.cpp:365: undefined reference to `FT_Done_Face'
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator\libcocos2dx.a(CCImageCommonWebp.o): In function `WebPGetFeatures':
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator/../../../cocos2dx/platform/third_party/blackberry/include/libwebp/decode.h:394: undefined reference to `WebPGetFeaturesInternal'
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator\libcocos2dx.a(CCImageCommonWebp.o): In function `WebPInitDecoderConfig':
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator/../../../cocos2dx/platform/third_party/blackberry/include/libwebp/decode.h:429: undefined reference to `WebPInitDecoderConfigInternal'
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator\libcocos2dx.a(CCImageCommonWebp.o): In function `cocos2d::CCImage::_initWithWebpData(void*, int)':
C:\cocos2dx\cocos2dx\proj.blackberry\Simulator/..\..\platform/CCImageCommonWebp.cpp:65: undefined reference to `WebPDecode'
cc: C:/bbndk-2.1.0/host/win32/x86/usr/bin/ntox86-ld caught signal 1

My QCC Links:

QCC Compiler
${workspace_loc:/Box2D}
${QNX_TARGET}/usr/include/freetype2
${QNX_TARGET}/…/target-override/usr/include
…/…/
…/…/Classes
…/…/…/cocos2dx
…/…/…/cocos2dx/include
…/…/…/cocos2dx/platform
…/…/…/cocos2dx/platform/blackberry
…/…/…/cocos2dx/kazmath/include
…/…/…/cocos2dx/platform/third_party/blackberry/include/libtiff
…/…/…/cocos2dx/platform/third_party/blackberry/include/libwebp
…/…/…/CocosDenshion/include
…/…/…/external
…/…/…/extensions

QCC Assembler
${workspace_loc:/Box2D}
${workspace_loc:/cocos2dx}
${workspace_loc:/CocosDenshion}
${workspace_loc:/extensions}

QCC Linker
${workspace_loc:/cocos2dx/Simulator}
${workspace_loc:/extensions/Simulator}
${workspace_loc:/Box2D/Simulator}
${QNX_TARGET}/…/target-override/${CPUVARDIR}/lib
${QNX_TARGET}/…/target-override/${CPUVARDIR}/usr/lib
…/…/…/cocos2dx/proj.blackberry/${ConfigName}
…/…/…/CocosDenshion/proj.blackberry/${ConfigName}
…/…/…/external/Box2D/proj.blackberry/${ConfigName}
…/…/…/cocos2dx/platform/third_party/blackberry/libraries/${CPUVARDIR}

Libraries:
CocosDenshion
Box2D
EGL
GLESv2
bps
curl
xml2
OpenAL
alut
asound
jpeg
png
screen
m
z
extensions
cocos2dx

100% sure you don’t have any stale object files hanging around?

This “Even though it previously passed….” always makes me think about dangling binary objects.

I tried a build clean of everything….
I’ll try again though, this time deleting the libraries and object files

EDIT::

So I went an cleaned everything and made sure there were no libraries or objects files left and it gave the same result.

Hi,

In build setting/search Paths/library seach Paths check below path is added:
“$(SRCROOT)/…/…/…/…/CocosDenshion/third_party/blackberry/libraries/armle-v7”
“$(SRCROOT)/…/…/…/…/CocosDenshion/third_party/blackberry/libraries/x86”
“$(SRCROOT)/…/…/…/…/cocos2dx/platform/third_party/ios/libraries”

@Tian: I’m not quite sure why including an IOS library would make it work for BB?

Also update:
TestCPP compiles fine.
I copied the linking settings exactly for my own project; still fails.

Update:

I ended up just taking a copy of the TestCpp, renaming it, and replacing the classes, resources and bar-descriptor with my own.

It compiles now.