www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++ - WxWindows & dm

↑ ↓ ← Kon Tantos <ksoft1 attglobal.net> writes:
hi, 

has anyone used WxWindows with the digital mars compiler?
If so is there a list of steps / patches to enable the wxwin library &
applications to be built.

-- 
TIA
Kon Tantos
ksoft1 attglobal.net or kon.tantos tafe.nsw.edu.au
Dec 10 2002
↑ ↓ Kon Tantos <ksoft1 attglobal.net> writes:
I have been experimenting with building the wxWindows library using the
makefiles supplied with wxWindows. Progress so far:

1 modified '\include\wx\defs.h' to recognise digital mars instead of
symantec
this at least allows compilation to begin.

2 sc complained about duplicate member function definitions in Icon.h.
The problem was the following member functions from class Icon

    wxIcon(const char **data) { CreateIconFromXpm(data); }
    wxIcon(char **data) { CreateIconFromXpm((const char **)data); }

It appears that sc sees 'const char**' and 'char**' as the same. This
seems a bit strange.
As a test I created a small project with the IDDE, a code snippet is
below:

void    func1( char* d) {}
void    func1( const char* d) {}

void    func1( char** d) {}
void    func1( const char** d) {}

class   XX
{
public:
    void    func1( char* d) {}
    void    func1( const char* d) {}

    void    func1( char** d) {}
    void    func1( const char** d) {}
};

The compiler produces the following output:

sc ..\test1.cpp -mn -C -WA -S -3 -a8 -c -gf -D_CONSOLE=1 -o..\test1.obj 
Error: H:\Digital_Mars\test1\DmW32\..\test1.cpp(10): 'func1' previously
declared as something else
H:\Digital_Mars\test1\DmW32\..\test1.cpp(10): It was declared as: void C
func(char **)
H:\Digital_Mars\test1\DmW32\..\test1.cpp(10): It is now declared: void C
func(char const **)
Error: H:\Digital_Mars\test1\DmW32\..\test1.cpp(19): 'XX::func1' is
already defined
Lines Processed: 10525  Errors: 2  Warnings: 0
Build failed

It appears that the compiler considers the functions with 'ptr to ptr'
parameters as being "C" functions. I can get around this by commenting
out one of the functions, but I would rather not unless I have no
choice.

Is this a known issue or am I missing something obvious?

BTW I am very new to digital mars, (mainly worked with Watcom & MSC over
last few years).

-- 
Regards
Kon Tantos
ksoft1 attglobal.net or kon.tantos tafe.nsw.edu.au
Dec 11 2002
↑ ↓ → "Walter" <walter digitalmars.com> writes:
I'll look into it. -Walter

"Kon Tantos" <ksoft1 attglobal.net> wrote in message
news:3DF7131A.C84F2A77 attglobal.net...
 I have been experimenting with building the wxWindows library using the
 makefiles supplied with wxWindows. Progress so far:

 1 modified '\include\wx\defs.h' to recognise digital mars instead of
 symantec
 this at least allows compilation to begin.

 2 sc complained about duplicate member function definitions in Icon.h.
 The problem was the following member functions from class Icon

     wxIcon(const char **data) { CreateIconFromXpm(data); }
     wxIcon(char **data) { CreateIconFromXpm((const char **)data); }

 It appears that sc sees 'const char**' and 'char**' as the same. This
 seems a bit strange.
 As a test I created a small project with the IDDE, a code snippet is
 below:

 void    func1( char* d) {}
 void    func1( const char* d) {}

 void    func1( char** d) {}
 void    func1( const char** d) {}

 class   XX
 {
 public:
     void    func1( char* d) {}
     void    func1( const char* d) {}

     void    func1( char** d) {}
     void    func1( const char** d) {}
 };

 The compiler produces the following output:

 sc ..\test1.cpp -mn -C -WA -S -3 -a8 -c -gf -D_CONSOLE=1 -o..\test1.obj
 Error: H:\Digital_Mars\test1\DmW32\..\test1.cpp(10): 'func1' previously
 declared as something else
 H:\Digital_Mars\test1\DmW32\..\test1.cpp(10): It was declared as: void C
 func(char **)
 H:\Digital_Mars\test1\DmW32\..\test1.cpp(10): It is now declared: void C
 func(char const **)
 Error: H:\Digital_Mars\test1\DmW32\..\test1.cpp(19): 'XX::func1' is
 already defined
 Lines Processed: 10525  Errors: 2  Warnings: 0
 Build failed

 It appears that the compiler considers the functions with 'ptr to ptr'
 parameters as being "C" functions. I can get around this by commenting
 out one of the functions, but I would rather not unless I have no
 choice.

 Is this a known issue or am I missing something obvious?

 BTW I am very new to digital mars, (mainly worked with Watcom & MSC over
 last few years).

 --
 Regards
 Kon Tantos
 ksoft1 attglobal.net or kon.tantos tafe.nsw.edu.au

Dec 11 2002