Author Topic: To make wxWidgets-2.8.0 for work with Code::Blocks  (Read 5699 times)

Offline zingiel

  • Single posting newcomer
  • *
  • Posts: 8
To make wxWidgets-2.8.0 for work with Code::Blocks
« on: January 25, 2007, 12:43:49 am »
Hallo,

I have installed latest Code::Blocks (nigthly), MingW 5.1.3, wxwidgets_wizard_6.7, gdb-6.3-2 and wxWidgets-2.8.0.
Now, I can compile 'Win32 GUI project' (release i debug), so, compiler is o'k.
But when I try to create wxWidgets project then CB gets me messages:

'A matching Debug configuration cannot be found in the wxWidgets directory you specified.
This means that Debug target of your project will not build.

Are you sure you want to continue with these settings?'

and next

'A matching Release configuration cannot be found in the wxWidgets directory you specified.
This means that Release target of your project will not build.

Are you sure you want to continue with these settings?'

And next, when I try build my wx project then in 'Build log' I get:

'-------------- Build: Debug in testwxWidgets ---------------
Precompiling header: wx_pch.h
In file included from E:/programy/wxWidgets-2.8.0/include/wx/defs.h:21,
                 from E:/programy/wxWidgets-2.8.0/include/wx/wxprec.h:13,
                 from ./wx_pch.h:9,
                 from <command line>:8:
E:/programy/wxWidgets-2.8.0/include/wx/platform.h:196:22: wx/setup.h: No such file or directory
In file included from E:/programy/wxWidgets-2.8.0/include/wx/platform.h:279,
                 from E:/programy/wxWidgets-2.8.0/include/wx/defs.h:21,
                 from E:/programy/wxWidgets-2.8.0/include/wx/wxprec.h:13,
                 from ./wx_pch.h:9,
                 from <command line>:8:
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:98:9: #error "wxUSE_DYNLIB_CLASS must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:106:9: #error "wxUSE_EXCEPTIONS must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:114:9: #error "wxUSE_FILESYSTEM must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:122:9: #error "wxUSE_FS_ARCHIVE must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:135:9: #error "wxUSE_DYNAMIC_LOADER must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:143:9: #error "wxUSE_LOG must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:151:9: #error "wxUSE_LONGLONG must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:159:9: #error "wxUSE_MIMETYPE must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:175:9: #error "wxUSE_PRINTF_POS_PARAMS must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:183:9: #error "wxUSE_PROTOCOL must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:225:9: #error "wxUSE_REGEX must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:233:9: #error "wxUSE_STDPATHS must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:241:9: #error "wxUSE_XML must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:249:9: #error "wxUSE_SOCKETS must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:257:9: #error "wxUSE_STREAMS must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:265:9: #error "wxUSE_STOPWATCH must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:273:9: #error "wxUSE_TEXTBUFFER must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:281:9: #error "wxUSE_TEXTFILE must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:297:9: #error "wxUSE_URL must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:305:9: #error "wxUSE_VARIANT must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:325:9: #error "wxUSE_ABOUTDLG must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:333:9: #error "wxUSE_ACCEL must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:341:9: #error "wxUSE_ANIMATIONCTRL must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:349:9: #error "wxUSE_BITMAPCOMBOBOX must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:357:9: #error "wxUSE_BMPBUTTON must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:365:9: #error "wxUSE_BUTTON must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:373:9: #error "wxUSE_CALENDARCTRL must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:381:9: #error "wxUSE_CARET must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:389:9: #error "wxUSE_CHECKBOX must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:405:9: #error "wxUSE_CHOICE must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:413:9: #error "wxUSE_CHOICEBOOK must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:421:9: #error "wxUSE_CHOICEDLG must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:429:9: #error "wxUSE_CLIPBOARD must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:437:9: #error "wxUSE_COLLPANE must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:445:9: #error "wxUSE_COLOURDLG must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:453:9: #error "wxUSE_COLOURPICKERCTRL must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:461:9: #error "wxUSE_COMBOBOX must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:469:9: #error "wxUSE_COMBOCTRL must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:477:9: #error "wxUSE_DATAOBJ must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:485:9: #error "wxUSE_DATAVIEWCTRL must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:493:9: #error "wxUSE_DATEPICKCTRL must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:501:9: #error "wxUSE_DIRPICKERCTRL must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:509:9: #error "wxUSE_DISPLAY must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:517:9: #error "wxUSE_DOC_VIEW_ARCHITECTURE must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:525:9: #error "wxUSE_FILEDLG must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:533:9: #error "wxUSE_FILEPICKERCTRL must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:541:9: #error "wxUSE_FONTDLG must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:549:9: #error "wxUSE_FONTMAP must be defined."
E:/programy/wxWidgets-2.8.0/include/wx/chkconf.h:557:9: #error "wxUSE_FONTPICKERCTRL must be defined."
Process terminated with status 1 (0 minutes, 28 seconds)
50 errors, 0 warnings'

What am I to set in CB for building wxWidgets projects?

Zenek

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: To make wxWidgets-2.8.0 for work with Code::Blocks
« Reply #1 on: January 25, 2007, 01:31:12 am »
You have to compile wxWidgets library first.
You most likely only downloaded the source code.
See docs\msw\install.txt for directions on how to compile wxWidgets.

Here's the basic commands I use to compile wxWidgets; you can use it as a starting point.

Code
CD wxWidgets-2.8.0\build\msw
SET PATH=C:\MinGW\bin;C:\MinGW\mingw32\bin
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 CLEAN
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1
« Last Edit: January 25, 2007, 01:32:56 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline zingiel

  • Single posting newcomer
  • *
  • Posts: 8
Re: To make wxWidgets-2.8.0 for work with Code::Blocks
« Reply #2 on: January 27, 2007, 04:53:35 pm »
Thanks,
I was compiling this wxWidgets library and now I can to compile wx projects :)
but...
yet is little problem: my created 'exe' haves not wx 'lib' inside :(
this exe is small (ca 60kB) and I must to get wxWidgets dll :(

Hav can I to include this library to my exe?

Zenek

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: To make wxWidgets-2.8.0 for work with Code::Blocks
« Reply #3 on: January 27, 2007, 07:00:48 pm »
Thanks,
I was compiling this wxWidgets library and now I can to compile wx projects :)
but...
yet is little problem: my created 'exe' haves not wx 'lib' inside :(
this exe is small (ca 60kB) and I must to get wxWidgets dll :(

Hav can I to include this library to my exe?

Zenek

If you don't want to have to copy the wxWidgets DLL to your project, one solution is a static build of wxWidgets. To do a static build make sure SHARED=0. Note, you then have to change things in your project to use the static build. I don't use static builds in Code::Blocks but others do so it is possible.

Tim S

Code
CD wxWidgets-2.8.0\build\msw
SET PATH=C:\MinGW\bin;C:\MinGW\mingw32\bin
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=0 MONOLITHIC=1 BUILD=release UNICODE=1 CLEAN
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=0 MONOLITHIC=1 BUILD=release UNICODE=1
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline cbexaminr

  • Multiple posting newcomer
  • *
  • Posts: 104
Re: To make wxWidgets-2.8.0 for work with Code::Blocks
« Reply #4 on: January 28, 2007, 05:54:24 am »
Trying to build a wxsmith hello world test.  (My first wxsmith attempt.)

Appears default created wxsmith project wants the ANSI version of wxwidgets, rather than UNICODE...?

1)Is this so?
2)If it will use unicode wxwidgets, then what did I overlook creating the project?

(Got compilation errors similar to first post [although not the mismatched configuration messages he mentioned], and looking around, I found my compilation command shows references such as "-IC:\dlh\dev\wxwidgets\wxMSW-2.8.0\lib\gcc_dll\msw" rather than "-IC:\dlh\dev\wxwidgets\wxMSW-2.8.0\lib\gcc_dll\mswu"

- I'm currently trying to build wxwidgets UNICODE=0, but posting to request whatever additional info I may need to use UNICODE.)

[edit] using codeblocks built from svn fetch in last 24hours, against wxwidgets2.8.0unicode built some days ago - codeblocks itself built with the 10jan nightly

[edit2] A)DUH - I was still using the 10-jan nightly trying to create/build wxsmith project, not the codeblocks I had just built from svn.  B)recompiling ANSi wxwidgets did allow the wxsmith project to build...

So, still have the question, Can I, what can I do to, build wxwidgets/wxsmith project/appl with unicode vers. of wxwidgets?
« Last Edit: January 28, 2007, 11:08:55 am by cbexaminr »