Overview
Features
Download
Documentation
Community
Add-Ons & Services

Poco::Util::Application problem

Please post support and help requests here.
Amine
Posts: 18
Joined: 20 Mar 2007, 14:08

Poco::Util::Application problem

Postby Amine » 03 Apr 2007, 14:18

Hi guys,

I am new user of Poco, and I am really satisfied with it.

I have a problem using Application library. I copiled the library using vc++ express, there is no problems while compiling.
I wrote an application like SimpleApp, and in Debug Mode i have no problems but in realease mode I have this problem:
ClientComCourte.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall Poco::Util::Application::init(int,wchar_t * * const)" (__imp_?init@Application@Util@Poco@@QAEXHQAPA_W@Z)

do you have any idea please ?

alex
Posts: 1221
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Poco::Util::Application problem

Postby alex » 03 Apr 2007, 16:14

> do you have any idea please ?

Did you compile release version of Util? If so, make sure you are linking with it.

Alex

Amine
Posts: 18
Joined: 20 Mar 2007, 14:08

Re: Re: Poco::Util::Application problem

Postby Amine » 03 Apr 2007, 17:23

> > do you have any idea please ?
>
> Did you compile release version of Util? If so, make sure you are linking with it.
>
> Alex

Yes I did.
I wrote an other application using ServerApllication and it works in both debug and release mode.

alex
Posts: 1221
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Re: Re: Poco::Util::Application problem

Postby alex » 03 Apr 2007, 17:49

> > > do you have any idea please ?
> >
> > Did you compile release version of Util? If so, make sure you are linking with it.
> >
> > Alex
>
> Yes I did.
> I wrote an other application using ServerApllication and it works in both debug and release mode.

apparently, you have POCO_WIN32_UTF8 defined for your app, but Util was not compiled with it.

Amine
Posts: 18
Joined: 20 Mar 2007, 14:08

Re: Re: Re: Re: Poco::Util::Application problem

Postby Amine » 03 Apr 2007, 18:00

> > > > do you have any idea please ?
> > >
> > > Did you compile release version of Util? If so, make sure you are linking with it.
> > >
> > > Alex
> >
> > Yes I did.
> > I wrote an other application using ServerApllication and it works in both debug and release mode.
>
> apparently, you have POCO_WIN32_UTF8 defined for your app, but Util was not compiled with it.

thanks for helping me, I am using only these Preprocessor definitions WIN32;NDEBUG;_CONSOLE; i tried with the ones used in the simpleApp (WIN32;NDEBUG;_WINDOWS;POCO_DLL;WINVER=0x0500) and it did not work.

I will try to rewrite my app, may be my conception is not good.

alex
Posts: 1221
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Re: Re: Re: Re: Poco::Util::Application problem

Postby alex » 03 Apr 2007, 18:46

> thanks for helping me, I am using only these Preprocessor definitions WIN32;NDEBUG;_CONSOLE; i tried with the ones used in the simpleApp (WIN32;NDEBUG;_WINDOWS;POCO_DLL;WINVER=0x0500) and it did not work.

> I will try to rewrite my app, may be my conception is not good.

Check if you have unicode character set specified instead of multibyte. Unicode will force the definition of POCO_WIN32_UTF8 (and the other way around). AFAICT, you would only need this in Application if you have to support unicode command line args. The best way to troubleshoot this problem is to compare the command line with the one that links succesfully. Your original defines were fine, btw.

Amine
Posts: 18
Joined: 20 Mar 2007, 14:08

Re: Re: Re: Re: Re: Re: Poco::Util::Application problem

Postby Amine » 03 Apr 2007, 19:10

> Check if you have unicode character set specified instead of multibyte.

How can i do that ?
I not using Args, I will use my app like a windows service and I don't need passing args to it.

thanks for your support

Amine

alex
Posts: 1221
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Re: Re: Re: Re: Re: Re: Poco::Util::Application problem

Postby alex » 03 Apr 2007, 19:35

> > Check if you have unicode character set specified instead of multibyte.
>
> How can i do that ?

In Visual Studio, go to Configuration Properties -> General -> Character Set

> I not using Args, I will use my app like a windows service and I don't need passing args to it.

Well, then, unless you have internal need for unicode, you should not have it defined. Why don't you post your compile/link command line here (or even better, compare it to the one you have that compiles and links without errors).


Amine
Posts: 18
Joined: 20 Mar 2007, 14:08

Re: Re: Re: Re: Re: Re: Re: Re: Poco::Util::Application problem

Postby Amine » 04 Apr 2007, 09:25

> In Visual Studio, go to Configuration Properties -> General -> Character Set

yes, that's it !! Thank you very much alex ! and thank you for the the work you are donig with Poco librairies. (:wink:)


Return to “Support”

Who is online

Users browsing this forum: No registered users and 1 guest

cron