From: Simon M. <smc...@au...> - 2008-03-26 01:47:23
|
I looked in the 'uconv' sample in 'extra' and it uses pkgdata "-m static" instead of "-m dll". I switched to this and it worked on my Linux platform finally. I also noticed it writes a README_...txt which shows what code to put in the app. It doesn't do this with "-m dll". I don't think I was doing anything wrong. I switched back to -dll and linked the resulting .so. I left the app with the code for the static lib and it still failed as before. Regards, Simon McMahon Software Engineer Australia Development Laboratory IBM +61 7 5552 4002 +61 432294180 Simon McMahon/Australia/Contr/IBM@IBMAU Sent by: icu...@li... 25/03/2008 03:11 PM Please respond to ICU support mailing list <icu...@li...> To ICU support mailing list <icu...@li...> cc Subject Re: [icu-support] on Linux: udata_setAppData failed: "U_INVALID_FORMAT_ERROR" I tried that change to (extern "C" const char U_IMPORT capicmd_res_dat[];) and I still get: udata_setAppData failed: "U_INVALID_FORMAT_ERROR" pkgdata writes the data to an assembler file, rather than 'C' for some reason. Then it deletes it as soon as it compiles it so I can't check it. Simon McMahon Software Engineer Australia Development Laboratory IBM +61 7 5552 4002 +61 432294180 "Steven R. Loomis" <sr...@ic...> Sent by: icu...@li... 20/03/2008 05:47 PM Please respond to ICU support mailing list <icu...@li...> To ICU support mailing list <icu...@li...> cc Subject Re: [icu-support] on Linux: udata_setAppData failed: "U_INVALID_FORMAT_ERROR" Simon, Try declaring the import as: extern const char U_IMPORT capicmd_res_dat []; (may need extern "C" also. ) -s Simon McMahon wrote: > pkgdata appears to work OK on my Linux build but it is grabbing stuff from > my temporary sandbox where I built and installed ICU. I can fix that > later. > > The app links OK but doesn't run - I get:: > udata_setAppData failed: "U_INVALID_FORMAT_ERROR" > > It works in the Windows build. > In my app I have: > extern "C" const void U_IMPORT *capicmd_res_dat; > and > udata_setAppData("capicmd_res", &capicmd_res_dat, &err); > to link to the shared lib. > Those lines were derived straight from the ufortune.cpp sample code. > > pkgdata output from the build: > > ./../gsk_support/icu/linux-ia32/bin/pkgdata --name capicmd_res -v --mode > dll -s ./gskcapicmd/resources -d ./gskcapicmd/resources/linuxrelease > ./gskcapicmd/resources/plist.txt > ./../gsk_support/icu/linux-ia32/bin/pkgdata: No -O option found, trying > 'icu-config --incfile'. > ./../gsk_support/icu/linux-ia32/bin/pkgdata: icu-config: using '-O > /sandboxes/simonm/i18n/linux-ia32/inst/lib/icu/3.8.1/Makefile.inc' > # Reading ./gskcapicmd/resources/plist.txt.. > # Output file: ./gskcapicmd/resources/linuxrelease/lib$(LIBNAME).so > /usr/bin//gmake -f > ./gskcapicmd/resources/linuxrelease/capicmd_res_dll.mak > cat ./gskcapicmd/resources/plist.txt > > ./gskcapicmd/resources/linuxrelease/capicmd_res_dll.lst > LD_LIBRARY_PATH=/sandboxes/simonm/i18n/linux-ia32/inst/lib:$LD_LIBRARY_PATH > /sandboxes/simonm/i18n/linux-ia32/inst/sbin/icupkg -tl -c -s > ./gskcapicmd/resources -a ./gskcapicmd/ > LD_LIBRARY_PATH=/sandboxes/simonm/i18n/linux-ia32/inst/lib:$LD_LIBRARY_PATH > /sandboxes/simonm/i18n/linux-ia32/inst/sbin/genccode -a gcc -n > capicmd_res -e capicmd_res -d ./gskca > generating assembly code for > gskcapicmd/resources/linuxrelease/capicmd_res.dat > gcc -O3 -D_REENTRANT -I/sandboxes/simonm/i18n/linux-ia32/inst/include > -c -DPIC -fPIC -o gskcapicmd/resources/linuxrelease/capicmd_res_dat.o > ./gskcapicmd/resources/linuxrelea > rm -rf ./gskcapicmd/resources/linuxrelease/capicmd_res_dat.s > gcc -DHAVE_CONFIG_H -D_REENTRANT > -I/sandboxes/simonm/i18n/linux-ia32/inst/include -O3 -shared -o > gskcapicmd/resources/linuxrelease/libcapicmd_res.so > ./gskcapicmd/resources/ > ls -l gskcapicmd/resources/linuxrelease/libcapicmd_res.so > -rwxr-xr-x 1 gskbld gskbld 194990 Mar 20 15:04 > gskcapicmd/resources/linuxrelease/libcapicmd_res.so > > Regards, > > Simon McMahon > Software Engineer > Australia Development Laboratory > IBM > +61 7 5552 4002 > +61 432294180 > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > icu-support mailing list - icu...@li... > To Un/Subscribe: https://lists.sourceforge.net/lists/listinfo/icu-support > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ icu-support mailing list - icu...@li... To Un/Subscribe: https://lists.sourceforge.net/lists/listinfo/icu-support ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ icu-support mailing list - icu...@li... To Un/Subscribe: https://lists.sourceforge.net/lists/listinfo/icu-support |