Author Topic: problems with the compiled wxwidgets and code blocks.  (Read 16453 times)

code2d

  • Guest
problems with the compiled wxwidgets and code blocks.
« on: April 29, 2007, 11:38:51 pm »
I finally got around to compiling wxwidgets but I'm still having problems.

I'm running on Windows ME (basically 98) and using Wxwidgets 2.8.3 with the MinGW compiler with a 2 month old ANSI build of code blocks that I downloaded from seth.

This is the way I compiled Wxwidgets.

1.Downloaded Wxwidgets zip and extracted to the c drive so wxwidgets is in the C:\wxWidgets-2.8.3 directory.

2.open a cmd prompt, and navigate to the folder build/msw inside the wxWidgets folder

3.used the following commands in command prompt
Quote
set path=c:\mingw\bin;c:\mingw\mingw32\bin
 mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0 clean
 mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0
The last command was about 1 hour long.

4.Opened code blocks and went to file>new>project>wxWidgets project

5.Clicked next and selected 2.8.x>typed project title>next twice>selected C:\wxWidgets-2.8.3
for wxwidgets location>clicked next and left the stock compiler gnu gcc compiler>clicked use wxwidgets dll and wxwidgets is built as a monolithic library>I select no additional libraries

6.One warning come up "a matching debug configuration cannot be found in the wxwidgets directoy you specified this means that debug target of your project will not build"

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

Any ideas...
thanks for the help :?

edit: my svn is 3607
 
« Last Edit: April 29, 2007, 11:42:33 pm by code2d »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: problems with the compiled wxwidgets and code blocks.
« Reply #1 on: April 30, 2007, 12:04:04 am »
Try building the release target NOT the debug target. To build the debug target you have to compiled wxWidgets for debug build.

Quote
-------------- Build: Debug in bla ---------------

Tim S
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

code2d

  • Guest
Re: problems with the compiled wxwidgets and code blocks.
« Reply #2 on: April 30, 2007, 01:13:56 am »
so go through the same steps again but use "BUILD=debug" instead of "BUILD=release"?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: problems with the compiled wxwidgets and code blocks.
« Reply #3 on: April 30, 2007, 02:31:21 am »
so go through the same steps again but use "BUILD=debug" instead of "BUILD=release"?

Yeah, you can do that. But, if you just want to build the release version set it to "release" in CB "Build Target" and just build the release.

Tim S
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

code2d

  • Guest
Re: problems with the compiled wxwidgets and code blocks.
« Reply #4 on: April 30, 2007, 05:04:40 am »
yaaay it compiles. Thanks for the great help!!!

I do have a minor thing I wish I could change. the program's (exe) will not run unless "mingwm10.dll" and "wxmsw28d_gcc_custom.dll" are in the same folder. I does not matter because I have "mingwm10.dll" for code blocks and I just went and got "wxmsw28d_gcc_custom.dll" for lib in wxwidgets.   Is there a way I could could rename these files??? This would be handy but If I cant I'm still very much happy with what I have

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: problems with the compiled wxwidgets and code blocks.
« Reply #5 on: April 30, 2007, 05:19:21 am »
yaaay it compiles. Thanks for the great help!!!

I do have a minor thing I wish I could change. the program's (exe) will not run unless "mingwm10.dll" and "wxmsw28d_gcc_custom.dll" are in the same folder. I does not matter because I have "mingwm10.dll" for code blocks and I just went and got "wxmsw28d_gcc_custom.dll" for lib in wxwidgets.   Is there a way I could could rename these files??? This would be handy but If I cant I'm still very much happy with what I have

You can change the word "custom" to other words if you want.  If that is what you want use VENDOR=xyz in the wxWidget make and the dll will be "wxmsw28d_gcc_xyz.dll" instead of "wxmsw28d_gcc_custom.dll".

I have been told that if you put "mingwm10.dll" and "wxmsw28d_gcc_custom.dll" in a single folder and have that folder in the PATH environment variable that you will NOT have to copy it with each folder that has the exe. But, I have never done that because I am always creating special wxMSW DLLs and testing would be hard if I did that.

Tim S
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

parrimin

  • Guest
Re: problems with the compiled wxwidgets and code blocks.
« Reply #6 on: May 02, 2007, 01:16:18 pm »
Hi,
I fixed my problem of building the wxwidget project, but i still have the "wxmsw28_gcc_custom.dll not found" error. I have in the codeblock installed folder the files "wxmsw28u_gcc_cb.dll", and "mingwm10.dll". I thoudht they were the only files i had to extract...

I tried to rename my wxmsw28....dll file to the needed for exec, but it still says it can´t run. I saw there is a "wxmsw28_gcc_custom.dll" in "wxWidget installation folder"/lib, but... where must i copy this file to run?

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: problems with the compiled wxwidgets and code blocks.
« Reply #7 on: May 02, 2007, 01:26:12 pm »
... I saw there is a "wxmsw28_gcc_custom.dll" in "wxWidget installation folder"/lib, but... where must i copy this file to run?

Copy it to the same folder where your exe of wxwidgets project.
Be a part of the solution, not a part of the problem.

parrimin

  • Guest
Re: problems with the compiled wxwidgets and code blocks.
« Reply #8 on: May 02, 2007, 01:34:25 pm »
Thanks for your answer, but... not running. First, it says it cant find "mingwm10.dll". Then i copied this file too, and now it says "The application failed to initialize properly (0xc0000005). Click on OK to terminate the application.

But, I have another question... If I run the app successfully, and i want my project to run in other machines, i have to copy these two files too? There is no manner to avoid this?

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: problems with the compiled wxwidgets and code blocks.
« Reply #9 on: May 02, 2007, 01:43:06 pm »
But, I have another question... If I run the app successfully, and i want my project to run in other machines, i have to copy these two files too? There is no manner to avoid this?

Yes, you've to copy those files. But you can avoid that by compiling wxWidgets as a Static Library.
Be a part of the solution, not a part of the problem.

parrimin

  • Guest
Re: problems with the compiled wxwidgets and code blocks.
« Reply #10 on: May 02, 2007, 02:10:30 pm »
Uff, how can i compile wxWidgets as a Static Library.
I´ll explain what i did, for you to know what i did wrong.
-Unzipped codeblocks in d:\codeblocks.
-Unzipped wxWidgets in d:\wxWidgets.
-Unzipped MinGW in D:\MinGW.
-Unzipped mingwm10.dll & wxmsw28u_gcc_cb.dll in codeblocks folder.
-in cmd:
    - SET PATH=D:\MinGW\bin;D:\MinGW\mingw32\bin
    - in d:\wxWidgets\build\msw mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release clean
That manner i could select wxWidget project in codeblock but cant built. So:
    - in d:\wxWidgets\build\msw
        - mingw32-make -f makefile.gcc clean
        - mingw32-make.exe -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0

After all that, i discovered i had to built with release target, and built correctly, but can´t execute. You said i have to copy the dll´s where the executable is, so i copied both in:
d:\myProject\bin\Release\
and... thats all.

If you could explain what am i doing wrong please...
and how to compile wxwidgets as a static library

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: problems with the compiled wxwidgets and code blocks.
« Reply #11 on: May 02, 2007, 02:43:35 pm »
If you could explain what am i doing wrong please...
and how to compile wxwidgets as a static library

I don't see anything wrong in ur approach. But why the application fails is a mystery to me.

To build a static wx library, issue the following command.
Code
mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=0 UNICODE=0 BUILD=release
Be a part of the solution, not a part of the problem.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: problems with the compiled wxwidgets and code blocks.
« Reply #12 on: May 02, 2007, 08:16:00 pm »
FYI:

If building static, I recommend doing multilib (MONOLITHIC=0) build.
Tim S

Code
mingw32-make -f makefile.gcc MONOLITHIC=0 SHARED=0 UNICODE=0 BUILD=release
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

parrimin

  • Guest
Re: problems with the compiled wxwidgets and code blocks.
« Reply #13 on: May 03, 2007, 08:52:27 am »
Hey, it´s running!
I´ll explain what I did.
- in d:\wxWidgets\build\msw
        - mingw32-make -f makefile.gcc clean
        - mingw32-make.exe -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0 clean
        - mingw32-make.exe -f makefile.gcc SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 clean

I don´t know what am i doing when cleaning, and it´s not running, so i cleaned 3 times :lol:
After that, i picked:
- mingw32-make -f makefile.gcc MONOLITHIC=0 SHARED=0 UNICODE=0 BUILD=release

I opened a new wxWidget project, with:
- Use WxWidgets DLL, unchecked,
- wxWidgets is built as a monolithic library, unchecked.
- Enable Unicode, checked.

And a template window project is created. I selecte release target, and it´s built & running OK.

After that I tried to compile the demos included, but... how can i do that. I mean, open a new project, but from existing source. I tried to open directly the files in demos/bombs directory, and it created like a projec t, but when building, it says: wx/setup.h: no such file or directory.
And if i go to build->select target, I can see 16 targets, not just release an debug...

Anybody can explain what´s happening, and how to compile a demo?

Thanks guys

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: problems with the compiled wxwidgets and code blocks.
« Reply #14 on: May 03, 2007, 10:24:53 am »
If you want to compile the demos, then you need to follow same steps. Let's say you want to compile Minimal sample. Go to samples/minimal dir and issue the same command you've used to build wx. So if you've used-
Code
mingw32-make -f makefile.gcc MONOLITHIC=0 SHARED=0 UNICODE=0 BUILD=release
to build wx, then issue the same command inside samples/minimal folder.
Be a part of the solution, not a part of the problem.