Author Topic: Makefile compiling problems... ?  (Read 3819 times)

Offline Slazer

  • Single posting newcomer
  • *
  • Posts: 3
Makefile compiling problems... ?
« on: November 05, 2006, 06:13:05 am »
I know this question doesn't have anything to do with Code::Blocks but between this forum and the wxWidgets one, I find this one helps more from what I've read between the two (and I've posted in the wxWidgets forum before).

Anyway... I'm want to compile some of the sample programs that come with wxWidgets but I'm unable too. I don't know what I'm doing wrong. I don't have much experience with command-line compiling so I'm assuming I'm doing something wrong.

I have wxWidgets installed. I can create, compile and run the default program that is made in Code::Blocks when you choose to make a new "wxWidgets Application" so I know it is installed correctly (or I figure it is, otherwise, I have magic helping me compile wxWidgets programs, heh).

My problem is that when I try to compile a sample program I receive many many errors.
Code
C:\wxWidgets\samples\sockets>mingw32-make -f makefile.gcc

g++ -c -o gcc_mswd\client_client.o -g -O0 -mthreads  -DHAVE_W32API_H -D__WXMSW__
  -D__WXDEBUG__      -I.\..\..\lib\gcc_lib\mswd -I.\..\..\include -W -Wall -I.
-I.\..\..\samples -DNOPCH   -Wno-ctor-dtor-privacy   -MTgcc_mswd\client_client.o
 -MFgcc_mswd\client_client.o.d -MD client.cpp
In file included from ./../../include/wx/defs.h:21,
                 from ./../../include/wx/wxprec.h:13,
                 from client.cpp:26:
./../../include/wx/platform.h:190:22: wx/setup.h: No such file or directory
In file included from ./../../include/wx/platform.h:271,
                 from ./../../include/wx/defs.h:21,
                 from ./../../include/wx/wxprec.h:13,
                 from client.cpp:26:
./../../include/wx/chkconf.h:84:9: #error "wxUSE_DYNLIB_CLASS must be defined."
./../../include/wx/chkconf.h:92:9: #error "wxUSE_EXCEPTIONS must be defined."
./../../include/wx/chkconf.h:100:9: #error "wxUSE_FILESYSTEM must be defined."
./../../include/wx/chkconf.h:113:9: #error "wxUSE_DYNAMIC_LOADER must be defined
."
./../../include/wx/chkconf.h:121:9: #error "wxUSE_LOG must be defined."
./../../include/wx/chkconf.h:129:9: #error "wxUSE_LONGLONG must be defined."
./../../include/wx/chkconf.h:137:9: #error "wxUSE_MIMETYPE must be defined."
./../../include/wx/chkconf.h:153:9: #error "wxUSE_PROTOCOL must be defined."
./../../include/wx/chkconf.h:195:9: #error "wxUSE_REGEX must be defined."
./../../include/wx/chkconf.h:203:9: #error "wxUSE_STDPATHS must be defined."
./../../include/wx/chkconf.h:211:9: #error "wxUSE_XML must be defined."
./../../include/wx/chkconf.h:219:9: #error "wxUSE_SOCKETS must be defined."
./../../include/wx/chkconf.h:227:9: #error "wxUSE_STREAMS must be defined."
./../../include/wx/chkconf.h:235:9: #error "wxUSE_STOPWATCH must be defined."
./../../include/wx/chkconf.h:243:9: #error "wxUSE_TEXTBUFFER must be defined."
./../../include/wx/chkconf.h:251:9: #error "wxUSE_TEXTFILE must be defined."
./../../include/wx/chkconf.h:267:9: #error "wxUSE_URL must be defined."
./../../include/wx/chkconf.h:285:9: #error "wxUSE_ACCEL must be defined."
./../../include/wx/chkconf.h:293:9: #error "wxUSE_BMPBUTTON must be defined."
./../../include/wx/chkconf.h:301:9: #error "wxUSE_BUTTON must be defined."
./../../include/wx/chkconf.h:309:9: #error "wxUSE_CALENDARCTRL must be defined."

./../../include/wx/chkconf.h:317:9: #error "wxUSE_CARET must be defined."
./../../include/wx/chkconf.h:325:9: #error "wxUSE_CHECKBOX must be defined."
./../../include/wx/chkconf.h:341:9: #error "wxUSE_CHOICE must be defined."
./../../include/wx/chkconf.h:349:9: #error "wxUSE_CHOICEBOOK must be defined."
./../../include/wx/chkconf.h:357:9: #error "wxUSE_CHOICEDLG must be defined."
./../../include/wx/chkconf.h:365:9: #error "wxUSE_CLIPBOARD must be defined."
./../../include/wx/chkconf.h:373:9: #error "wxUSE_COLOURDLG must be defined."
./../../include/wx/chkconf.h:381:9: #error "wxUSE_COMBOBOX must be defined."
./../../include/wx/chkconf.h:389:9: #error "wxUSE_DATAOBJ must be defined."
./../../include/wx/chkconf.h:397:9: #error "wxUSE_DATEPICKCTRL must be defined."

./../../include/wx/chkconf.h:405:9: #error "wxUSE_DISPLAY must be defined."
./../../include/wx/chkconf.h:413:9: #error "wxUSE_DOC_VIEW_ARCHITECTURE must be
defined."
./../../include/wx/chkconf.h:421:9: #error "wxUSE_FILEDLG must be defined."
./../../include/wx/chkconf.h:429:9: #error "wxUSE_FONTDLG must be defined."
./../../include/wx/chkconf.h:437:9: #error "wxUSE_FONTMAP must be defined."
./../../include/wx/chkconf.h:445:9: #error "wxUSE_GAUGE must be defined."
./../../include/wx/chkconf.h:453:9: #error "wxUSE_GRID must be defined."
./../../include/wx/chkconf.h:461:9: #error "wxUSE_HELP must be defined."
./../../include/wx/chkconf.h:469:9: #error "wxUSE_HTML must be defined."
./../../include/wx/chkconf.h:477:9: #error "wxUSE_XRC must be defined."
./../../include/wx/chkconf.h:498:9: #error "wxUSE_ICO_CUR must be defined."
./../../include/wx/chkconf.h:506:9: #error "wxUSE_IFF must be defined."
./../../include/wx/chkconf.h:514:9: #error "wxUSE_IMAGLIST must be defined."
./../../include/wx/chkconf.h:522:9: #error "wxUSE_JOYSTICK must be defined."
./../../include/wx/chkconf.h:530:9: #error "wxUSE_LISTBOOK must be defined."
./../../include/wx/chkconf.h:538:9: #error "wxUSE_LISTBOX must be defined."
./../../include/wx/chkconf.h:546:9: #error "wxUSE_LISTCTRL must be defined."
./../../include/wx/chkconf.h:554:9: #error "wxUSE_LOGGUI must be defined."
./../../include/wx/chkconf.h:562:9: #error "wxUSE_LOGWINDOW must be defined."
./../../include/wx/chkconf.h:570:9: #error "wxUSE_LOG_DIALOG must be defined."
./../../include/wx/chkconf.h:578:9: #error "wxUSE_MDI must be defined."
./../../include/wx/chkconf.h:586:9: #error "wxUSE_MDI_ARCHITECTURE must be defin
ed."
./../../include/wx/chkconf.h:594:9: #error "wxUSE_MENUS must be defined."
./../../include/wx/chkconf.h:602:9: #error "wxUSE_MSGDLG must be defined."
./../../include/wx/chkconf.h:610:9: #error "wxUSE_NOTEBOOK must be defined."
./../../include/wx/chkconf.h:618:9: #error "wxUSE_PALETTE must be defined."
./../../include/wx/chkconf.h:626:9: #error "wxUSE_POPUPWIN must be defined."
./../../include/wx/chkconf.h:634:9: #error "wxUSE_PRINTING_ARCHITECTURE must be
defined."
./../../include/wx/chkconf.h:642:9: #error "wxUSE_RADIOBOX must be defined."
./../../include/wx/chkconf.h:650:9: #error "wxUSE_RADIOBTN must be defined."
./../../include/wx/chkconf.h:658:9: #error "wxUSE_SASH must be defined."
./../../include/wx/chkconf.h:666:9: #error "wxUSE_SCROLLBAR must be defined."
./../../include/wx/chkconf.h:674:9: #error "wxUSE_SLIDER must be defined."
./../../include/wx/chkconf.h:682:9: #error "wxUSE_SOUND must be defined."
./../../include/wx/chkconf.h:690:9: #error "wxUSE_SPINBTN must be defined."
./../../include/wx/chkconf.h:698:9: #error "wxUSE_SPINCTRL must be defined."
./../../include/wx/chkconf.h:706:9: #error "wxUSE_SPLASH must be defined."
./../../include/wx/chkconf.h:714:9: #error "wxUSE_SPLITTER must be defined."
./../../include/wx/chkconf.h:722:9: #error "wxUSE_STATBMP must be defined."
./../../include/wx/chkconf.h:730:9: #error "wxUSE_STATBOX must be defined."
./../../include/wx/chkconf.h:738:9: #error "wxUSE_STATLINE must be defined."
./../../include/wx/chkconf.h:746:9: #error "wxUSE_STATTEXT must be defined."
./../../include/wx/chkconf.h:754:9: #error "wxUSE_STATUSBAR must be defined."
./../../include/wx/chkconf.h:762:9: #error "wxUSE_TAB_DIALOG must be defined."
./../../include/wx/chkconf.h:770:9: #error "wxUSE_TEXTCTRL must be defined."
./../../include/wx/chkconf.h:778:9: #error "wxUSE_TIPWINDOW must be defined."
./../../include/wx/chkconf.h:786:9: #error "wxUSE_TOOLBAR must be defined."
./../../include/wx/chkconf.h:794:9: #error "wxUSE_TOOLTIPS must be defined."
./../../include/wx/chkconf.h:802:9: #error "wxUSE_TREECTRL must be defined."
./../../include/wx/chkconf.h:810:9: #error "wxUSE_VALIDATORS must be defined."
./../../include/wx/chkconf.h:818:9: #error "wxUSE_WXHTML_HELP must be defined."
./../../include/wx/chkconf.h:1543:9: #error "wxMessageBox is always needed"
client.cpp:88: error: variable or field `OnSocketEvent' declared void
client.cpp:88: error: expected `;' before '(' token
client.cpp:94: error: ISO C++ forbids declaration of `wxSocketClient' with no ty
pe
client.cpp:94: error: expected `;' before '*' token
client.cpp:95: error: ISO C++ forbids declaration of `wxTextCtrl' with no type
client.cpp:95: error: expected `;' before '*' token
client.cpp:147: error: `OnSocketEvent' is not a member of `MyFrame'
client.cpp:147: error: `EVT_SOCKET' was not declared in this scope
client.cpp:148: error: expected `}' before "wxEventTableEntry"
client.cpp:148: error: expected `,' or `;' before "wxEventTableEntry"
client.cpp:148: error: expected declaration before '}' token
mingw32-make: *** [gcc_mswd\client_client.o] Error 1

I'm only guessing what I have to type on the command line, ie:  mingw32-make -f makefile.gcc, so if it something wrong with that then, well I'm an idiot heh. But if it does have something to do with my install of wxWidgets then I guess I will have to ask for help on fixing that.

Any help on this would be much appreciated. =)

Offline jpaterso

  • Multiple posting newcomer
  • *
  • Posts: 57
Re: Makefile compiling problems... ?
« Reply #1 on: November 05, 2006, 07:17:02 am »
Slazer,

I think you'll find that you need to copy the setup.h file that is either in wx/msw or in wx/univ into the wx/ directory.
The video found at http://www.wxwidgets.info/?q=wxwidgets_and_codeblocks_video_win might help you.

Hope that helps,

Joseph.

Offline Slazer

  • Single posting newcomer
  • *
  • Posts: 3
Re: Makefile compiling problems... ?
« Reply #2 on: November 05, 2006, 07:39:24 am »
I did what you suggested, jpaterso. It still didn't work, but this time I got different errors.

Code
C:\wxWidgets\samples\sockets>mingw32-make -f makefile.gcc
if not exist gcc_mswd mkdir gcc_mswd
g++ -c -o gcc_mswd\client_client.o -g -O0 -mthreads  -DHAVE_W32API_H -D__WXMSW__
  -D__WXDEBUG__      -I.\..\..\lib\gcc_lib\mswd -I.\..\..\include -W -Wall -I.
-I.\..\..\samples -DNOPCH   -Wno-ctor-dtor-privacy   -MTgcc_mswd\client_client.o
 -MFgcc_mswd\client_client.o.d -MD client.cpp
windres --use-temp-file -iclient.rc -ogcc_mswd\client_client_rc.o   --define __W
XMSW__  --define __WXDEBUG__      --include-dir .\..\..\lib\gcc_lib\mswd --inclu
de-dir ./../../include --include-dir .  --include-dir ./../../samples --define N
OPCH
g++ -o gcc_mswd\client.exe gcc_mswd\client_client.o gcc_mswd\client_client_rc.o
 -g -mthreads -L.\..\..\lib\gcc_lib -Wl,--subsystem,windows -mwindows  -lwxmsw26
d_core  -lwxbase26d_net  -lwxbase26d   -lwxtiffd -lwxjpegd -lwxpngd -lwxzlibd  -
lwxregexd -lwxexpatd   -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm
 -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -l
odbc32
C:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: cannot fin
d -lwxmsw26d_core
collect2: ld returned 1 exit status
mingw32-make: *** [gcc_mswd\client.exe] Error 1

Correct me if I'm wrong but it looks like it's looking for a non-monolithic build of wxWidgets... so I'm still lost.
« Last Edit: November 05, 2006, 09:03:32 am by Slazer »