Author Topic: wxWidgets 2.6 (MSW, GCC) installation instructions  (Read 105382 times)

Offline AkiraDev

  • Multiple posting newcomer
  • *
  • Posts: 71
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #120 on: February 24, 2006, 07:16:25 pm »
Assuming you used the C::B project wizard for wxWidgets apps, did you choose dynamic (DLL) or static linking in the dialog?

In case you chose "static" there may be a small bug in the prototype project file: it is incorrectly stating the linker working directory as $(WX_DIR)\lib\gcc_dll instead of $(WX_DIR)\lib\gcc_lib. Correct this and it should link fine.

Offline TDragon

  • Lives here!
  • ****
  • Posts: 936
    • Twilight Dragon Media
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #121 on: February 24, 2006, 07:35:27 pm »
Assuming you didn't use the included wxWidgets project template, create one and compare. There are three different configuration locations that need to match up:
  • Include paths,
  • #defines, and
  • Linked libraries
You must always have <wxwidgets>\include in your include paths.
You must also always have a configuration specific include path. If you're building with Windows DLL NON-unicode, it's <wxwidgets>\lib\<configuration>\msw; if you're building with Windows DLL Unicode, it's <wxwidgets>\lib\<configuration>\mswu.

If you're building for Windows, you must have "__WXMSW__", defined, and should have "HAVE_W32API_H" defined.
If you're building with the DLL, you must have "WXUSINGDLL" defined.
If you're building with the Unicode version, you must have "wxUSE_UNICODE" defined.

If you're building with the Windows DLL NON-Unicode, you must link with wxmsw26; if you're building with the Windows DLL Unicode, you must link with wxmsw26u.

As I mentioned before, all this is taken care of for you with the wxWidgets project template included with Code::Blocks. All you would need to change would be the paths with "gcc_dll" in them, if that isn't the name of your wxWidgets configuration (in the lib subdirectory). (And, if you're like me, delete the precompiled header.)
http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 5.1.0 2015-06-28, 32/64-bit, no extra DLLs)

Offline wittend

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #122 on: February 24, 2006, 09:36:19 pm »
Quote
If you're building for Windows, you must have "__WXMSW__", defined, and should have "HAVE_W32API_H" defined.
...
If you're building with the Unicode version, you must have "wxUSE_UNICODE" defined.

Thanks! This worked! I needed "HAVE_W32API_H" and/or "wxUSEUNICODE", did a clean, & then the build worked.  I really appreciate the help from everyone!

-- dave

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #123 on: February 24, 2006, 09:45:20 pm »
Thanks! This worked! I needed "HAVE_W32API_H" and/or "wxUSEUNICODE", did a clean, & then the build worked.  I really appreciate the help from everyone!
Great news! ;-)
Well, I wonder if this information should be put into the WiKi then. It seems worth it.
TDragon: Will you take the chance?
Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline TDragon

  • Lives here!
  • ****
  • Posts: 936
    • Twilight Dragon Media
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #124 on: February 24, 2006, 10:40:26 pm »
Maybe one of these days when I'm feeling documentative. :lol:

Come to think of it, I probably don't have modification rights on the CBwiki.
« Last Edit: February 24, 2006, 10:47:34 pm by TDragon »
http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 5.1.0 2015-06-28, 32/64-bit, no extra DLLs)

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #125 on: February 25, 2006, 04:10:59 pm »
Michael: Yep, I had layout problems too. In fact, I lost the debug toolbar entirely until I reverted to 2.6.2 and reset my layout settings to the default.

Thank you for your answer :). Yes, I have lost the debug toolbar and the todo list tab below. If I am not wrong we are until now 3 persons having tried 2.6.3-RC1 and having had layout problems. Takeshi Miya pointed me to a possible solution. I will give it a try ASAP.

Best wishes,
Michael

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #126 on: February 25, 2006, 04:35:54 pm »
Come to think of it, I probably don't have modification rights on the CBwiki.
You have to register before -> just as for the forum. Did you do that?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline TDragon

  • Lives here!
  • ****
  • Posts: 936
    • Twilight Dragon Media
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #127 on: February 25, 2006, 06:08:30 pm »
No, not yet. :)
http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 5.1.0 2015-06-28, 32/64-bit, no extra DLLs)

macwolf

  • Guest
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #128 on: March 23, 2006, 08:37:31 am »
I can't compile any wxWidgets program. Output is:
D:/CodeBlocks/include/wx/chkconf.h:92:9: #error "wxUSE_EXCEPTIONS must be defined."
D:/CodeBlocks/include/wx/chkconf.h:113:9: #error "wxUSE_DYNAMIC_LOADER must be defined."
D:/CodeBlocks/include/wx/chkconf.h:137:9: #error "wxUSE_MIMETYPE must be defined."
D:/CodeBlocks/include/wx/chkconf.h:153:9: #error "wxUSE_PROTOCOL must be defined."
D:/CodeBlocks/include/wx/chkconf.h:195:9: #error "wxUSE_REGEX must be defined."
D:/CodeBlocks/include/wx/chkconf.h:203:9: #error "wxUSE_STDPATHS must be defined."
D:/CodeBlocks/include/wx/chkconf.h:211:9: #error "wxUSE_XML must be defined."
D:/CodeBlocks/include/wx/chkconf.h:235:9: #error "wxUSE_STOPWATCH must be defined."
D:/CodeBlocks/include/wx/chkconf.h:243:9: #error "wxUSE_TEXTBUFFER must be defined."
D:/CodeBlocks/include/wx/chkconf.h:267:9: #error "wxUSE_URL must be defined."
D:/CodeBlocks/include/wx/chkconf.h:293:9: #error "wxUSE_BMPBUTTON must be defined."
D:/CodeBlocks/include/wx/chkconf.h:301:9: #error "wxUSE_BUTTON must be defined."
D:/CodeBlocks/include/wx/chkconf.h:309:9: #error "wxUSE_CALENDARCTRL must be defined."
D:/CodeBlocks/include/wx/chkconf.h:349:9: #error "wxUSE_CHOICEBOOK must be defined."
D:/CodeBlocks/include/wx/chkconf.h:357:9: #error "wxUSE_CHOICEDLG must be defined."
D:/CodeBlocks/include/wx/chkconf.h:373:9: #error "wxUSE_COLOURDLG must be defined."
D:/CodeBlocks/include/wx/chkconf.h:389:9: #error "wxUSE_DATAOBJ must be defined."
D:/CodeBlocks/include/wx/chkconf.h:397:9: #error "wxUSE_DATEPICKCTRL must be defined."
D:/CodeBlocks/include/wx/chkconf.h:405:9: #error "wxUSE_DISPLAY must be defined."
D:/CodeBlocks/include/wx/chkconf.h:421:9: #error "wxUSE_FILEDLG must be defined."
D:/CodeBlocks/include/wx/chkconf.h:429:9: #error "wxUSE_FONTDLG must be defined."
D:/CodeBlocks/include/wx/chkconf.h:437:9: #error "wxUSE_FONTMAP must be defined."
D:/CodeBlocks/include/wx/chkconf.h:477:9: #error "wxUSE_XRC must be defined."
D:/CodeBlocks/include/wx/chkconf.h:498:9: #error "wxUSE_ICO_CUR must be defined."
D:/CodeBlocks/include/wx/chkconf.h:506:9: #error "wxUSE_IFF must be defined."
D:/CodeBlocks/include/wx/chkconf.h:514:9: #error "wxUSE_IMAGLIST must be defined."
D:/CodeBlocks/include/wx/chkconf.h:522:9: #error "wxUSE_JOYSTICK must be defined."
D:/CodeBlocks/include/wx/chkconf.h:530:9: #error "wxUSE_LISTBOOK must be defined."
D:/CodeBlocks/include/wx/chkconf.h:546:9: #error "wxUSE_LISTCTRL must be defined."
D:/CodeBlocks/include/wx/chkconf.h:554:9: #error "wxUSE_LOGGUI must be defined."
D:/CodeBlocks/include/wx/chkconf.h:562:9: #error "wxUSE_LOGWINDOW must be defined."
D:/CodeBlocks/include/wx/chkconf.h:570:9: #error "wxUSE_LOG_DIALOG must be defined."
D:/CodeBlocks/include/wx/chkconf.h:578:9: #error "wxUSE_MDI must be defined."
D:/CodeBlocks/include/wx/chkconf.h:594:9: #error "wxUSE_MENUS must be defined."
D:/CodeBlocks/include/wx/chkconf.h:602:9: #error "wxUSE_MSGDLG must be defined."
D:/CodeBlocks/include/wx/chkconf.h:618:9: #error "wxUSE_PALETTE must be defined."
D:/CodeBlocks/include/wx/chkconf.h:626:9: #error "wxUSE_POPUPWIN must be defined."
D:/CodeBlocks/include/wx/chkconf.h:682:9: #error "wxUSE_SOUND must be defined."
D:/CodeBlocks/include/wx/chkconf.h:706:9: #error "wxUSE_SPLASH must be defined."
D:/CodeBlocks/include/wx/chkconf.h:714:9: #error "wxUSE_SPLITTER must be defined."
D:/CodeBlocks/include/wx/chkconf.h:722:9: #error "wxUSE_STATBMP must be defined."
D:/CodeBlocks/include/wx/chkconf.h:730:9: #error "wxUSE_STATBOX must be defined."
D:/CodeBlocks/include/wx/chkconf.h:746:9: #error "wxUSE_STATTEXT must be defined."
D:/CodeBlocks/include/wx/chkconf.h:762:9: #error "wxUSE_TAB_DIALOG must be defined."
D:/CodeBlocks/include/wx/chkconf.h:770:9: #error "wxUSE_TEXTCTRL must be defined."
D:/CodeBlocks/include/wx/chkconf.h:778:9: #error "wxUSE_TIPWINDOW must be defined."
D:/CodeBlocks/include/wx/chkconf.h:802:9: #error "wxUSE_TREECTRL must be defined."
D:/CodeBlocks/include/wx/chkconf.h:818:9: #error "wxUSE_WXHTML_HELP must be defined."
D:/CodeBlocks/include/wx/chkconf.h:909:13: #error "wxUSE_FS_INET requires wxUSE_PROTOCOL"
D:/CodeBlocks/include/wx/chkconf.h:939:9: #error "wxUSE_TEXTFILE requires wxUSE_TEXTBUFFER"

Did anyone had the same problem?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #129 on: March 23, 2006, 09:08:37 am »
I can't compile any wxWidgets program. Output is:
The includes are incorrect. Please post the full command line log (to be enabled int he compiler settings) so we can help you. You may want to use a wxWidgets template that ships with C::B, too.
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #130 on: March 23, 2006, 09:51:02 am »
I can't compile any wxWidgets program. Output is:
D:/CodeBlocks/include/wx/chkconf.h:92:9: #error "wxUSE_EXCEPTIONS must be defined."
[...]
Such messages appear for example if the setup.h file (normally found in include/wx/msw) which you include is not compatible with your wxWidgets build or is missing alltogether.

How could  it be missing, the compiler would throw an error, you ask? No, you do not necessarily get an error message, since there is usually another setup.h (completely unrelated) in your include dirs, and the compiler will use that one if it does not find the correct one.

Make sure that the include paths are properly set up. The easiest and most foolproof way is to do it as we do in the Code::Blocks build and which is assumed for the templates too: keep wxWidgets in one place (don't copy headers to D:/CodeBlocks/include/ like you did). Unzip it to some arbitrary location. Configure it there, compile it there, leave it there. Don't touch anything afterwards.
Then make a variable or global user variable (if you're using a recent build) pointing to the wx directory, and add $YOURVARIABLE/lib/gcc_dll/msw and $YOURVARIABLE/include to the top of compiler includes. If you use several builds (unicode / non-unicode, for example), you can use a second variable to distinguish builds, too.
That way, everything works, it is foolproof, and you can switch versions painlessly.

Please post the full command line log (to be enabled int he compiler settings) so we can help you.
Yes, that, and the version.
Whenever reporting any kind of problem, please always provide the exact program revision and the full build commandline. The best thing to do (if you have a recent build) is to click on the revision string in the "start here" page. That copies the revision information to the clipboard. Paste it as the first line of your post.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

macwolf

  • Guest
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #131 on: March 23, 2006, 02:48:54 pm »

I'm using Code::Blocks v1.0,WxWidgets 2.6.2, makefile done with gcc 3.9.0
trying to compile template from Code::Blocks.


I've tried to change path directly to Widgets installed on other drive:
Project   : wxWidgets application
Compiler  : GNU GCC Compiler (using GNU "make")
Directory : D:\CodeBlocks\widegt\
--------------------------------------------------------------------------------
mingw32-g++.exe -LC:/wxWidgets-2.6.2/lib/gcc_dll -LD:/CodeBlocks/lib -o D:/CodeBlocks/widegt/wxWidgets.exe .objs/main.o     -lwxmsw26 C:\wxWidgets-2.6.2\lib\gcc_dll\libwxregexu.a -mwindows
D:\CodeBlocks\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: cannot find -lwxmsw26
collect2: ld returned 1 exit status
make.exe: *** [D:/CodeBlocks/widegt/wxWidgets.exe] Error 1
Process terminated with status 1 (0 minutes, 2 seconds)

Build message:  ld.exe cannot find  -lwxmsw26


Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #132 on: March 23, 2006, 03:26:19 pm »
mingw32-g++.exe -LC:/wxWidgets-2.6.2/lib/gcc_dll
Build message:  ld.exe cannot find  -lwxmsw26
Why do you use forward slashes? This could be a problem. Furthermore: Is your wxWidgtes SDK really installed in C:/wxWidgets-2.6.2? This very much looks like a default value to me.
With regards, Morten.

Edit: BTW: You know that to compile a wxWidgets application you need the wxWidgets SDK (headers and libs) too, right? They not ship with C::B but have to be installed (and compiled) separately.
« Last Edit: March 23, 2006, 03:27:58 pm by MortenMacFly »
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #133 on: March 23, 2006, 03:27:59 pm »
the forward slashes don't harm

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: wxWidgets 2.6 (MSW, GCC) installation instructions
« Reply #134 on: March 23, 2006, 03:28:55 pm »
the forward slashes don't harm
Alright, but if there is no wxWidgets at this place this would harm. ;-)
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ