Re: [Cppcms-users] localization problem
Brought to you by:
artyom-beilis
From: sergey l. <ccp...@gm...> - 2012-03-26 12:00:25
|
I recompile cppcms using instruction at http://cppcms.com/wikipp/en/page/cppcms_1x_build (console cmake, nmake) but still have problem. 1. I use skin.dll. 2. I have define DLL_EXPORT in skin. 3. I always link with the same cppcms.lib and booster.lib in exe and in skin VS projects. It's hardcoded in VS projects file so it's can't be different. On Mon, Mar 26, 2012 at 12:58 PM, Artyom Beilis <art...@ya...> wrote: > Ok, I see.... > > (Argggrrr Windows ... ) > > > I compiled the code > > g++ -Wall -DDLL_EXPORT=1 test.cpp -lcppcms -lbooster -o test.exe > > g++ -Wall -DDLL_EXPORT=1 -shared test_skin2.cpp -lcppcms -lbooster -o > cygtest_skin.dll > > And it works perfectly well :-) > > I looked into the project files and found following dependencies: > > Z:\libraries\cppcms\cppcms-1.0.0\build\Debug\cppcms.lib > Z:\libraries\cppcms\cppcms-1.0.0\build\booster\Debug\booster.lib > Z:\libraries\cppcms\cppcms-1.0.0\build\booster\Debug\libbooster.lib > > > > cppcms.lib - is import library for cppcms.dll > > booster.lib - is import library for booster.dll > libbooster.lib - is STATIC booster library. > > I assume there is a mixup of some symbols. > > I assume what happens is that main program and the dll use two different > versions > of symbols that is why the localization facets installed in main program > are not visible in DLL. > > > Two things: > > 1. When you use dynamically loaded view you **must** use DLLs > > 2. It is good idea to add DLL_EXPORT define to your projects (so you'll > get correct import symbols > > 3. You should always link with cppcms.lib and booster.lib unless you > create fully statically linked > projects. > > Once you clean all the dependencies as required it would work. > > Additional small notes. > > Did you build cppcms with nmake files or with MSVC project? > > According to the layout it looks like you created it with MSVC > project instead of nmake. > > VS projects are not supported. > > Please build cppcms in release and debug mode indepenently > using CMake + NMake. The reason that there are different > configurations for debug and release that can't be done > using VS project. > > For example in debug it should be cppcmsd.dll and boosterd.dll > cppcmsd.lib and boosterd.lib. > > It seems that your debug build uses "release" file names. > > It may lead to the same mixup as well. > > > Best Regards, > > > Artyom Beilis > ------------- > > Support CppCMS by donating money: > https://sourceforge.net/donate/index.php?group_id=209965 > > > > > > > >________________________________ > > From: sergey lavrov <ccp...@gm...> > >To: cpp...@li... > >Sent: Monday, March 26, 2012 10:12 AM > >Subject: Re: [Cppcms-users] localization problem > > > > > >Hello Artyom! > > > > > >I sent to your email VS project that reproduce such behavior. > > > > > >On Sun, Mar 25, 2012 at 11:12 PM, Artyom Beilis <art...@ya...> > wrote: > > > >Can you create a sample program and send it? > >> > >> > >>Because both methods should work (without -d flag) > >> > >>Artyom Beilis > >>-------------- > >>CppCMS - C++ Web Framework: http://cppcms.com/ > >>CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/ > >> > >> > >> > >>>________________________________ > >>> From: sergey lavrov <ccp...@gm...> > >>>To: cpp...@li... > >>>Sent: Sunday, March 25, 2012 8:00 PM > >>>Subject: Re: [Cppcms-users] localization problem > >>> > >>> > >>> > >>>Hello Artyom! > >>> > >>> > >>>I tried use -d flag as described in wiki > http://cppcms.com/wikipp/en/page/cppcms_1x_i18n_and_l10n but > unfortunatly cppcms_tmpl_cc generate the same output as without -d flag. > >>>I also tried using cppcms version 1.0.1 and 0.999.0 but have the same > result. > >>>So I get stuck with it and haven't any ideas. > >>> > >>> > >>>On Sun, Mar 25, 2012 at 6:54 PM, Artyom Beilis <art...@ya...> > wrote: > >>> > >>>Do you use any cppcms_tmpl_cc flags like -d domain? > >>>>Basically it seems strange. > >>>> > >>>> > >>>> > >>>> > >>>>> > >>>>>On Thu, Mar 22, 2012 at 3:39 PM, sergey lavrov < > ccp...@gm...> wrote: > >>>>> > >>>>>Dear All! > >>>>>> > >>>>>> > >>>>>> > >>>> > >>>>>>In controller I have: > >>>>>>context().locale("ru_RU.UTF-8"); > >>>>>>render("skin", "test", content); > >>>>>>response().out() << "test: "<< translate("test"); > >>>>>> > >>>>>> > >>>> > >>>> > >>>>Both should work. response().out() should have a proper locale. > >>>> > >>>>Artyom > >>>> > > >>>>------------------------------------------------------------------------------ > >>>>This SF email is sponsosred by: > >>>>Try Windows Azure free for 90 days Click Here > >>>>http://p.sf.net/sfu/sfd2d-msazure > >>>>_______________________________________________ > >>>>Cppcms-users mailing list > >>>>Cpp...@li... > >>>>https://lists.sourceforge.net/lists/listinfo/cppcms-users > >>>> > >>> > > >>>------------------------------------------------------------------------------ > >>>This SF email is sponsosred by: > >>>Try Windows Azure free for 90 days Click Here > >>>http://p.sf.net/sfu/sfd2d-msazure > >>>_______________________________________________ > >>>Cppcms-users mailing list > >>>Cpp...@li... > >>>https://lists.sourceforge.net/lists/listinfo/cppcms-users > >>> > >>> > >>> > > >>------------------------------------------------------------------------------ > >>This SF email is sponsosred by: > >>Try Windows Azure free for 90 days Click Here > >>http://p.sf.net/sfu/sfd2d-msazure > >>_______________________________________________ > >>Cppcms-users mailing list > >>Cpp...@li... > >>https://lists.sourceforge.net/lists/listinfo/cppcms-users > >> > >> > > > > >------------------------------------------------------------------------------ > >This SF email is sponsosred by: > >Try Windows Azure free for 90 days Click Here > >http://p.sf.net/sfu/sfd2d-msazure > >_______________________________________________ > >Cppcms-users mailing list > >Cpp...@li... > >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > > > > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |