www.digitalmars.com         C & C++   DMDScript  

c++.announce - wxWindows 2.5 (current cvs checkout)

reply Arjan Knepper <ask me.to> writes:
Chris,

If you still there, I have done a cvs checkout to get the latest 
wxWindows src-tree. After disabling the __DIGITALMARS__ define for 
__DMC__ you made and making a new define for it in platform.h I had 
almost no trouble to recompile the libs and samples, no link problems at 
all.

I had to disable a lot of preprocessor stuff left in for __SC__ by also 
checking for __DMC__ e.g.

old: #if defined(__SC__)
new: #if (defined(__SC__) && !defined(__DMC__))

After that and a few minor things I was able to recompile the libs and a 
  the samples.

I don;t know what caused your problems, I guess wrong or missing 
compiler options.

Here is a sample line from the wxWindows lib:

sc COMMON\taskbarcmn.cpp -cpp -Ae -Ar -mn -D_WINDOWS -S -5 -a8 -Nc -c -H 
-HDc:\temp\ph -HO- -gf -DWXMSW -D__WIN32__ -D__WIN95__ -D_DEBUG=1 
-I..\include -I..\lib\msw -I.\jpeg -I.\png -I.\zlib -I.\tiff -I.\regex 
-odmc\debug\taskbarcmn.obj


Here is a sample line from the minimal sample:

sc minimal.cpp -cpp -Ae -Ar -mn -WA -S -5 -a8 -Nc -c -H -HDdmc\release 
-HO- -gf -D__WIN95__ -D_DEBUG=1 -I.\ -I..\..\include -I..\..\lib\msw 
-odmc\debug\minimal.obj
rcc -32 -I.\ -I..\..\include -I..\..\lib\msw -odmc\debug\minimal.res 
minimal.rc
link /CO /NOI /DE /PACKF /XN /NT /ENTRY:WinMainCRTStartup /BAS:4194304 
/A:512 /RC   :dmc\debug\minimal.RES  dmcminimal.LNK

And yes I use the precompiled header feature it sure speeds up the 
compiling cicle!!

Good luck
Arjan Knepper
May 03 2003
next sibling parent reply "donh" <null device.com> writes:
I'm a bit of a beginner messing around with trying to get wxWindows to
compile with DMC. I pulled down the CVS copy from 30 April and set about
making the changes you mentioned. How do you work around the template
problem in rawbmp.h? Thank you.

I think this is the template that the compiler stops on...

template <class Image, class PixelFormat = wxPixelFormatFor<Image> >
class wxPixelData :
    public wxPixelDataOut<Image>::template wxPixelDataIn<PixelFormat>
{
public:
    wxPixelData(const Image& image)
        : wxPixelDataOut<Image>::template wxPixelDataIn<PixelFormat>(image)
        {
        }
};

dmc -c -o -cpp -Ae -Ar -mn -D_WINDOWS -S -5 -a8 -Nc -c -H -HDc:\temp\ph -HO-
 -gf
 -DWXMSW -D__WIN32__ -D__WIN95__ -D_DEBUG=1 -I.\include -I..\lib\msw -I.\jpe
g -I
.\png -I.\zlib -I.\tiff -I.\regex  -Ic:\wxWin\include -Ic:\wxWin\lib\_sc
c:\wxWin\src\msw\dc.cpp
-oc:\wxWin\src\msw\dc.obj
c:\wxWin\include\wx/rawbmp.h(566) : Error: identifier or '( declarator )'
expected
c:\wxWin\include\wx/rawbmp.h(567) : Error: cannot find constructor for class
matching
wxPixelDataOut<wxBitmap >::wxPixelDataIn<>::wxPixelDataOut<wxBitmap
::wxPixelDataIn<>()
May 03 2003
parent reply "donh" <null device.com> writes:
Never mind. I found Walter's workaround; use :: instead of ::template.

"donh" <null device.com> wrote in message
news:b9243b$bp$1 digitaldaemon.com...
 I'm a bit of a beginner messing around with trying to get wxWindows to
 compile with DMC. I pulled down the CVS copy from 30 April and set about
 making the changes you mentioned. How do you work around the template
 problem in rawbmp.h? Thank you.

 I think this is the template that the compiler stops on...

 template <class Image, class PixelFormat = wxPixelFormatFor<Image> >
 class wxPixelData :
     public wxPixelDataOut<Image>::template wxPixelDataIn<PixelFormat>
 {
 public:
     wxPixelData(const Image& image)
         : wxPixelDataOut<Image>::template
wxPixelDataIn<PixelFormat>(image)
         {
         }
 };
dmc -c -o -cpp -Ae -Ar -mn -D_WINDOWS -S -5 -a8 -Nc -c -H -HDc:\temp\ph -HO-
  -gf
  -DWXMSW -D__WIN32__ -D__WIN95__ -D_DEBUG=1 -I.\include -I..\lib\msw -I.\j
pe
 g -I
 .\png -I.\zlib -I.\tiff -I.\regex  -Ic:\wxWin\include -Ic:\wxWin\lib\_sc
 c:\wxWin\src\msw\dc.cpp
 -oc:\wxWin\src\msw\dc.obj
 c:\wxWin\include\wx/rawbmp.h(566) : Error: identifier or '( declarator )'
 expected
 c:\wxWin\include\wx/rawbmp.h(567) : Error: cannot find constructor for
class
 matching
 wxPixelDataOut<wxBitmap >::wxPixelDataIn<>::wxPixelDataOut<wxBitmap
::wxPixelDataIn<>()
May 04 2003
next sibling parent Arjan Knepper <ask me.to> writes:
I don't know whether or not it is also available in your checkout, in 
the platform.h file is a section for disableing this template 
wxPixelData stuff with this define:
wxHAVE_RAW_BITMAP.

But if you have it working with the wxPixelData template stuff why bother.

Good luck

Arjan

donh wrote:
 Never mind. I found Walter's workaround; use :: instead of ::template.
 
 "donh" <null device.com> wrote in message
 news:b9243b$bp$1 digitaldaemon.com...
 
I'm a bit of a beginner messing around with trying to get wxWindows to
compile with DMC. I pulled down the CVS copy from 30 April and set about
making the changes you mentioned. How do you work around the template
problem in rawbmp.h? Thank you.

I think this is the template that the compiler stops on...

template <class Image, class PixelFormat = wxPixelFormatFor<Image> >
class wxPixelData :
    public wxPixelDataOut<Image>::template wxPixelDataIn<PixelFormat>
{
public:
    wxPixelData(const Image& image)
        : wxPixelDataOut<Image>::template
wxPixelDataIn<PixelFormat>(image)
        {
        }
};
dmc -c -o -cpp -Ae -Ar -mn -D_WINDOWS -S -5 -a8 -Nc -c -H -HDc:\temp\ph -HO-
 -gf
 -DWXMSW -D__WIN32__ -D__WIN95__ -D_DEBUG=1 -I.\include -I..\lib\msw -I.\j
pe
g -I
.\png -I.\zlib -I.\tiff -I.\regex  -Ic:\wxWin\include -Ic:\wxWin\lib\_sc
c:\wxWin\src\msw\dc.cpp
-oc:\wxWin\src\msw\dc.obj
c:\wxWin\include\wx/rawbmp.h(566) : Error: identifier or '( declarator )'
expected
c:\wxWin\include\wx/rawbmp.h(567) : Error: cannot find constructor for
class
matching
wxPixelDataOut<wxBitmap >::wxPixelDataIn<>::wxPixelDataOut<wxBitmap

::wxPixelDataIn<>()
May 04 2003
prev sibling parent "chris elliott" <biol75 york.ac.uk> writes:
"donh" <null device.com> wrote in message
news:b93qj8$1f3j$1 digitaldaemon.com...
 Never mind. I found Walter's workaround; use :: instead of ::template.
I'll look at this too chris
May 04 2003
prev sibling parent reply "chris elliott" <biol75 york.ac.uk> writes:
"Arjan Knepper" <ask me.to> wrote in message
news:b91262$22so$1 digitaldaemon.com...
 Chris,

 If you still there, I have done a cvs checkout to get the latest
 wxWindows src-tree. After disabling the __DIGITALMARS__ define for
 __DMC__ you made and making a new define for it in platform.h I had
 almost no trouble to recompile the libs and samples, no link problems at
 all.

 I had to disable a lot of preprocessor stuff left in for __SC__ by also
 checking for __DMC__ e.g.

 old: #if defined(__SC__)
 new: #if (defined(__SC__) && !defined(__DMC__))
I have been round and replaced all the __SC__ with __SYMANTEC__ I have left __DIGITALMARS__ in the code as i think this might be clearer to wxWindows developers chris
May 06 2003
parent reply Arjan Knepper <ask me.to> writes:
chris elliott wrote:
 "Arjan Knepper" <ask me.to> wrote in message
 news:b91262$22so$1 digitaldaemon.com...
 
Chris,

If you still there, I have done a cvs checkout to get the latest
wxWindows src-tree. After disabling the __DIGITALMARS__ define for
__DMC__ you made and making a new define for it in platform.h I had
almost no trouble to recompile the libs and samples, no link problems at
all.

I had to disable a lot of preprocessor stuff left in for __SC__ by also
checking for __DMC__ e.g.

old: #if defined(__SC__)
new: #if (defined(__SC__) && !defined(__DMC__))
I have been round and replaced all the __SC__ with __SYMANTEC__ I have left __DIGITALMARS__ in the code as i think this might be clearer to wxWindows developers chris
Yeh __DIGITALMARS__ is clearer. How does the linking go? Are the 'extern "C"' problems solved now as well? Good Luck Arjan Knepper
May 06 2003
parent chris elliott <biol75 york.ac.uk> writes:
I have been using the 8.34 beta Digital Mars compiler on the wxWindows 
Library see http://www.digitalmars.com/

1. You need to download and unzip in turn (later packages will overwrite 
older files)
     Digital Mars C/C++ Compiler Version 8.33
     Basic utilities
     beta test C++ Compiler Version 8.34
    from http://www.digitalmars.com/download/freecompiler.html

2. Make sure your WXWIN variable is set, and uses the FAT (short
    name) form.

3. Change directory to wx\src\msw. Type 'make -f makefile.sc' to
    make the wxWindows core library.
4. Change directory to wx\samples\minimal and type 'make -f makefile.sc'
    to make this sample. The mdi and image sample also work;

I have not updated makefile.sc in other directories.
Other samples may run if you replace samplename with the name of the cpp 
file in this makefile.sc


WXDIR = ..\..
TARGET=samplename
include $(WXDIR)\src\makeprog.sc

If you get unresolved externals, please let me know; look in 
lib\_sc\*.def to see a possible solution

I have resolved the problems in rawbmp.h and added .def library files 
for the missing externals which I have found so far (wsock32 and shell32 
libs).

I'd just like to thank Arjan  and Donh for their constructive comments - 
  let me have any more suggestions!

chris
May 07 2003