Author Topic: Error compiling application with MinGW, wxwidget 2.6.1 and code block  (Read 5396 times)

aiwagan

  • Guest
I get following errors when compiling with mingw, wxwidget 2.6.1 and code block.Can anybody help me out.I have basically copied lib and include files in base MinGW folder.

Project   : wxWidgets application
Compiler  : GNU GCC Compiler (called directly)
Directory : D:\projects\
--------------------------------------------------------------------------------
Switching to target: default
Compiling: main.cpp
In file included from C:/MinGW/include/wx/platform.h:263,
                 from C:/MinGW/include/wx/defs.h:21,
                 from C:/MinGW/include/wx/wxprec.h:13,
                 from main.cpp:1:
C:/MinGW/include/wx/chkconf.h:92:9: #error "wxUSE_EXCEPTIONS must be defined."
C:/MinGW/include/wx/chkconf.h:113:9: #error "wxUSE_DYNAMIC_LOADER must be defined."
C:/MinGW/include/wx/chkconf.h:137:9: #error "wxUSE_MIMETYPE must be defined."
C:/MinGW/include/wx/chkconf.h:153:9: #error "wxUSE_PROTOCOL must be defined."
C:/MinGW/include/wx/chkconf.h:195:9: #error "wxUSE_REGEX must be defined."
C:/MinGW/include/wx/chkconf.h:203:9: #error "wxUSE_STDPATHS must be defined."
C:/MinGW/include/wx/chkconf.h:211:9: #error "wxUSE_XML must be defined."
C:/MinGW/include/wx/chkconf.h:235:9: #error "wxUSE_STOPWATCH must be defined."
C:/MinGW/include/wx/chkconf.h:243:9: #error "wxUSE_TEXTBUFFER must be defined."
C:/MinGW/include/wx/chkconf.h:267:9: #error "wxUSE_URL must be defined."
C:/MinGW/include/wx/chkconf.h:293:9: #error "wxUSE_BMPBUTTON must be defined."
C:/MinGW/include/wx/chkconf.h:301:9: #error "wxUSE_BUTTON must be defined."
C:/MinGW/include/wx/chkconf.h:309:9: #error "wxUSE_CALENDARCTRL must be defined."
C:/MinGW/include/wx/chkconf.h:349:9: #error "wxUSE_CHOICEBOOK must be defined."
C:/MinGW/include/wx/chkconf.h:357:9: #error "wxUSE_CHOICEDLG must be defined."
C:/MinGW/include/wx/chkconf.h:373:9: #error "wxUSE_COLOURDLG must be defined."
C:/MinGW/include/wx/chkconf.h:389:9: #error "wxUSE_DATAOBJ must be defined."
C:/MinGW/include/wx/chkconf.h:397:9: #error "wxUSE_DATEPICKCTRL must be defined."
C:/MinGW/include/wx/chkconf.h:405:9: #error "wxUSE_DISPLAY must be defined."
C:/MinGW/include/wx/chkconf.h:421:9: #error "wxUSE_FILEDLG must be defined."
C:/MinGW/include/wx/chkconf.h:429:9: #error "wxUSE_FONTDLG must be defined."
C:/MinGW/include/wx/chkconf.h:437:9: #error "wxUSE_FONTMAP must be defined."
C:/MinGW/include/wx/chkconf.h:477:9: #error "wxUSE_XRC must be defined."
C:/MinGW/include/wx/chkconf.h:498:9: #error "wxUSE_ICO_CUR must be defined."
C:/MinGW/include/wx/chkconf.h:506:9: #error "wxUSE_IFF must be defined."
C:/MinGW/include/wx/chkconf.h:514:9: #error "wxUSE_IMAGLIST must be defined."
C:/MinGW/include/wx/chkconf.h:522:9: #error "wxUSE_JOYSTICK must be defined."
C:/MinGW/include/wx/chkconf.h:530:9: #error "wxUSE_LISTBOOK must be defined."
C:/MinGW/include/wx/chkconf.h:546:9: #error "wxUSE_LISTCTRL must be defined."
C:/MinGW/include/wx/chkconf.h:554:9: #error "wxUSE_LOGGUI must be defined."
C:/MinGW/include/wx/chkconf.h:562:9: #error "wxUSE_LOGWINDOW must be defined."
C:/MinGW/include/wx/chkconf.h:570:9: #error "wxUSE_LOG_DIALOG must be defined."
C:/MinGW/include/wx/chkconf.h:578:9: #error "wxUSE_MDI must be defined."
C:/MinGW/include/wx/chkconf.h:594:9: #error "wxUSE_MENUS must be defined."
C:/MinGW/include/wx/chkconf.h:602:9: #error "wxUSE_MSGDLG must be defined."
C:/MinGW/include/wx/chkconf.h:618:9: #error "wxUSE_PALETTE must be defined."
C:/MinGW/include/wx/chkconf.h:626:9: #error "wxUSE_POPUPWIN must be defined."
C:/MinGW/include/wx/chkconf.h:682:9: #error "wxUSE_SOUND must be defined."
C:/MinGW/include/wx/chkconf.h:706:9: #error "wxUSE_SPLASH must be defined."
C:/MinGW/include/wx/chkconf.h:714:9: #error "wxUSE_SPLITTER must be defined."
C:/MinGW/include/wx/chkconf.h:722:9: #error "wxUSE_STATBMP must be defined."
C:/MinGW/include/wx/chkconf.h:730:9: #error "wxUSE_STATBOX must be defined."
C:/MinGW/include/wx/chkconf.h:746:9: #error "wxUSE_STATTEXT must be defined."
C:/MinGW/include/wx/chkconf.h:762:9: #error "wxUSE_TAB_DIALOG must be defined."
C:/MinGW/include/wx/chkconf.h:770:9: #error "wxUSE_TEXTCTRL must be defined."
C:/MinGW/include/wx/chkconf.h:778:9: #error "wxUSE_TIPWINDOW must be defined."
C:/MinGW/include/wx/chkconf.h:802:9: #error "wxUSE_TREECTRL must be defined."
C:/MinGW/include/wx/chkconf.h:818:9: #error "wxUSE_WXHTML_HELP must be defined."
C:/MinGW/include/wx/chkconf.h:909:13: #error "wxUSE_FS_INET requires wxUSE_PROTOCOL"
C:/MinGW/include/wx/chkconf.h:939:9: #error "wxUSE_TEXTFILE requires wxUSE_TEXTBUFFER"
Process terminated with status 1 (0 minutes, 38 seconds)
52 errors, 0 warnings

aiwagan

  • Guest
Re: Error compiling application with MinGW, wxwidget 2.6.1 and code block
« Reply #1 on: August 26, 2005, 02:00:16 pm »
OK i got the solution copied setup.h into wx include folder under MinGW, but now i have nother problem linker is not working why???
Here is the linker output

Project   : wxWidgets application
Compiler  : GNU GCC Compiler (called directly)
Directory : D:\projects\
--------------------------------------------------------------------------------
Switching to target: default
Compiling: main.cpp
Linking executable: D:\projects\wxWidgets.exe
C:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: cannot find -lwxmsw
collect2: ld returned 1 exit status
Process terminated with status 1 (1 minutes, 1 seconds)
1 errors, 0 warnings

Offline grv575

  • Official tester
  • Regular
  • ***
  • Posts: 381
Re: Error compiling application with MinGW, wxwidget 2.6.1 and code block
« Reply #2 on: August 26, 2005, 03:10:39 pm »
well libwxmsw.a doesn't exist...
change the it to link against the file which does exists (libwxmsw26.a or whatever).

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Error compiling application with MinGW, wxwidget 2.6.1 and code block
« Reply #3 on: August 26, 2005, 05:32:06 pm »
libwxmsw is the STATIC library. libwxmsw26 or whatever is the library which makes the program use the corresponding DLL.

When you make wxwidgets there should be a libwxmsw.a generated (i don't remember well, but i think there was an option to specify creating a static library).

Offline grv575

  • Official tester
  • Regular
  • ***
  • Posts: 381
Re: Error compiling application with MinGW, wxwidget 2.6.1 and code block
« Reply #4 on: August 27, 2005, 02:03:50 am »
libwxmsw26.a can't be an import library (besides gcc doesn't generate those like msvc does) -- it's 12Megs.
I think it's libwxmsw26.a is the static 2.6 lib and the dll can be used if WXUSINGDLL is defined.

What I think the problem is, is that the template uses -lwxmsw since it could be either -lwxmsw24 or -lwxmsw26.  I believe it used to do something like -lwxmsw$(WX_VER) but that seems to have been removed.  Maybe the WX_VER should be used again for the wxwidgets template (but I guess a no file -lwxmsw$(WX_VER) error message could be confusing).

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Error compiling application with MinGW, wxwidget 2.6.1 and code block
« Reply #5 on: August 27, 2005, 02:23:13 am »
At least for 2.4.2, i HAVE generated libwxmsw.a files. I think that you have to specify SHARED=0 when making the wx2.6 lib. For 2.4 it was just removing WXMAKINGDLL=1 from the command line make.

Offline grv575

  • Official tester
  • Regular
  • ***
  • Posts: 381
Re: Error compiling application with MinGW, wxwidget 2.6.1 and code block
« Reply #6 on: August 27, 2005, 02:38:25 am »
Yeah, sorry I think you're right (so forget what I said about gcc not using import libs).  Looking at libwxmsw26.a with a hex editor, it's all  import symbols with dll offsets - 12M of IDTs.  I wonder how big the static library gets.