c++.wxwindows - Error compiling "controls" sample
- Alexis Golzman <alexis_golzman yahoo.com.ar> Oct 08 2003
- Alexis Golzman <alexis_golzman yahoo.com.ar> Oct 08 2003
- chris elliott <biol75 york.ac.uk> Oct 09 2003
- Alexis Golzman <alexis_golzman yahoo.com.ar> Oct 09 2003
- "Walter" <walter digitalmars.com> Oct 10 2003
- Arjan Knepper <arjan ask.me> Oct 10 2003
- chris elliott <biol75 york.ac.uk> Oct 13 2003
Hello, Why do I get these errors? sc App.cpp -cpp -Ae -mn -o+time -WA -ff -5 -a8 -Nc -c -H -HO- -Ip:\wxwindows\include -oApp.obj Error: p:\wxwindows\include\wx/msw/bitmap.h(86): 'wxBitmap::wxBitmap' is already defined Error: p:\wxwindows\include\wx/msw/icon.h(74): 'wxIcon::wxIcon' is already defined Lines Processed: 26736 Errors: 2 Warnings: 0 Build failed Thanks in advance, Alexis. http://alexisware.com PS: Sorry if I sent this twice!
Oct 08 2003
Sorry, This is what I get with the controls sample! sc controls.cpp -mn -o+time -WA -3 -a8 -c -Ip:\wxwindows\include -ocontrols.obj Error: p:\wxwindows\include\wx/msw/bitmap.h(86): 'wxBitmap::wxBitmap' is already defined Error: p:\wxwindows\include\wx/msw/icon.h(74): 'wxIcon::wxIcon' is already defined Lines Processed: 164806 Errors: 2 Warnings: 0 Build failed Almost the same I get with my test application. Thanks... Alexis.
Oct 08 2003
you need to compile it via the makefile, which set all sorts of conditonal tests, compiles the code with the required headers (precompiled) and links to the wxwindows library C:\wx\wx24b\samples\controls>make -f makefile.sc dmc -c -cpp -Ae -Ar -mn -D_WINDOWS -6 -a8 -Nc -c -H -HD..\..\d_mars -HO- -DWXMSW -D__WIN32__ -D__WIN95__ -D__WXDEBUG__ -I..\..\include -I..\..\lib\_sc -I..\..\ contrib\include -I..\../src/regex;..\../src/png;..\../src/jpeg;..\../src/zlib;.. \../src/tiff controls.cpp -ocontrols.obj rcc -D__NT__ -r -I..\..\include -I..\..\lib\_sc -I..\..\contrib\include -I..\../ src/regex;..\../src/png;..\../src/jpeg;..\../src/zlib;..\../src/tiff controls.rc link /DELEXECUTABLE /RC -L/exet:nt/su:windows controls.obj , controls.exe, cont rols, ..\..\lib\ wx_sc.lib png_sc tiff_sc jpeg_sc zlib_sc shell32_sc wsock32_sc winmm32_sc advapi32 comctl32 comdlg32 ctl3d32 gc gdi32 kernel32 ole32 oleaut32 snn user32 uuid Alexis Golzman wrote:Sorry, This is what I get with the controls sample! sc controls.cpp -mn -o+time -WA -3 -a8 -c -Ip:\wxwindows\include -ocontrols.obj Error: p:\wxwindows\include\wx/msw/bitmap.h(86): 'wxBitmap::wxBitmap' is already defined Error: p:\wxwindows\include\wx/msw/icon.h(74): 'wxIcon::wxIcon' is already defined Lines Processed: 164806 Errors: 2 Warnings: 0 Build failed Almost the same I get with my test application. Thanks... Alexis.
Oct 09 2003
chris elliott wrote:you need to compile it via the makefile, which set all sorts of conditonal tests, compiles the code with the required headers (precompiled) and links to the wxwindows library C:\wx\wx24b\samples\controls>make -f makefile.sc
Hmmm... This is the result of using that makefile: P:\wxWindows\samples\controls>p:\dm\bin\make -f makefile.sc FINAL=1 dmc -c -cpp -Ae -Ar -mn -D_WINDOWS -6 -a8 -Nc -c -H -HD..\..\d_mars -HO- -DWXMSW -D__WIN32__ -D__WIN95__ -D__WXDEBUG__ -I..\..\include -I..\..\lib\_sc -I..\..\ contrib\include -I..\../src/regex;..\../src/png;..\../src/jpeg;..\../src/zlib;.. \../src/tiff controls.cpp -ocontrols.obj }; ^ ..\..\include\wx/strconv.h(77) : Error: #include <typeinfo.h> in order to use RT TI const int ID_NOTEBOOK = 1000; ^ controls.cpp(364) : Error: #include <typeinfo.h> in order to use RTTI BEGIN_EVENT_TABLE(MyButton, wxButton) ^ controls.cpp(499) : Error: #include <typeinfo.h> in order to use RTTI BEGIN_EVENT_TABLE(MyComboBox, wxComboBox) ^ controls.cpp(503) : Error: #include <typeinfo.h> in order to use RTTI BEGIN_EVENT_TABLE(MyRadioBox, wxRadioBox) ^ controls.cpp(511) : Error: #include <typeinfo.h> in order to use RTTI Fatal error: too many errors --- errorlevel 1 --- errorlevel 1 Seems I'll stick to mingw32, which does the job. Although really slooooooooooooooooooowly! (ARGH). Thanks anyway, Alexis. PS: That "P:" drive is actually a pointer to the "c:\progtools" folder I created for programming tools that have to be installed on a root directory. I don't think that's the problem anyway...
Oct 09 2003
"Alexis Golzman" <alexis_golzman yahoo.com.ar> wrote in message news:bm4mvm$181r$1 digitaldaemon.com...chris elliott wrote:you need to compile it via the makefile, which set all sorts of conditonal tests, compiles the code with the required headers (precompiled) and links to the wxwindows library C:\wx\wx24b\samples\controls>make -f makefile.sc
Hmmm... This is the result of using that makefile: P:\wxWindows\samples\controls>p:\dm\bin\make -f makefile.sc FINAL=1 dmc -c -cpp -Ae -Ar -mn -D_WINDOWS -6 -a8 -Nc -c -H -HD..\..\d_mars -HO- -DWXMSW -D__WIN32__ -D__WIN95__ -D__WXDEBUG__ -I..\..\include -I..\..\lib\_sc -I..\..\ contrib\include -I..\../src/regex;..\../src/png;..\../src/jpeg;..\../src/zlib;.. \../src/tiff controls.cpp -ocontrols.obj }; ^ ..\..\include\wx/strconv.h(77) : Error: #include <typeinfo.h> in order to use RT TI const int ID_NOTEBOOK = 1000; ^ controls.cpp(364) : Error: #include <typeinfo.h> in order to use RTTI BEGIN_EVENT_TABLE(MyButton, wxButton) ^ controls.cpp(499) : Error: #include <typeinfo.h> in order to use RTTI BEGIN_EVENT_TABLE(MyComboBox, wxComboBox) ^ controls.cpp(503) : Error: #include <typeinfo.h> in order to use RTTI BEGIN_EVENT_TABLE(MyRadioBox, wxRadioBox) ^ controls.cpp(511) : Error: #include <typeinfo.h> in order to use RTTI Fatal error: too many errors --- errorlevel 1 --- errorlevel 1 Seems I'll stick to mingw32, which does the job. Although really slooooooooooooooooooowly! (ARGH).
Why not just add the flag -HItypeinfo.h and try that? Or take off the -Ar switch.
Oct 10 2003
Well you must be doing something wrong. It should compile without a problem. What version of wxWindows are you using? What is in your sc.ini file in the DM\bin dir? What is your environment set to? Arjan Alexis Golzman wrote:chris elliott wrote:you need to compile it via the makefile, which set all sorts of conditonal tests, compiles the code with the required headers (precompiled) and links to the wxwindows library C:\wx\wx24b\samples\controls>make -f makefile.sc
Hmmm... This is the result of using that makefile: P:\wxWindows\samples\controls>p:\dm\bin\make -f makefile.sc FINAL=1 dmc -c -cpp -Ae -Ar -mn -D_WINDOWS -6 -a8 -Nc -c -H -HD..\..\d_mars -HO- -DWXMSW -D__WIN32__ -D__WIN95__ -D__WXDEBUG__ -I..\..\include -I..\..\lib\_sc -I..\..\ contrib\include -I..\../src/regex;..\../src/png;..\../src/jpeg;..\../src/zlib;.. \../src/tiff controls.cpp -ocontrols.obj }; ^ ..\..\include\wx/strconv.h(77) : Error: #include <typeinfo.h> in order to use RT TI const int ID_NOTEBOOK = 1000; ^ controls.cpp(364) : Error: #include <typeinfo.h> in order to use RTTI BEGIN_EVENT_TABLE(MyButton, wxButton) ^ controls.cpp(499) : Error: #include <typeinfo.h> in order to use RTTI BEGIN_EVENT_TABLE(MyComboBox, wxComboBox) ^ controls.cpp(503) : Error: #include <typeinfo.h> in order to use RTTI BEGIN_EVENT_TABLE(MyRadioBox, wxRadioBox) ^ controls.cpp(511) : Error: #include <typeinfo.h> in order to use RTTI Fatal error: too many errors --- errorlevel 1 --- errorlevel 1 Seems I'll stick to mingw32, which does the job. Although really slooooooooooooooooooowly! (ARGH). Thanks anyway, Alexis. PS: That "P:" drive is actually a pointer to the "c:\progtools" folder I created for programming tools that have to be installed on a root directory. I don't think that's the problem anyway...
Oct 10 2003
Alexis Golzman wrote:chris elliott wrote:you need to compile it via the makefile, which set all sorts of conditonal tests, compiles the code with the required headers (precompiled) and links to the wxwindows library C:\wx\wx24b\samples\controls>make -f makefile.sc
Hmmm... This is the result of using that makefile: P:\wxWindows\samples\controls>p:\dm\bin\make -f makefile.sc FINAL=1
!if, so passing parameters to wxWindows is likely to have unpredictable results. Your failure to get the right include files suggests this is a possible explanation. Again, as Arjan asked, which version of wxWindows are you using? does make -f makefile.sc work?? chris
Oct 13 2003









"Walter" <walter digitalmars.com> 