If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
-
xxbartosxx
- Knows some wx things

- Posts: 31
- Joined: Thu Sep 29, 2005 7:17 pm
-
Contact:
Post
by xxbartosxx » Mon Oct 03, 2005 12:21 pm
Hi I build wxWidgets as following:
'mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0 wxUSE_DISPLAY=1 VENDOR=cb'
This is explained in your 'samples/display/display.cpp' file of the wxWidget-2.6.2 distribution. But when I try to compile 'display.cpp' this is what the compiler spits:
Code: Select all
Project : wxDisplay
Compiler : GNU GCC Compiler (called directly)
Directory : C:\Documents and Settings\bart\My Documents\My CodeBlocks Projects\wxDisplay\
--------------------------------------------------------------------------------
Switching to target: default
Compiling: main.cpp
main.cpp:33:6: #error "To compile this sample you must build the library with wxUSE_DISPLAY set to 1"
main.cpp: In member function `virtual bool MyApp::OnInit()':
main.cpp:172: error: `wxDisplay' has not been declared
main.cpp:172: error: `UseDirectX' undeclared (first use this function)
main.cpp:172: error: (Each undeclared identifier is reported only once for each function it appears in.)
main.cpp: In constructor `MyFrame::MyFrame(const wxString&, const wxPoint&, const wxSize&, long int)':
main.cpp:233: error: `wxDisplay' has not been declared
main.cpp:233: error: `GetCount' undeclared (first use this function)
main.cpp:236: error: `wxDisplay' undeclared (first use this function)
main.cpp:236: error: expected `;' before "display"
main.cpp:244: error: `display' undeclared (first use this function)
main.cpp:268: error: `wxArrayVideoModes' does not name a type
main.cpp:269: error: `modes' undeclared (first use this function)
main.cpp: In member function `void MyFrame::OnChangeMode(wxCommandEvent&)':
main.cpp:355: error: `wxDisplay' undeclared (first use this function)
main.cpp:355: error: expected `;' before "dpy"
main.cpp:358: error: `dpy' undeclared (first use this function)
main.cpp: In member function `void MyFrame::OnResetMode(wxCommandEvent&)':
main.cpp:368: error: `wxDisplay' undeclared (first use this function)
main.cpp:368: error: expected `;' before "dpy"
main.cpp:370: error: `dpy' undeclared (first use this function)
main.cpp: In member function `void MyFrame::OnLeftClick(wxMouseEvent&)':
main.cpp:379: error: `wxDisplay' has not been declared
main.cpp:379: error: `GetFromPoint' undeclared (first use this function)
main.cpp: In member function `void MyFrame::OnDisplayChanged(wxDisplayChangedEvent&)':
main.cpp:401: error: `wxDisplay' undeclared (first use this function)
Process terminated with status 1 (0 minutes, 2 seconds)
20 errors, 0 warnings
Pls some advice.
I am Bart, who the hell are you?!?
-
xxbartosxx
- Knows some wx things

- Posts: 31
- Joined: Thu Sep 29, 2005 7:17 pm
-
Contact:
Post
by xxbartosxx » Mon Oct 03, 2005 2:24 pm
I changed in:
Code: Select all
include/wx/setup_inc.h
include/wx/msw/setup0.h
include/wx/msw/setup.h
lib/gcc_dll/msw/wx/setup.h
the line '#define wxUSE_DISPLAY 0' to '#define wxUSE_DISPLAY 1' but then when building the dll I get a error.
I don't think I needed to change that in all the files, prob. in one is enough but I don't know what one.
I could realy use some help here.
Grts Bart
I am Bart, who the hell are you?!?
-
NinjaNL
- Moderator

- Posts: 899
- Joined: Sun Oct 03, 2004 10:33 am
- Location: Oosterwolde, Netherlands
Post
by NinjaNL » Mon Oct 03, 2005 2:37 pm
You have to set your options in
and then copy that file to
.
Then compile your library.
Note that you would be best served to delete the lib_gcc folder you have as well as the msw_gcc folder which is probably under "build".
Then rebuild your library.
-
xxbartosxx
- Knows some wx things

- Posts: 31
- Joined: Thu Sep 29, 2005 7:17 pm
-
Contact:
Post
by xxbartosxx » Mon Oct 03, 2005 2:58 pm
No help I get this: (Its just the end of the compilation output)
Code: Select all
In file included from ../../src/msw/display.cpp:40:
../../include/wx/dynload.h:32: warning: type attributes are honored only at type
definition
../../include/wx/dynload.h:35: warning: type attributes are honored only at type
definition
../../include/wx/dynload.h:35: warning: type attributes are honored only at type
definition
In file included from ../../src/msw/display.cpp:42:
../../include/wx/display.h:24: warning: type attributes are honored only at type
definition
../../include/wx/display.h:25: warning: type attributes are honored only at type
definition
../../include/wx/display.h:26: warning: type attributes are honored only at type
definition
../../include/wx/display.h:27: warning: type attributes are honored only at type
definition
../../src/msw/display.cpp:63:22: multimon.h: No such file or directory
../../src/msw/display.cpp:69:19: ddraw.h: No such file or directory
../../src/msw/display.cpp:107: error: `LPDIRECTDRAW' has not been declared
../../src/msw/display.cpp:108: error: ISO C++ forbids declaration of `lplpDD' wi
th no type
../../src/msw/display.cpp:121: error: ISO C++ forbids declaration of `IDirectDra
w2' with no type
../../src/msw/display.cpp:121: error: expected `;' before '*' token
../../src/msw/display.cpp: In constructor `wxDisplayInfo::wxDisplayInfo()':
../../src/msw/display.cpp:133: error: `m_pDD2' undeclared (first use this functi
on)
../../src/msw/display.cpp:133: error: (Each undeclared identifier is reported on
ly once for each function it appears in.)
../../src/msw/display.cpp: In destructor `wxDisplayInfo::~wxDisplayInfo()':
../../src/msw/display.cpp:134: error: `m_pDD2' undeclared (first use this functi
on)
../../src/msw/display.cpp: At global scope:
../../src/msw/display.cpp:224: warning: `__stdcall__' attribute only applies to
function types
../../src/msw/display.cpp:224: error: `LPDDSURFACEDESC' was not declared in this
scope
../../src/msw/display.cpp:225: error: expected primary-expression before "lpCont
ext"
../../src/msw/display.cpp:226: error: initializer expression list treated as com
pound expression
../../src/msw/display.cpp:226: error: expected `,' or `;' before '{' token
../../src/msw/display.cpp: In function `bool DoInitDirectX()':
../../src/msw/display.cpp:277: error: `DDENUM_ATTACHEDSECONDARYDEVICES' undeclar
ed (first use this function)
../../src/msw/display.cpp:277: error: `DD_OK' undeclared (first use this functio
n)
../../src/msw/display.cpp: In constructor `wxDisplay::wxDisplay(size_t)':
../../src/msw/display.cpp:429: error: `LPDIRECTDRAW2' undeclared (first use this
function)
../../src/msw/display.cpp:429: error: `pDD2' undeclared (first use this function
)
../../src/msw/display.cpp:429: error: 'class wxDisplayInfo' has no member named
'm_pDD2'
../../src/msw/display.cpp:438: error: `IDirectDraw' undeclared (first use this f
unction)
../../src/msw/display.cpp:438: error: `pDD' undeclared (first use this function)
../../src/msw/display.cpp: In destructor `virtual wxDisplay::~wxDisplay()':
../../src/msw/display.cpp:472: error: `LPDIRECTDRAW2' undeclared (first use this
function)
../../src/msw/display.cpp:472: error: `pDD2' undeclared (first use this function
)
../../src/msw/display.cpp:472: error: 'class wxDisplayInfo' has no member named
'm_pDD2'
../../src/msw/display.cpp: In member function `virtual bool wxDisplay::IsOk() co
nst':
../../src/msw/display.cpp:486: error: 'class wxDisplayInfo' has no member named
'm_pDD2'
../../src/msw/display.cpp: In member function `wxArrayVideoModes wxDisplay::DoGe
tModesDirectX(const wxVideoMode&) const':
../../src/msw/display.cpp:587: error: `IDirectDraw2' undeclared (first use this
function)
../../src/msw/display.cpp:587: error: `pDD' undeclared (first use this function)
../../src/msw/display.cpp:587: error: 'class wxDisplayInfo' has no member named
'm_pDD2'
../../src/msw/display.cpp:593: error: `DDEDM_REFRESHRATES' undeclared (first use
this function)
../../src/msw/display.cpp: In member function `bool wxDisplay::DoChangeModeDirec
tX(const wxVideoMode&)':
../../src/msw/display.cpp:665: error: `IDirectDraw2' undeclared (first use this
function)
../../src/msw/display.cpp:665: error: `pDD' undeclared (first use this function)
../../src/msw/display.cpp:665: error: 'class wxDisplayInfo' has no member named
'm_pDD2'
../../src/msw/display.cpp:675: error: `DDSCL_EXCLUSIVE' undeclared (first use th
is function)
../../src/msw/display.cpp:676: error: `DDSCL_FULLSCREEN' undeclared (first use t
his function)
mingw32-make: *** [gcc_mswdll\monodll_display.o] Error 1
thx for your reply.
I am Bart, who the hell are you?!?
-
xxbartosxx
- Knows some wx things

- Posts: 31
- Joined: Thu Sep 29, 2005 7:17 pm
-
Contact:
Post
by xxbartosxx » Mon Oct 03, 2005 9:03 pm
Hi foun something, I think:
../../src/msw/display.cpp:63:22: multimon.h: No such file or directory
../../src/msw/display.cpp:69:19: ddraw.h: No such file or directory
whee should those 2 files be located because I can't locate them.
Pls help me
I am Bart, who the hell are you?!?
-
NinjaNL
- Moderator

- Posts: 899
- Joined: Sun Oct 03, 2004 10:33 am
- Location: Oosterwolde, Netherlands
Post
by NinjaNL » Tue Oct 04, 2005 4:41 am
Both are probably microsoft headers, and as such are not part of the wxWidgets disttribution.
I believe to get these you have to download the DirectX SDK.
-
xxbartosxx
- Knows some wx things

- Posts: 31
- Joined: Thu Sep 29, 2005 7:17 pm
-
Contact:
Post
by xxbartosxx » Tue Oct 04, 2005 6:49 am
Hi,
I am downloading it right now, but isn't this a bit strange you would need this as it is nowhere documented?
Yust my 2
I am Bart, who the hell are you?!?
-
vasek
- Experienced Solver

- Posts: 77
- Joined: Wed Jul 27, 2005 2:52 pm
- Location: Ostrava, Czech Republic
-
Contact:
Post
by vasek » Tue Oct 04, 2005 9:33 am
If you use DirectX, you need to download its SDK (should be present in newer versions of Platform SDK). If not, your platform SDK version is old and you should download newer one from MS.
-
xxbartosxx
- Knows some wx things

- Posts: 31
- Joined: Thu Sep 29, 2005 7:17 pm
-
Contact:
Post
by xxbartosxx » Tue Oct 04, 2005 9:57 am
I don't wanne use directx but if I wane compile wxWidget with support for wxDisplay, I am missing some headers like multimon.h & ddraw.h so he suggested to install the directx sdk. So I am downlodingb the file of 170megs at a speed of 12 KB/sec when my line can easely get 700KB/sec.
Got the sdk that first came out but I need the one that came out in august because i am on xp64 and the first one don't support that.
The reason I find it strange is that its nowhere documented that you needed the dx sdk if you wanted support for wxDisplay
I am Bart, who the hell are you?!?
-
mispunt
- Experienced Solver

- Posts: 59
- Joined: Tue Oct 19, 2004 3:23 pm
- Location: Ede, Holland
Post
by mispunt » Tue Oct 04, 2005 10:08 am
It is strange indeed.. an other strange thing is that you only need 12 MB of the SDK

OS: win XP pro
Compiler: MingW
wxWidgets version: 2.6.2
-
vasek
- Experienced Solver

- Posts: 77
- Joined: Wed Jul 27, 2005 2:52 pm
- Location: Ostrava, Czech Republic
-
Contact:
Post
by vasek » Tue Oct 04, 2005 10:17 am
Unfortunately, DirectX functions in display.cpp aren't compiled using #ifdefs, so ddraw.h is required.
Btw, multimon.h could be found at (
[email protected])
Code: Select all
// if you don't have multimon.h you can download the file from:
//
// http://www.microsoft.com/msj/0697/monitor/monitortextfigs.htm#fig4
//
-
xxbartosxx
- Knows some wx things

- Posts: 31
- Joined: Thu Sep 29, 2005 7:17 pm
-
Contact:
Post
by xxbartosxx » Tue Oct 04, 2005 7:21 pm
I installeed the directx sdk but still get the same error, pobably because I need to say where the directx libs and headerfiles are but I dont know how.
DXSDK_DIR is the enviroment variable that points to thedirectx sdk dir. so what do I need to add to my compile command so it finds the libs and includes
I am Bart, who the hell are you?!?
-
mispunt
- Experienced Solver

- Posts: 59
- Joined: Tue Oct 19, 2004 3:23 pm
- Location: Ede, Holland
Post
by mispunt » Tue Oct 04, 2005 8:38 pm
I just moved the include files to the include directory of the compiler and the libs to the lib directory

OS: win XP pro
Compiler: MingW
wxWidgets version: 2.6.2