From: Steven R. L. <sr...@ic...> - 2012-05-21 13:18:25
|
If ICU is built with --enable-rpath on linux it will use the linker options: -Wl,-zorigin,-rpath,'$$'ORIGIN this includes the same dir the app resides in in the load path you could link your app with similar options On 05/20/2012 10:19 PM, machhindra nale wrote: > This option looks good for windows. I will try. > > I will be shipping ICU as private shared library in Linux. It will be > placed in the same directory where my application resides. I can not > update the "xxPATH" environment variable. If I choose to build my own > lightweight library that links to ICU, then I need to place the > ICU libraries in the /lib or /local/lib directories. > > Currently I am loading the data library first and then common library > dynamically using dlopen. > > Machhindra > > On Mon, May 21, 2012 at 3:16 AM, Paul O'Shea <osh...@gm... > <mailto:osh...@gm...>> wrote: > > Hi, > In that case, perhaps you could build your own lightweight library > that links to ICU and then dynamically load your dll when the user > chooses the conversion option in your application. > > That way, you can get the benefits of linking to ICU (no version > headaches) while avoiding the side effect of loading the ICU > libraries at startup. > > Paul. > > > > On 20 May 2012 11:50, machhindra nale <mac...@gm... > <mailto:mac...@gm...>> wrote: > > Thanks for reply! > > I am using ICU for conversion. This conversion is optional and > depends upon user's choice. If I link ICU (using import lib) > directly, the shared library will get loaded at start up. > > On Sun, May 20, 2012 at 2:15 AM, Steven R. Loomis > <sr...@ic... <mailto:sr...@ic...>> wrote: > > Mac, > First, what is the reason for trying to "load ICU > dynamically" rather than just linking against it? > > Second, you can disable symbol renaming, see > http://userguide.icu-project.org/design#TOC-ICU-Binary-Compatibility:-Using-ICU-as-an-Operating-System-Level-Library > > then, ICU will always have "u_getVersion". But again, > just link your code against ICU this way, then if you want > a different ICU version you can drop in a different shared > library. > > Hope this helps, > -s > > > On 05/18/2012 10:56 PM, machhindra nale wrote: >> Hello, >> >> I am using ICU for conversion. I want to load the ICU >> common library and Data library dynamically on >> Windows/Linux platform. Libraries are loading fine. BUT I >> am struggling to find the correct symbol name. >> >> Following line works fine. >> >> GetProcAddress(myHandle , "u_getVersion_49"); or >> >> myu_getVersion = dlsym(myHandle,"u_getVersion_49"); >> >> I don't want to restrict end users to "xxx_49" version of >> ICU. I should be able to change the library >> version seamlessly. I understand that 'symbol renaming' >> in ICU can be disabled explicitly. Is there any better >> way to handle this programmatically instead of compiling >> ICU on different platforms without symbol renaming? >> >> Thanks, >> Mac > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's > security and > threat landscape has changed and how IT managers can > respond. Discussions > will include endpoint security, mobile security and the > latest in malware > threats. > http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > icu-support mailing list - > icu...@li... > <mailto:icu...@li...> > To Un/Subscribe: > https://lists.sourceforge.net/lists/listinfo/icu-support > Archives/Project > <https://lists.sourceforge.net/lists/listinfo/icu-supportArchives/Project> > Info: http://site.icu-project.org/contacts > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. > Discussions > will include endpoint security, mobile security and the latest > in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > icu-support mailing list - icu...@li... > <mailto:icu...@li...> > To Un/Subscribe: > https://lists.sourceforge.net/lists/listinfo/icu-support > Archives/Project > <https://lists.sourceforge.net/lists/listinfo/icu-support%0AArchives/Project> > Info: http://site.icu-project.org/contacts > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. > Discussions > will include endpoint security, mobile security and the latest in > malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > icu-support mailing list - icu...@li... > <mailto:icu...@li...> > To Un/Subscribe: > https://lists.sourceforge.net/lists/listinfo/icu-support > Archives/Project > <https://lists.sourceforge.net/lists/listinfo/icu-support%0AArchives/Project> > Info: http://site.icu-project.org/contacts > > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > > _______________________________________________ > icu-support mailing list - icu...@li... > To Un/Subscribe: https://lists.sourceforge.net/lists/listinfo/icu-support > Archives/Project Info: http://site.icu-project.org/contacts |