Author Topic: Problems with creating a wxwidgets Project  (Read 20545 times)

Offline testalucida

  • Multiple posting newcomer
  • *
  • Posts: 14
Problems with creating a wxwidgets Project
« on: January 07, 2007, 01:30:49 pm »
Hi all,
although I've replaced the wizard.script and wizard.xrc file with the files out of wxwidgets_wizard_Rev3.3.7z I can't get the wxWidgets wizard to work.  (see Topic http://forums.codeblocks.org/index.php?topic=4768.0 )
I'm using the latest nightly build (3461, Jan 5, 2007).
The error message is: A matching configuration cannot be found in the wxWidgets-Directory... regardless whether I specify the GCC- or MS8- Compiler.
Moreover, the dialogs as to be seen in the mentioned topic above do not open - only the first one, where I can choose between wxWidgets 2.6.x and 2.8.x (I'm using 2.8.).

Thanks for any ideas.

Regards
testalucida

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Problems with creating a wxwidgets Project
« Reply #1 on: January 07, 2007, 02:25:01 pm »
The error message is: A matching configuration cannot be found in the wxWidgets-Directory... regardless whether I specify the GCC- or MS8- Compiler.

It seems that you have specified wrong wxWidgets directory. Specify the correct installation path in the wizard. See the following screenshot.



In the screenshot, the location of wx is specified as $(#wx) where wx denotes a global variable which points to C:\wxMSW-2.8.0 in my case. If you get similar screenshot, then check in Settings > Global variables menu and see if there is any variable defined or not. If defined then check whether it's pointing to proper wx installation directory. If it's not defined, then define it.

Moreover, the dialogs as to be seen in the mentioned topic above do not open - only the first one, where I can choose between wxWidgets 2.6.x and 2.8.x (I'm using 2.8.).

I think as it fails in detecting appropriate wxWidgets directory, it is not opening next few pages.
Be a part of the solution, not a part of the problem.

Offline testalucida

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: Problems with creating a wxwidgets Project
« Reply #2 on: January 07, 2007, 05:49:30 pm »
Hallo Biplab,

thanks for your reply.
wxWidgets are really installed in C:\wx . Do you think the name of the directory could cause this problem?

A global wx-Variable is defined as follows:
Current Set: default
Current Variable: wx
BuiltIn Fields
base: C:\wx
include: C:\wx\include
lib: C:\wx\include

Does it look good?

Thank you
testalucida

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Problems with creating a wxwidgets Project
« Reply #3 on: January 07, 2007, 06:39:47 pm »
A global wx-Variable is defined as follows:
Current Set: default
Current Variable: wx
BuiltIn Fields
base: C:\wx
include: C:\wx\include
lib: C:\wx\include

If the line, highlighted in Red colour, is not a Typo, then there is problem with your wx installation. It should be lib: C:\wx\lib for proper operation.  :)
Be a part of the solution, not a part of the problem.

Offline testalucida

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: Problems with creating a wxwidgets Project
« Reply #4 on: January 07, 2007, 07:15:22 pm »
Me again...
The wizard is working now, but there is still a question:

a linking error occurs, when having checked "Enable Unicode" (MS8 only) - why is that?

thanks
testalucida

Offline testalucida

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: Problems with creating a wxwidgets Project
« Reply #5 on: January 07, 2007, 07:20:22 pm »
oops - missed your last answer...
Thanks for your hint, it really was a Typo  :x

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Problems with creating a wxwidgets Project
« Reply #6 on: January 07, 2007, 07:37:36 pm »
The wizard is working now, but there is still a question:

a linking error occurs, when having checked "Enable Unicode" (MS8 only) - why is that?

Thanks for your feedback. Specify the errors that you're getting. I'll try to assist you.  :)
Be a part of the solution, not a part of the problem.

Offline testalucida

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: Problems with creating a wxwidgets Project
« Reply #7 on: January 07, 2007, 07:49:06 pm »
great, Biplab, thank you  :D

that's what the linker says:

:: === kannweg16, Debug ===
main.obj:: error LNK2019: unresolved external symbol "__declspec(dllimport) public: class wxString & __thiscall wxString::operator<<(wchar_t const *)" (__imp_??6wxString@@QAEAAV0@PB_W@Z) referenced in function "class wxString __cdecl wxbuildinfo(enum wxbuildinfoformat)" (?wxbuildinfo@@YA?AVwxString@@W4wxbuildinfoformat@@@Z)
main.obj:: error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall wxString::wxString(wchar_t const *)" (__imp_??0wxString@@QAE@PB_W@Z) referenced in function "class wxString __cdecl wxbuildinfo(enum wxbuildinfoformat)" (?wxbuildinfo@@YA?AVwxString@@W4wxbuildinfoformat@@@Z)
app.obj:: error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall wxString::wxString(wchar_t const *)" (__imp_??0wxString@@QAE@PB_W@Z)
main.obj:: error LNK2001: unresolved external symbol "__declspec(dllimport) wchar_t const * const wxStatusLineNameStr" (__imp_?wxStatusLineNameStr@@3QB_WB)
main.obj:: error LNK2001: unresolved external symbol "__declspec(dllimport) wchar_t const * const wxFrameNameStr" (__imp_?wxFrameNameStr@@3QB_WB)
app.obj:: error LNK2001: unresolved external symbol "public: virtual bool __thiscall wxApp::Initialize(int &,wchar_t * *)" (?Initialize@wxApp@@UAE_NAAHPAPA_W@Z)
app.obj:: error LNK2001: unresolved external symbol "public: virtual void __thiscall wxAppConsole::OnAssertFailure(wchar_t const *,int,wchar_t const *,wchar_t const *,wchar_t const *)" (?OnAssertFailure@wxAppConsole@@UAEXPB_WH000@Z)
app.obj:: error LNK2001: unresolved external symbol "public: virtual void __thiscall wxAppConsole::OnAssert(wchar_t const *,int,wchar_t const *,wchar_t const *)" (?OnAssert@wxAppConsole@@UAEXPB_WH00@Z)
bin\Debug\kannweg16.exe:: fatal error LNK1120: 7 unresolved externals
:: === Build finished: 9 errors, 0 warnings ===

what does it mean?

thanks in advance and ciao
testalucida

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Problems with creating a wxwidgets Project
« Reply #8 on: January 08, 2007, 02:33:48 am »
It seems that your wxWidgets lib is compiled differently than the settings used by wizard. Are you using wxPack??

Try one thing first. Open the project file (*.cbp in Notepad). Search for the word "/Zc:wchar_t". Change it to "/Zc:wchar_t-". Save the project file and then try compiling your application again.

Regards,

Biplab
Be a part of the solution, not a part of the problem.

Offline testalucida

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: Problems with creating a wxwidgets Project
« Reply #9 on: January 08, 2007, 09:10:50 am »
Hi Biplab,
thanks again - I'll try later and give you feedback.
Regards
testalucida

Offline testalucida

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: Problems with creating a wxwidgets Project
« Reply #10 on: January 09, 2007, 08:49:41 pm »
Hello Biplab,

I tried with the option "/Zc:wchar_t-", but no success.

You asked if I'm using wxPack. What is it?
If the wxWidgets lib is compiled different than the settings - which compile options do I have to use?
  :(

Sorry for continously bothering you...

Regards
testalucida

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Problems with creating a wxwidgets Project
« Reply #11 on: January 10, 2007, 10:58:33 am »
wxPack is a package of wxWidget library compiled with GCC and MSVC 7.1 (Visit http://wxpack.sourceforge.net) for more details.

The main problem is the modified wizard will fail in case of MSVC 7.1 due to some internal difference with MSVC 8. Also please post full details, like compiler, wx lib configuration, etc so that others can also help you.  :)
Be a part of the solution, not a part of the problem.

Offline RJP Computing

  • Almost regular
  • **
  • Posts: 135
    • RJP Computing
Re: Problems with creating a wxwidgets Project
« Reply #12 on: January 10, 2007, 02:18:46 pm »
The main problem is the modified wizard will fail in case of MSVC 7.1 due to some internal difference with MSVC 8. Also please post full details, like compiler, wx lib configuration, etc so that others can also help you.  :)
Please specify what you mean. I have no problems and if there are we need to work them out. Can you be a bit more specific. I will try the new wizard with VC 8.0 selected as the complier and let you know what I find.

I will respond with what I find here.
« Last Edit: January 10, 2007, 02:23:20 pm by RJP Computing »
- Ryan

Ubuntu/WinXP, AMD Athlon 64 3000+, 1000MB RAM, AC 97 Audio, ATI Radeon 9600XT 256MB

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Problems with creating a wxwidgets Project
« Reply #13 on: January 10, 2007, 04:09:20 pm »
The main problem is the modified wizard will fail in case of MSVC 7.1 due to some internal difference with MSVC 8. Also please post full details, like compiler, wx lib configuration, etc so that others can also help you.  :)
Please specify what you mean. I have no problems and if there are we need to work them out. Can you be a bit more specific. I will try the new wizard with VC 8.0 selected as the complier and let you know what I find.

I will respond with what I find here.

You are already aware of the changes.  :wink:  Changes in C Runtime Libraries (CRT) is the most important change. You need manifest file to load CRT and single threaded libraries are gone.

I didn't touch MSVC 7.1 part as the compiler was not working in my pc. But main reason why I wrote this as I have kept the default option of "/Zc:wchar_t" for MSVC 8 which for MSVC 7.1 is "/Zc:wchar_t-". As wxPack is compiled with MSVC 7.1, there is bound to be conflict in this option.

I have tried to follow the default behaviour of new compiler. I was trying to create a separate wizard for MSVC 7.1 with "/Zc:wchar_t-". The work is not complete yet.

What is your opinion on the option "/Zc:wchar_t"?  How would you like to tackle the problem? :)
« Last Edit: January 10, 2007, 04:12:02 pm by Biplab »
Be a part of the solution, not a part of the problem.

Offline RJP Computing

  • Almost regular
  • **
  • Posts: 135
    • RJP Computing
Re: Problems with creating a wxwidgets Project
« Reply #14 on: January 10, 2007, 11:24:14 pm »
You are already aware of the changes.  :wink:  Changes in C Runtime Libraries (CRT) is the most important change. You need manifest file to load CRT and single threaded libraries are gone.
I misunderstood, sorry.

I didn't touch MSVC 7.1 part as the compiler was not working in my pc. But main reason why I wrote this as I have kept the default option of "/Zc:wchar_t" for MSVC 8 which for MSVC 7.1 is "/Zc:wchar_t-". As wxPack is compiled with MSVC 7.1, there is bound to be conflict in this option.

I have tried to follow the default behavior of new compiler. I was trying to create a separate wizard for MSVC 7.1 with "/Zc:wchar_t-". The work is not complete yet.

What is your opinion on the option "/Zc:wchar_t"?  How would you like to tackle the problem? :)
Agreed this is a sticky problem. For the wizard I would leave it what ever the defaults for the compiler are. Then I can update the tutorial on wxPack's website on the change people need to make to get it to work.
- Ryan

Ubuntu/WinXP, AMD Athlon 64 3000+, 1000MB RAM, AC 97 Audio, ATI Radeon 9600XT 256MB