www.digitalmars.com         C & C++   DMDScript  

c++.announce - wxWinmdows progress

reply "chris elliott" <biol75 york.ac.uk> writes:
I have downloaded the 8.34 release and checked that the digital mars
compiler will build the wxWindows library

I have also added makefiles for most wxWindows samples ; they nearly all
build and run

these are the exceptions - the ones marked by * I would not expect to build
with the default wxWindows settings for any compiler:

I have added makefiles for most of the wxSamples for the digital mars
compiler and checked this update works against current CVS

All samples compile (and all then run) except for the problems listed below:

* accessibility ( wxUSE_ACCESSIBILITY was not defined )
* console (not GUI mode)
* db (no database)
* display (no directX)
htlbox (a whole lot of undefined  symbols on linking)
* joystick (no joystick libary)
* memcheck (no debug context)
* mfc (??)
mulimonitor (error in linking wxDisplay)
* tab (setup.h does not define wxUSE_TAB_DIALOG)
taskbar (fails to link Undefined _Shell_NotifyIcon symbol)
vscroll (wxPaintDC not found)
wxtest (2 undefined symbols on linking)

chris
Jun 17 2003
parent reply Arjan Knepper <ask me.to> writes:
Chris,

Just runned a cvs update to checkout the latest changes.

A few things:

1. Why do you need all those extern "C" decl's? I'm able to compile the 
whole lib and all regular samples without the need to specify any 
explicit extern "C" linkage.

2. There are still __SC__ (for mac-os) defines in the source files which 
interfere the build process for win32. e.g. pngconf.h zconf.h

3. You seem to mix STRICT and NO_STRICT win32 api strict type checking 
resulting in doing hard cast from STRICT to NO_STRICT functionpointers 
and viceversa. e.g. src/msw/window.cpp LINE 179

4. As far as I know you have to make HAVE_BOOLEAN defined for 
src/common/imagjpeg.cpp otherwise the compiler will complain about 
src/jpeg/jmorecfg.

5. No problems with samples/htlbox, samples/multimonitor does not 
compile because wsDisplay :: GetDepth does not exist, samples/taskbar 
compiles and runs fine, samples/vscroll compiles and runs fine, 
samples/wxtest compiles and runs fine.

6. The compiler flags and defines from src/makesc.env differ from what I 
  use in the IDDE.
compiling the lib using flags and defines:
/////////////////////////////////////////////////////////////////////
sc GENERIC\selstore.cpp -cpp -Ae -Ar -mn -D_WINDOWS -5 -a8 -Nc -c -H 
-HDc:\temp\ph -HO- -DWXMSW -D__WIN32__ -D__WIN95__ -I..\include 
-I..\lib\msw -I.\jpeg -I.\png -I.\zlib -I.\tiff -I.\regex 
-odmc\release\selstore.obj
/////////////////////////////////////////////////////////////////////

compiling app using flags and defines:
/////////////////////////////////////////////////////////////////////
if not exist dmc\release\*.* md dmc\release
sc -cpp -Ae -Ar -mn -WA -5 -a8 -Nc -c -H -HDdmc\release -HO- -D__WIN95__ 
-I.\ -I..\..\include -I..\..\lib\msw -HFdmc\release\wxprec.SYM 
-odmc\release\wxprec.PCO ..\..\include\wx\wxprec.h
sc test.cpp -cpp -Ae -Ar -mn -WA -5 -a8 -Nc -c -H -HDdmc\release -HO- 
-D__WIN95__ -I.\ -I..\..\include -I..\..\lib\msw -odmc\release\test.obj
sc test_wdr.cpp -cpp -Ae -Ar -mn -WA -5 -a8 -Nc -c -H -HDdmc\release 
-HO- -D__WIN95__ -I.\ -I..\..\include -I..\..\lib\msw 
-odmc\release\test_wdr.obj
rcc -32 -I.\ -I..\..\include -I..\..\lib\msw -odmc\release\test.res test.rc
link /NOI /DE /PACKF /XN /NT /ENTRY:WinMainCRTStartup /BAS:4194304 
/A:512 /RC   :dmc\release\test.RES  dmcwxtest.LNK
ren .\$SCW$.EXE dmcwxtest.EXE
.\dmcwxtest.EXE built
Lines Processed: 189360  Errors: 0  Warnings: 0
Successful build
/////////////////////////////////////////////////////////////////////


In general I only needed to make a few changes to compile the whole 
thing with DMC v 8.34.

If you want those files let me know.

Good Luck

Arjan Knepper

chris elliott wrote:
 I have downloaded the 8.34 release and checked that the digital mars
 compiler will build the wxWindows library
 
 I have also added makefiles for most wxWindows samples ; they nearly all
 build and run
 
 these are the exceptions - the ones marked by * I would not expect to build
 with the default wxWindows settings for any compiler:
 
 I have added makefiles for most of the wxSamples for the digital mars
 compiler and checked this update works against current CVS
 
 All samples compile (and all then run) except for the problems listed below:
 
 * accessibility ( wxUSE_ACCESSIBILITY was not defined )
 * console (not GUI mode)
 * db (no database)
 * display (no directX)
 htlbox (a whole lot of undefined  symbols on linking)
 * joystick (no joystick libary)
 * memcheck (no debug context)
 * mfc (??)
 mulimonitor (error in linking wxDisplay)
 * tab (setup.h does not define wxUSE_TAB_DIALOG)
 taskbar (fails to link Undefined _Shell_NotifyIcon symbol)
 vscroll (wxPaintDC not found)
 wxtest (2 undefined symbols on linking)
 
 chris
 
 
Jun 17 2003
parent reply "chris elliott" <chris ampleforth.u-net.com> writes:
Thanks for checking this out... I have tried some of the compiler switches
you kindly suggest and my comments are below.

"Arjan Knepper" <ask me.to> wrote in message
news:bcn71q$16md$1 digitaldaemon.com...
 Chris,

 Just runned a cvs update to checkout the latest changes.

 A few things:

 1. Why do you need all those extern "C" decl's? I'm able to compile the
 whole lib and all regular samples without the need to specify any
 explicit extern "C" linkage.
I still get unresolved externals eg wxGetBusyCursor when making the minimal sample if I remove the extern "C" (adding -cpp -Nc to the commandline has no effect)
 2. There are still __SC__ (for mac-os) defines in the source files which
 interfere the build process for win32. e.g. pngconf.h zconf.h
I was asked to leave __SC__ in the code though I don't believe that any Symantec users could possibly compile a recent version of wxWindows


 3. You seem to mix STRICT and NO_STRICT win32 api strict type checking
 resulting in doing hard cast from STRICT to NO_STRICT functionpointers
 and viceversa. e.g. src/msw/window.cpp LINE 179
window.cpp won't compile for me without the cast
 4. As far as I know you have to make HAVE_BOOLEAN defined for
 src/common/imagjpeg.cpp otherwise the compiler will complain about
 src/jpeg/jmorecfg.
This is taken care of in the __SC__ defines (if I remember correctly). Should I add it for __DMC__ too
 5. No problems with samples/htlbox, samples/multimonitor does not
 compile because wsDisplay :: GetDepth does not exist, samples/taskbar
 compiles and runs fine, samples/vscroll compiles and runs fine,
 samples/wxtest compiles and runs fine.
Pleased to hear it : I'll look at them again
 6. The compiler flags and defines from src/makesc.env differ from what I
   use in the IDDE.
 compiling the lib using flags and defines:
 /////////////////////////////////////////////////////////////////////
 sc GENERIC\selstore.cpp -cpp -Ae -Ar -mn -D_WINDOWS -5 -a8 -Nc -c -H
 -HDc:\temp\ph -HO- -DWXMSW -D__WIN32__ -D__WIN95__ -I..\include
 -I..\lib\msw -I.\jpeg -I.\png -I.\zlib -I.\tiff -I.\regex
 -odmc\release\selstore.obj
 /////////////////////////////////////////////////////////////////////
I have looked at the docs again and don't see what difference there is between your settings and the ones I use to explain why i need the extern "C" I thought -cpp was the default ; I'd avoided Ae as there are no exceptions in wxWindows; -Ar did not seem to be encoureaged by the documentation. I have added -Nc and I also tried adding -HO- ( though I don't quite follow the effect of -HO-; the time taken to compile the library is the same with and without it, and if I specify an output directory with -HDadir)
 compiling app using flags and defines:
 /////////////////////////////////////////////////////////////////////
 if not exist dmc\release\*.* md dmc\release
 sc -cpp -Ae -Ar -mn -WA -5 -a8 -Nc -c -H -HDdmc\release -HO- -D__WIN95__
 -I.\ -I..\..\include -I..\..\lib\msw -HFdmc\release\wxprec.SYM
 -odmc\release\wxprec.PCO ..\..\include\wx\wxprec.h
I haven't turned on the precompiled headers (yet)
 sc test.cpp -cpp -Ae -Ar -mn -WA -5 -a8 -Nc -c -H -HDdmc\release -HO-
 -D__WIN95__ -I.\ -I..\..\include -I..\..\lib\msw -odmc\release\test.obj
 sc test_wdr.cpp -cpp -Ae -Ar -mn -WA -5 -a8 -Nc -c -H -HDdmc\release
 -HO- -D__WIN95__ -I.\ -I..\..\include -I..\..\lib\msw
 -odmc\release\test_wdr.obj
 rcc -32 -I.\ -I..\..\include -I..\..\lib\msw -odmc\release\test.res
test.rc
 link /NOI /DE /PACKF /XN /NT /ENTRY:WinMainCRTStartup /BAS:4194304
 /A:512 /RC   :dmc\release\test.RES  dmcwxtest.LNK
I tried these linker flags and still get the same unresolved externals - I can let you have the output chris
Jun 17 2003
parent reply Arjan Knepper <ask me.to> writes:
Can I use this (biol75 york.ac.uk) e-mail address to send you some 
private mail? Or do I have to use some other mail address.

Thanks
Arjan

arjan jak.nl

chris elliott wrote:
 Thanks for checking this out... I have tried some of the compiler switches
 you kindly suggest and my comments are below.
 
 "Arjan Knepper" <ask me.to> wrote in message
 news:bcn71q$16md$1 digitaldaemon.com...
 
Chris,

Just runned a cvs update to checkout the latest changes.

A few things:

1. Why do you need all those extern "C" decl's? I'm able to compile the
whole lib and all regular samples without the need to specify any
explicit extern "C" linkage.
I still get unresolved externals eg wxGetBusyCursor when making the minimal sample if I remove the extern "C" (adding -cpp -Nc to the commandline has no effect)
2. There are still __SC__ (for mac-os) defines in the source files which
interfere the build process for win32. e.g. pngconf.h zconf.h
I was asked to leave __SC__ in the code though I don't believe that any Symantec users could possibly compile a recent version of wxWindows
3. You seem to mix STRICT and NO_STRICT win32 api strict type checking
resulting in doing hard cast from STRICT to NO_STRICT functionpointers
and viceversa. e.g. src/msw/window.cpp LINE 179
window.cpp won't compile for me without the cast
4. As far as I know you have to make HAVE_BOOLEAN defined for
src/common/imagjpeg.cpp otherwise the compiler will complain about
src/jpeg/jmorecfg.
This is taken care of in the __SC__ defines (if I remember correctly). Should I add it for __DMC__ too
5. No problems with samples/htlbox, samples/multimonitor does not
compile because wsDisplay :: GetDepth does not exist, samples/taskbar
compiles and runs fine, samples/vscroll compiles and runs fine,
samples/wxtest compiles and runs fine.
Pleased to hear it : I'll look at them again
6. The compiler flags and defines from src/makesc.env differ from what I
  use in the IDDE.
compiling the lib using flags and defines:
/////////////////////////////////////////////////////////////////////
sc GENERIC\selstore.cpp -cpp -Ae -Ar -mn -D_WINDOWS -5 -a8 -Nc -c -H
-HDc:\temp\ph -HO- -DWXMSW -D__WIN32__ -D__WIN95__ -I..\include
-I..\lib\msw -I.\jpeg -I.\png -I.\zlib -I.\tiff -I.\regex
-odmc\release\selstore.obj
/////////////////////////////////////////////////////////////////////
I have looked at the docs again and don't see what difference there is between your settings and the ones I use to explain why i need the extern "C" I thought -cpp was the default ; I'd avoided Ae as there are no exceptions in wxWindows; -Ar did not seem to be encoureaged by the documentation. I have added -Nc and I also tried adding -HO- ( though I don't quite follow the effect of -HO-; the time taken to compile the library is the same with and without it, and if I specify an output directory with -HDadir)
compiling app using flags and defines:
/////////////////////////////////////////////////////////////////////
if not exist dmc\release\*.* md dmc\release
sc -cpp -Ae -Ar -mn -WA -5 -a8 -Nc -c -H -HDdmc\release -HO- -D__WIN95__
-I.\ -I..\..\include -I..\..\lib\msw -HFdmc\release\wxprec.SYM
-odmc\release\wxprec.PCO ..\..\include\wx\wxprec.h
I haven't turned on the precompiled headers (yet)
sc test.cpp -cpp -Ae -Ar -mn -WA -5 -a8 -Nc -c -H -HDdmc\release -HO-
-D__WIN95__ -I.\ -I..\..\include -I..\..\lib\msw -odmc\release\test.obj
sc test_wdr.cpp -cpp -Ae -Ar -mn -WA -5 -a8 -Nc -c -H -HDdmc\release
-HO- -D__WIN95__ -I.\ -I..\..\include -I..\..\lib\msw
-odmc\release\test_wdr.obj
rcc -32 -I.\ -I..\..\include -I..\..\lib\msw -odmc\release\test.res
test.rc
link /NOI /DE /PACKF /XN /NT /ENTRY:WinMainCRTStartup /BAS:4194304
/A:512 /RC   :dmc\release\test.RES  dmcwxtest.LNK
I tried these linker flags and still get the same unresolved externals - I can let you have the output chris
Jun 17 2003
parent Arjan Knepper <ask me.to> writes:
Chris,

Attached a zip file containing the files from the wxWindows cvs I 
changed to make it compile with dmc-8.34 and a the setup.h file I use.

Roadmap:
-Extract the archive and copy those files into your wxWindows src-tree 
overwriting the old ones.

cd %WXWIN%\src\msw
make -f makefile.sc

cd %WXWIN%\samples\minimal
make -f makefile.sc

With the dmc commandline compiler package v8.34 and a up to date 
commctrl.h and shlwapi.h in the compiler include dirs you should be able 
to compile the libs and most samples.


Things I changed:
1. Platform.h: commented out #define __DIGITALMARS__ and created a new 
define #define __DMCPP__
2. defs.h: Added __DMCPP__ to have HAVE_BOOL and HAVE_EXPLICIT
3. wxprec.h: added __DMCPP__ to make WX_PRECOMP defined (this also 
causes STRICT to be defined and solves the hard cast in window.cpp)
4. setup.h: disabled backward compatibility and a few other things like 
dialup etc
5. Makesc.env: added CPPFLAGS and changed the CFLAGS parameters and make 
precompiled headers work
6. Makefile.sc: removed dialup.obj and added a dependecy to create a 
precompiled header.

TODO:
-remove all __DIGITALMARS__ defines
-rename all __DMCPP__ defines to __DIGITALMARS__
-include the changes in the makefile's into to SC.T file and make the 
location of the precompiled headers defineable.
-streamline makesc.env
-...

Good luck,
Arjan Knepper
Jun 17 2003