Author Topic: wxWidgets won't compile  (Read 8792 times)

hehuj

  • Guest
wxWidgets won't compile
« on: May 07, 2007, 03:40:00 pm »
when i chose new -> project -> widgets and try to compile, i get this error

:: === gui, Debug ===
C:\wxWidgets-2.8.3\include\wx\setup.h:247: #error "This file should only be included when using Microsoft Visual C++"
C:\wxWidgets-2.8.3\include\wx\chkconf.h:98: #error "wxUSE_DYNLIB_CLASS must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:106: #error "wxUSE_EXCEPTIONS must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:114: #error "wxUSE_FILESYSTEM must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:122: #error "wxUSE_FS_ARCHIVE must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:135: #error "wxUSE_DYNAMIC_LOADER must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:143: #error "wxUSE_LOG must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:151: #error "wxUSE_LONGLONG must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:159: #error "wxUSE_MIMETYPE must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:175: #error "wxUSE_PRINTF_POS_PARAMS must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:183: #error "wxUSE_PROTOCOL must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:225: #error "wxUSE_REGEX must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:233: #error "wxUSE_STDPATHS must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:241: #error "wxUSE_XML must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:249: #error "wxUSE_SOCKETS must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:257: #error "wxUSE_STREAMS must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:265: #error "wxUSE_STOPWATCH must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:273: #error "wxUSE_TEXTBUFFER must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:281: #error "wxUSE_TEXTFILE must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:297: #error "wxUSE_URL must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:305: #error "wxUSE_VARIANT must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:325: #error "wxUSE_ABOUTDLG must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:333: #error "wxUSE_ACCEL must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:341: #error "wxUSE_ANIMATIONCTRL must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:349: #error "wxUSE_BITMAPCOMBOBOX must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:357: #error "wxUSE_BMPBUTTON must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:365: #error "wxUSE_BUTTON must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:373: #error "wxUSE_CALENDARCTRL must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:381: #error "wxUSE_CARET must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:389: #error "wxUSE_CHECKBOX must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:405: #error "wxUSE_CHOICE must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:413: #error "wxUSE_CHOICEBOOK must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:421: #error "wxUSE_CHOICEDLG must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:429: #error "wxUSE_CLIPBOARD must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:437: #error "wxUSE_COLLPANE must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:445: #error "wxUSE_COLOURDLG must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:453: #error "wxUSE_COLOURPICKERCTRL must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:461: #error "wxUSE_COMBOBOX must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:469: #error "wxUSE_COMBOCTRL must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:477: #error "wxUSE_DATAOBJ must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:485: #error "wxUSE_DATAVIEWCTRL must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:493: #error "wxUSE_DATEPICKCTRL must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:501: #error "wxUSE_DIRPICKERCTRL must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:509: #error "wxUSE_DISPLAY must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:517: #error "wxUSE_DOC_VIEW_ARCHITECTURE must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:525: #error "wxUSE_FILEDLG must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:533: #error "wxUSE_FILEPICKERCTRL must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:541: #error "wxUSE_FONTDLG must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:549: #error "wxUSE_FONTMAP must be defined."
C:\wxWidgets-2.8.3\include\wx\chkconf.h:557: #error "wxUSE_FONTPICKERCTRL must be defined."
:: More errors follow but not being shown.
:: Edit the max errors limit in compiler options...
:: === Build finished: 50 errors, 0 warnings ===



anything i can do to solve the problem?
(CodeBlocks is fantastic, keep up the good work :D)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: wxWidgets won't compile
« Reply #1 on: May 07, 2007, 05:12:59 pm »
Did you compile wxWidgets 2.8.3? Did you compile wxWidgets 2.8.3 for debug?
Does the setup.h file exists under the lib folder?
My setup.h is in lib\gcc_dll\mswu\wx folder.

What compiler are you using?

Tim S
« Last Edit: May 07, 2007, 05:21:30 pm 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

hehuj

  • Guest
Re: wxWidgets won't compile
« Reply #2 on: May 07, 2007, 07:48:07 pm »
im not sure... i thought it would just work when i installed it with the exe install file... the weird thing is that it used to work with wxDev-C++, but this one wont either

I have just checked and I can't find setup.h... how do i compile wxWidgets?

the compiler is MinGW, IDE CodeBlocks

thank you very much for helping me

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: wxWidgets won't compile
« Reply #3 on: May 07, 2007, 09:31:40 pm »
From
http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows#Compile_wxWidgets_in_Unicode_mode

Code
 
 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

The above is the standard command to build wxWidgets for use in building Code::Blocks; you may want different version, but I have no idea what version you want to have.

What OS? (Windows95, WindowsXP or etc.)
Do you wish an static or an DLL build?
Do you wish an debug build?

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

hehuj

  • Guest
Re: wxWidgets won't compile
« Reply #4 on: May 09, 2007, 06:47:49 pm »
winXP home, and the newest CB 3942, MinGW is the most resent stable.

when i try whit the code you gave me, it says:

mingw32-make: makefile.gcc: No Such file or directory
mingw32-make: *** No rule to make target 'makefile.gcc'.  Stop.

looks like it almost worked :D i don't know what the problem is with "makefile.gcc" hope you can help me again

the two last questions.. i am very new to this, i don't know what is best, and again thank you very much

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: wxWidgets won't compile
« Reply #5 on: May 09, 2007, 07:07:55 pm »
You must CD to the folder build\msw under the wxWidgets before running the commands.

Quote
the two last questions.. i am very new to this, i don't know what is best, and again thank you very much

Why do you need wxWidgets?
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

hehuj

  • Guest
Re: wxWidgets won't compile
« Reply #6 on: May 09, 2007, 07:43:05 pm »
I am trying to make some simple GUI programs, just for fun...

now it gives me a lot of errors: "wxUSE_******* must be defined" in file chkconf.h

when i try to compile some GUI, Codeblocks gives me this line: #error "This file should only be included when using Microsoft Visual C++"
« Last Edit: May 09, 2007, 07:55:18 pm by hehuj »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: wxWidgets won't compile
« Reply #7 on: May 09, 2007, 08:28:57 pm »
I am trying to make some simple GUI programs, just for fun...

now it gives me a lot of errors: "wxUSE_******* must be defined" in file chkconf.h

when i try to compile some GUI, Codeblocks gives me this line: #error "This file should only be included when using Microsoft Visual C++"

That problems in the project, you are not including the right folders/headers or you have not compiled wxWidgets to match what you are trying to use.

Find a project with detailed directions on how to build it and follow the steps, I learned by building Code::Blocks itself.
Without more info no one can help you.

Turn on full compiler logging in code::blocks under other options.

Quote
Steps to turn on Compiler Logging:
"Settings" -> "compiler debugger"
Change "Compiler Settings" to "Other Settings"
Set "Compiler Logging" to "Full Command Line"

Tim S
« Last Edit: May 09, 2007, 08:35:11 pm 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

hehuj

  • Guest
Re: wxWidgets won't compile
« Reply #8 on: May 09, 2007, 09:00:34 pm »
i have turned on full compiler logging, what do i do now? I still get the same errors, and i have no idea what is going on.

i don't know if it helps, but when I create a new wxwidgets project it says "a matching Release configuration cannot be found in the wxWidgets dir you specified."

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: wxWidgets won't compile
« Reply #9 on: May 09, 2007, 09:21:11 pm »
i have turned on full compiler logging, what do i do now? I still get the same errors, and i have no idea what is going on.

i don't know if it helps, but when I create a new wxwidgets project it says "a matching Release configuration cannot be found in the wxWidgets dir you specified."

Post the command that gives the errors. Compile the build of wxWidgets that your project needs.

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

hehuj

  • Guest
Re: wxWidgets won't compile
« Reply #10 on: May 09, 2007, 09:32:32 pm »
commands? all i did was following the "new wxwidgets project" wizard, or what the name for it is, and press F9 for compiling, and it wont work.

the errors from the console, cmd, and NOT inside CB come from the last command...

perhaps I should give up... thank you for your help and time... im sorry for my english, im not very good at it

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: wxWidgets won't compile
« Reply #11 on: May 09, 2007, 09:44:52 pm »
I assumed you had turn on logging when you said you did; I give up. Bye.
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