Author Topic: Problems with creating a wxwidgets Project  (Read 20541 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

Offline uelkfr

  • Single posting newcomer
  • *
  • Posts: 4
Re: Problems with creating a wxwidgets Project
« Reply #15 on: June 15, 2008, 02:35:24 pm »
Help me please.
Config: Windows XP SP2, Code Blocks 8.0.2 (C:\Program Files\CodeBlocks), MinGW was inside CodeBlocks setup package codeblocks-8.02mingw-setup.exe but I will not use it because MinGW don't like spaces, especially windres.exe (C:\Program Files\CodeBlocks\MinGW), wxWidgets 2.8.7 been setup from wxMSW-2.8.7-Setup.exe (C:\Program Files\wxWidgets-2.8.7) I wonder why wxMSW-2.8.7-Setup.exe haven't added environment variable %WXWIN%, which I've done myself, Microsoft Visual C++ 2008 Express Edition (C:\Program Files\Microsoft Visual Studio 9.0), no wxPack

Building wxWidgets. Start > Programs> Visual C++ 9.0 Express Edition > Visual Studio Tools > Visual Studio 2008 Command Prompt.
cd %WXWIN%\build\msw
nmake -f makefile.vc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=debug UNICODE=1
nmake -f makefile.vc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1

Trying clean
nmake -f makefile.vc clean USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=debug UNICODE=1
gives some error :( I'm starting to hate bakefile.

I'm creating my first wxWidgets project using wizard:
1) Next
2) wxWidgets 2.8.x
3) Project Title: wxTest, Folder: C:\Program Files\CodeBlocks\Projects
4) Next
5) wxSmith and Dialog Based
6) $(#wx), where #wx is CB's global variable base=C:\Program Files\wxWidgets-2.8.7, include=C:\Program Files\wxWidgets-2.8.7\include, lib=C:\Program Files\wxWidgets-2.8.7\lib
7) Microsoft Visual C++ 2005/2008, Create Debug and Release configurations
8) Use wxWidgets DLL, wxWidgets is built as monolithic library, Enable unicode, Configure Advanced Options
9) unchecked "Use __WXDEBUG__ and Debug wxWidgets lib" (GCC Only), Debug Target "GUI Mode Application", Release Target "GUI Mode Application"

Building debug gives this error (with full command line report):
-------------- Build: Debug in wxTest ---------------

cl.exe /nologo /DWIN32 /D__WIN32__ /D__WXMSW__ /DWXUSINGDLL /DwxUSE_UNICODE /D_WINDOWS /TP /Gd /GF /EHsc /D_CRT_SECURE_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /Zc:wchar_t /D_VC80_UPGRADE=0x0600 /W3  /Zi /D_DEBUG /D__WXDEBUG__ /MDd    /I"C:\Program Files\wxWidgets-2.8.7\include" /I"C:\Program Files\wxWidgets-2.8.7\contrib\include" /I"C:\Program Files\wxWidgets-2.8.7\lib\vc_dll\mswud" /I"C:\Program Files\Microsoft SDKs\Windows\v6.0A\include" /I"C:\Program Files\Microsoft Visual Studio 9.0\VC\include"  /c wxTestApp.cpp /FoDebug\wxTestApp.obj
wxTestApp.cpp
cl.exe /nologo /DWIN32 /D__WIN32__ /D__WXMSW__ /DWXUSINGDLL /DwxUSE_UNICODE /D_WINDOWS /TP /Gd /GF /EHsc /D_CRT_SECURE_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /Zc:wchar_t /D_VC80_UPGRADE=0x0600 /W3  /Zi /D_DEBUG /D__WXDEBUG__ /MDd    /I"C:\Program Files\wxWidgets-2.8.7\include" /I"C:\Program Files\wxWidgets-2.8.7\contrib\include" /I"C:\Program Files\wxWidgets-2.8.7\lib\vc_dll\mswud" /I"C:\Program Files\Microsoft SDKs\Windows\v6.0A\include" /I"C:\Program Files\Microsoft Visual Studio 9.0\VC\include"  /c wxTestMain.cpp /FoDebug\wxTestMain.obj
wxTestMain.cpp
rc.exe /I"C:\Program Files\wxWidgets-2.8.7\include" /I"C:\Program Files\wxWidgets-2.8.7\lib\vc_dll\mswud" /I"C:\Program Files\Microsoft SDKs\Windows\v6.0A\include" /I"C:\Program Files\Microsoft Visual Studio 9.0\VC\include"  -foDebug\resource.res resource.rc
Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
Copyright (C) Microsoft Corporation.  All rights reserved.
link.exe /nologo /subsystem:windows /LIBPATH:"C:\Program Files\wxWidgets-2.8.7\lib\vc_dll" /LIBPATH:"C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib" /LIBPATH:"C:\Program Files\Microsoft Visual Studio 9.0\VC\lib"  /out:Debug\wxTest.exe msvcrtd.lib wxmsw28u.lib winmm.lib rpcrt4.lib  Debug\wxTestApp.obj Debug\wxTestMain.obj  Debug\resource.res  /DEBUG /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrt.lib /INCREMENTAL:NO /SUBSYSTEM:WINDOWS
wxTestApp.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)
wxTestApp.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)
Debug\wxTest.exe : fatal error LNK1120: 2 unresolved externals
Process terminated with status 1120 (0 minutes, 6 seconds)
3 errors, 0 warnings
 

after changing
<Add option="/Zc:wchar_t" />
to
<Add option="/Zc:wchar_t-" />
-------------- Build: Debug in wxTest ---------------

cl.exe /nologo /DWIN32 /D__WIN32__ /D__WXMSW__ /DWXUSINGDLL /DwxUSE_UNICODE /D_WINDOWS /TP /Gd /GF /EHsc /D_CRT_SECURE_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /Zc:wchar_t- /D_VC80_UPGRADE=0x0600 /W3  /Zi /D_DEBUG /D__WXDEBUG__ /MDd    /I"C:\Program Files\wxWidgets-2.8.7\include" /I"C:\Program Files\wxWidgets-2.8.7\contrib\include" /I"C:\Program Files\wxWidgets-2.8.7\lib\vc_dll\mswud" /I"C:\Program Files\Microsoft SDKs\Windows\v6.0A\include" /I"C:\Program Files\Microsoft Visual Studio 9.0\VC\include"  /c wxTestApp.cpp /FoDebug\wxTestApp.obj
wxTestApp.cpp
cl.exe /nologo /DWIN32 /D__WIN32__ /D__WXMSW__ /DWXUSINGDLL /DwxUSE_UNICODE /D_WINDOWS /TP /Gd /GF /EHsc /D_CRT_SECURE_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /Zc:wchar_t- /D_VC80_UPGRADE=0x0600 /W3  /Zi /D_DEBUG /D__WXDEBUG__ /MDd    /I"C:\Program Files\wxWidgets-2.8.7\include" /I"C:\Program Files\wxWidgets-2.8.7\contrib\include" /I"C:\Program Files\wxWidgets-2.8.7\lib\vc_dll\mswud" /I"C:\Program Files\Microsoft SDKs\Windows\v6.0A\include" /I"C:\Program Files\Microsoft Visual Studio 9.0\VC\include"  /c wxTestMain.cpp /FoDebug\wxTestMain.obj
wxTestMain.cpp
rc.exe /I"C:\Program Files\wxWidgets-2.8.7\include" /I"C:\Program Files\wxWidgets-2.8.7\lib\vc_dll\mswud" /I"C:\Program Files\Microsoft SDKs\Windows\v6.0A\include" /I"C:\Program Files\Microsoft Visual Studio 9.0\VC\include"  -foDebug\resource.res resource.rc
Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
Copyright (C) Microsoft Corporation.  All rights reserved.
link.exe /nologo /subsystem:windows /LIBPATH:"C:\Program Files\wxWidgets-2.8.7\lib\vc_dll" /LIBPATH:"C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib" /LIBPATH:"C:\Program Files\Microsoft Visual Studio 9.0\VC\lib"  /out:Debug\wxTest.exe msvcrtd.lib wxmsw28u.lib winmm.lib rpcrt4.lib  Debug\wxTestApp.obj Debug\wxTestMain.obj  Debug\resource.res  /DEBUG /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrt.lib /INCREMENTAL:NO /SUBSYSTEM:WINDOWS
wxTestApp.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall wxApp::Initialize(int &,unsigned short * *)" (?Initialize@wxApp@@UAE_NAAHPAPAG@Z)
wxTestApp.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall wxAppConsole::OnAssertFailure(unsigned short const *,int,unsigned short const *,unsigned short const *,unsigned short const *)" (?OnAssertFailure@wxAppConsole@@UAEXPBGH000@Z)
wxTestApp.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall wxAppConsole::OnAssert(unsigned short const *,int,unsigned short const *,unsigned short const *)" (?OnAssert@wxAppConsole@@UAEXPBGH00@Z)
wxTestMain.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class wxString & __thiscall wxString::operator<<(unsigned short const *)" (__imp_??6wxString@@QAEAAV0@PBG@Z) referenced in function "class wxString __cdecl wxbuildinfo(enum wxbuildinfoformat)" (?wxbuildinfo@@YA?AVwxString@@W4wxbuildinfoformat@@@Z)
wxTestMain.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall wxString::wxString(unsigned short const *)" (__imp_??0wxString@@QAE@PBG@Z) referenced in function "class wxString __cdecl wxbuildinfo(enum wxbuildinfoformat)" (?wxbuildinfo@@YA?AVwxString@@W4wxbuildinfoformat@@@Z)
Debug\wxTest.exe : fatal error LNK1120: 5 unresolved externals
Process terminated with status 1120 (0 minutes, 5 seconds)
6 errors, 0 warnings


my wxTest.cbp
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
   <FileVersion major="1" minor="6" />
   <Project>
      <Option title="wxTest" />
      <Option pch_mode="2" />
      <Option compiler="msvc8" />
      <Build>
         <Target title="Debug">
            <Option output="Debug\wxTest" prefix_auto="1" extension_auto="1" />
            <Option object_output="Debug\" />
            <Option type="0" />
            <Option compiler="msvc8" />
            <Option projectLinkerOptionsRelation="2" />
            <Compiler>
               <Add option="/Zi" />
               <Add option="/D_DEBUG" />
               <Add option="/D__WXDEBUG__" />
               <Add option="/MDd" />
               <Add directory="$(#wx)\lib\vc_dll\mswud" />
            </Compiler>
            <ResourceCompiler>
               <Add directory="$(#wx)\lib\vc_dll\mswud" />
            </ResourceCompiler>
            <Linker>
               <Add option="/DEBUG" />
               <Add option="/NODEFAULTLIB:libcmtd.lib" />
               <Add option="/NODEFAULTLIB:msvcrt.lib" />
               <Add library="msvcrtd.lib" />
               <Add library="wxmsw28u.lib" />
               <Add directory="$(#wx)\lib\vc_dll" />
            </Linker>
            <ExtraCommands>
               <Add after='mt.exe /nologo /manifest &quot;Debug\wxTest.exe.manifest&quot; /outputresource:&quot;Debug\wxTest.exe&quot;;1' />
            </ExtraCommands>
         </Target>
         <Target title="Release">
            <Option output="Release\wxTest" prefix_auto="1" extension_auto="1" />
            <Option object_output="Release\" />
            <Option type="0" />
            <Option compiler="msvc8" />
            <Option projectLinkerOptionsRelation="2" />
            <Compiler>
               <Add option="/Ox" />
               <Add option="/DNDEBUG" />
               <Add option="/MD" />
               <Add option="/O2" />
               <Add option="/Ob1" />
               <Add directory="$(#wx)\lib\vc_dll\mswu" />
            </Compiler>
            <ResourceCompiler>
               <Add directory="$(#wx)\lib\vc_dll\mswu" />
            </ResourceCompiler>
            <Linker>
               <Add option="/NODEFAULTLIB:libcmt.lib" />
               <Add library="msvcrt.lib" />
               <Add library="wxmsw28u.lib" />
               <Add directory="$(#wx)\lib\vc_dll" />
            </Linker>
            <ExtraCommands>
               <Add after='mt.exe /nologo /manifest &quot;Release\wxTest.exe.manifest&quot; /outputresource:&quot;Release\wxTest.exe&quot;;1' />
            </ExtraCommands>
         </Target>
      </Build>
      <Compiler>
         <Add option="/DWIN32" />
         <Add option="/D__WIN32__" />
         <Add option="/D__WXMSW__" />
         <Add option="/DWXUSINGDLL" />
         <Add option="/DwxUSE_UNICODE" />
         <Add option="/D_WINDOWS" />
         <Add option="/TP" />
         <Add option="/Gd" />
         <Add option="/GF" />
         <Add option="/EHsc" />
         <Add option="/D_CRT_SECURE_DEPRECATE" />
         <Add option="/D_CRT_NONSTDC_NO_DEPRECATE" />
         <Add option="/Zc:wchar_t" />
         <Add option="/D_VC80_UPGRADE=0x0600" />
         <Add option="/W3" />
         <Add directory="$(#wx)\include" />
         <Add directory="$(#wx)\contrib\include" />
      </Compiler>
      <ResourceCompiler>
         <Add directory="$(#wx)\include" />
      </ResourceCompiler>
      <Linker>
         <Add option="/INCREMENTAL:NO" />
         <Add option="/SUBSYSTEM:WINDOWS" />
         <Add library="winmm.lib" />
         <Add library="rpcrt4.lib" />
      </Linker>
      <Unit filename="resource.rc">
         <Option compilerVar="WINDRES" />
      </Unit>
      <Unit filename="wxTestApp.cpp" />
      <Unit filename="wxTestApp.h" />
      <Unit filename="wxTestMain.cpp" />
      <Unit filename="wxTestMain.h" />
      <Unit filename="wxsmith\wxTestdialog.wxs" />
      <Extensions>
         <code_completion />
         <envvars />
         <debugger />
         <wxsmith version="1">
            <gui name="wxWidgets" src="wxTestApp.cpp" main="wxTestDialog" init_handlers="necessary" language="CPP" />
            <resources>
               <wxDialog wxs="wxsmith/wxTestdialog.wxs" src="wxTestMain.cpp" hdr="wxTestMain.h" name="wxTestDialog" language="CPP" />
            </resources>
         </wxsmith>
      </Extensions>
   </Project>
</CodeBlocks_project_file>

release version builds fine:
-------------- Build: Release in wxTest ---------------

cl.exe /nologo /DWIN32 /D__WIN32__ /D__WXMSW__ /DWXUSINGDLL /DwxUSE_UNICODE /D_WINDOWS /TP /Gd /GF /EHsc /D_CRT_SECURE_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /Zc:wchar_t /D_VC80_UPGRADE=0x0600 /W3  /Ox /DNDEBUG /MD /O2 /Ob1    /I"C:\Program Files\wxWidgets-2.8.7\include" /I"C:\Program Files\wxWidgets-2.8.7\contrib\include" /I"C:\Program Files\wxWidgets-2.8.7\lib\vc_dll\mswu" /I"C:\Program Files\Microsoft SDKs\Windows\v6.0A\include" /I"C:\Program Files\Microsoft Visual Studio 9.0\VC\include"  /c wxTestApp.cpp /FoRelease\wxTestApp.obj
wxTestApp.cpp
cl.exe /nologo /DWIN32 /D__WIN32__ /D__WXMSW__ /DWXUSINGDLL /DwxUSE_UNICODE /D_WINDOWS /TP /Gd /GF /EHsc /D_CRT_SECURE_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /Zc:wchar_t /D_VC80_UPGRADE=0x0600 /W3  /Ox /DNDEBUG /MD /O2 /Ob1    /I"C:\Program Files\wxWidgets-2.8.7\include" /I"C:\Program Files\wxWidgets-2.8.7\contrib\include" /I"C:\Program Files\wxWidgets-2.8.7\lib\vc_dll\mswu" /I"C:\Program Files\Microsoft SDKs\Windows\v6.0A\include" /I"C:\Program Files\Microsoft Visual Studio 9.0\VC\include"  /c wxTestMain.cpp /FoRelease\wxTestMain.obj
wxTestMain.cpp
rc.exe /I"C:\Program Files\wxWidgets-2.8.7\include" /I"C:\Program Files\wxWidgets-2.8.7\lib\vc_dll\mswu" /I"C:\Program Files\Microsoft SDKs\Windows\v6.0A\include" /I"C:\Program Files\Microsoft Visual Studio 9.0\VC\include"  -foRelease\resource.res resource.rc
Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
Copyright (C) Microsoft Corporation.  All rights reserved.
link.exe /nologo /subsystem:windows /LIBPATH:"C:\Program Files\wxWidgets-2.8.7\lib\vc_dll" /LIBPATH:"C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib" /LIBPATH:"C:\Program Files\Microsoft Visual Studio 9.0\VC\lib"  /out:Release\wxTest.exe msvcrt.lib wxmsw28u.lib winmm.lib rpcrt4.lib  Release\wxTestApp.obj Release\wxTestMain.obj  Release\resource.res  /NODEFAULTLIB:libcmt.lib /INCREMENTAL:NO /SUBSYSTEM:WINDOWS
Output size is 61.00 KB
Running target post-build steps
mt.exe /nologo /manifest "Release\wxTest.exe.manifest" /outputresource:"Release\wxTest.exe";1
Process terminated with status 0 (0 minutes, 4 seconds)
0 errors, 0 warnings
« Last Edit: June 15, 2008, 03:12:52 pm by uelkfr »

Offline uelkfr

  • Single posting newcomer
  • *
  • Posts: 4
Re: Problems with creating a wxwidgets Project
« Reply #16 on: June 15, 2008, 03:17:38 pm »
Yay!!! at last, it works! thank you all
Project > Build Options... > Linker Settings > Link Libraries: i have changed wxmsw28u.lib to wxmsw28ud.lib and now it works fine