Copying VComponents into Cocoa app
Shaun Wexler
dev at macfoh.com
Tue Jun 20 20:18:14 CDT 2006
On Jun 20, 2006, at 4:28 PM, Matthew Jew wrote:
> 0 libvshared_fat_release.dylib 0x0065ac88 fbl::String::String
> [in-charge](char const*, long, char const*, fbl::EStringImpType) + 64
> 1 libvshared_fat_release.dylib 0x00641570
> fbl::Location_Disk_FSSpec::get_Path() const + 96
> 2 libvkernel_fat_release.dylib 0x01030268
> fbl::Valentina_Init_ICU() + 52
> 3 libvkernel_fat_release.dylib 0x010305f0 fbl::ValentinaInit
> (unsigned long, char*, char*) + 68
>
> Binary Images Description:
> 0x1000 - 0x21fff com.yourcompany.RadiusAuthenticator2
> RadiusAuthenticator2 version 2.0 (2.0) /Volumes/Alpha2/Dev-
> ProjectBuilder/Cocoa-Projects/RadiusAuthenticator2/build/Release/
> RadiusAuthenticator2.app/Contents/MacOS/RadiusAuthenticator2
> 0x39000 - 0x3ffff libicuio.dylib /usr/local/lib/vcomponents/
> libicuio.dylib
> 0x205000 - 0x2c5fff libicui18n.dylib /usr/local/lib/
> vcomponents/libicui18n.dylib
> 0x352000 - 0x3e8fff libicuuc.dylib /usr/local/lib/vcomponents/
> libicuuc.dylib
> 0x639000 - 0x6b2fff libvshared_fat_release.dylib /usr/local/
> lib/vcomponents/libvshared_fat_release.dylib
> 0x1008000 - 0x14c3fff libvkernel_fat_release.dylib /usr/local/lib/
> vcomponents/libvkernel_fat_release.dylib
> 0x19ce000 - 0x21f7fff libicudata.dylib /usr/local/lib/vcomponents/
> libicudata.dylib
> 0x21fa000 - 0x2251fff libvclient_fat_release.dylib /usr/local/lib/
> vcomponents/libvclient_fat_release.dylib
> 0x2873000 - 0x2982fff VSDK /usr/local/lib/vcomponents/
> VSDK.framework/Versions/A/VSDK
> 0x2e18000 - 0x2ed8fff libicui18n.dylib /Volumes/Alpha2/Dev-
> ProjectBuilder/Cocoa-Projects/RadiusAuthenticator2/build/Release/
> RadiusAuthenticator2.app/Contents/VComponents/libicui18n.dylib
> 0x2f65000 - 0x2f6bfff libicuio.dylib /Volumes/Alpha2/Dev-
> ProjectBuilder/Cocoa-Projects/RadiusAuthenticator2/build/Release/
> RadiusAuthenticator2.app/Contents/VComponents/libicuio.dylib
> 0x16617000 - 0x16690fff libvshared_fat_release.dylib /Volumes/
> Alpha2/Dev-ProjectBuilder/Cocoa-Projects/RadiusAuthenticator2/build/
> Release/RadiusAuthenticator2.app/Contents/VComponents/
> libvshared_fat_release.dylib
> 0x16d05000 - 0x171c0fff libvkernel_fat_release.dylib /Volumes/
> Alpha2/Dev-ProjectBuilder/Cocoa-Projects/RadiusAuthenticator2/build/
> Release/RadiusAuthenticator2.app/Contents/VComponents/
> libvkernel_fat_release.dylib
> 0x176cb000 - 0x17ef4fff libicudata.dylib /Volumes/Alpha2/Dev-
> ProjectBuilder/Cocoa-Projects/RadiusAuthenticator2/build/Release/
> RadiusAuthenticator2.app/Contents/VComponents/libicudata.dylib
>
> 0x908dd000 - 0x909dffff libicucore.A.dylib /usr/lib/
> libicucore.A.dylib
>
> What else should I be doing?
You're doing too much! Actually, there are 3 sets of ICU libraries
linked into your app simultaneously. See above. ;)
1. /usr/local/lib/vcomponents/*
2. Contents/VComponents/*
3. /usr/lib/libicucore.dylib
Remove ALL library and framework search paths from your target(s),
deselect all libraries and frameworks, and only select the embedded
copies of the lib's... ie delete the references to /usr/local/lib/
vcomponents, and drag the embedded copies into your project and
select them for the target. Xcode 2.3 improperly leaves multiple
library path garbage in target build settings, so you'll have to
clean them up yourself. This is most likely the cause of the
problem; one lib is initialized, the other is not, but some things
are calling functions in the latter.
Also, the VX project uses the built-in ICU (#3) from Mac OS X. While
we were getting VX working, I had Ruslan remove the "icu_3_0::"
namespace from Valentina's ICU classes and change it to the default
"icu::" which is used by the system's libicucore. It's possible that
you [or paradigma] may have built some recent classes with the icu::
namespace enabled and some of the String handling functions are
linking to the wrong ICU lib at runtime.
--
Shaun Wexler
MacFOH
http://www.macfoh.com
PS - If you have access to the VX project, you can substitute
Valentina.framework (Release/Universal) for ALL of the vcomponents
and just copy it right into your Contents/Frameworks/ folder, and add
it to your target, for a savings of 35 MB in your app bundle vs
vcomponents. Please note that there are no error message strings
yet, and I haven't added VClient to it yet either, but will get that
done in the next few days. Be sure to ask Ruslan if VX is okay to
use for your app deployment, because it is a private project of mine
and not offered by Paradigma (yet?) until it becomes "VLight". Also,
it doesn't have any v1 classes like the C++ SDK, only those found in
v2.3 or greater, plus no picture format conversions or database
upgrades from v1.
Shaun ~
More information about the Valentina
mailing list