www.digitalmars.com         C & C++   DMDScript  

c++.wxwindows - latest beta fails wxWindows ?

reply chris elliott <biol75 york.ac.uk> writes:
latest beta code doesn't like this part of jdhuff.c

      /* Section F.2.2.1: decode the DC coefficient difference */
       HUFF_DECODE(s, br_state, dctbl, return FALSE, label1);
       if (s) {
	CHECK_BIT_BUFFER(br_state, s, return FALSE);
	r = GET_BITS(s);
	s = HUFF_EXTEND(r, s);
       }

C:\wx\wxWindows\build\msw>scppn
Digital Mars C/C++ Compiler Version 8.39.3n
Copyright (C) Digital Mars 2000-2004.  All Rights Reserved.
Written by Walter Bright
www.digitalmars.com

It is OK with  8.38.9n

chris

dmc -mn -c -odmc_mswd\wxjpeg_jdhuff.obj -g -o+none 
-I..\..\lib\dmc_lib\mswd
   ..\..\src\jpeg\jdhuff.c
       HUFF_DECODE(s, br_state, dctbl, return FALSE, label1);
                                                          ^
..\..\src\jpeg\jdhuff.c(551) : Error: undefined identifier 'label1'
       HUFF_DECODE(s, br_state, dctbl, return FALSE, label1);
                                                          ^
..\..\src\jpeg\jdhuff.c(551) : Warning 6: value of expression is not used
       if (s) {
            ^
..\..\src\jpeg\jdhuff.c(552) : Error: undefined identifier 's'
         r = GET_BITS(s);
           ^
..\..\src\jpeg\jdhuff.c(554) : Error: undefined identifier 'r'
         (*block)[0] = (JCOEF) s;
                ^
..\..\src\jpeg\jdhuff.c(564) : Error: undefined identifier 'block'
         for (k = 1; k < DCTSIZE2; k++) {
                ^
..\..\src\jpeg\jdhuff.c(571) : Error: undefined identifier 'k'
Fatal error: too many errors
Jan 29 2004
parent reply "Walter" <walter digitalmars.com> writes:
Could you reduce it to a self-contained snippet, please?
Jan 29 2004
parent reply Dmitry Morozhnikov <dmiceman mail.ru> writes:
In article <bvblhf$2lpc$1 digitaldaemon.com>, Walter says...
Could you reduce it to a self-contained snippet, please?
I`m also found this trouble :-) dmc now just does not like constructions: #define AAA(label) {\ label: \ goto label; \ }; AAA(l1); which is found in jpeglib.
Jan 30 2004
parent reply "Walter" <walter digitalmars.com> writes:
"Dmitry Morozhnikov" <dmiceman mail.ru> wrote in message
news:bvf7ko$2gpj$1 digitaldaemon.com...
 In article <bvblhf$2lpc$1 digitaldaemon.com>, Walter says...
Could you reduce it to a self-contained snippet, please?
I`m also found this trouble :-) dmc now just does not like constructions: #define AAA(label) {\ label: \ goto label; \ }; AAA(l1); which is found in jpeglib.
This works for me: ----------------------------------------- C:\cbx\ztc>type test.cpp #define AAA(label) {\ label: \ goto label; \ }; void test() { AAA(l1); } C:\cbx\ztc>sc -c test C:\cbx\ztc>obj2asm test _TEXT segment dword use32 public 'CODE' ;size is 2 _TEXT ends _DATA segment dword use32 public 'DATA' ;size is 0 _DATA ends CONST segment dword use32 public 'CONST' ;size is 0 CONST ends _BSS segment dword use32 public 'BSS' ;size is 0 _BSS ends FLAT group includelib SNN.lib public ?test YAXXZ _TEXT segment assume CS:_TEXT ?test YAXXZ: jmp short ?test YAXXZ _TEXT ends _DATA segment _DATA ends CONST segment CONST ends _BSS segment _BSS ends end C:\cbx\ztc> ------------------------------------------------------------------
Feb 01 2004
parent reply Dmitry Morozhnikov <dmiceman mail.ru> writes:
In article <bvkp2g$2ili$2 digitaldaemon.com>, Walter says...
This works for me:
-----------------------------------------
C:\cbx\ztc>type test.cpp
#define AAA(label) {\
label: \
goto label; \
};

void test()
{
AAA(l1);
}


C:\cbx\ztc>sc -c test
This is work for .cpp files and with -cpp compiler option, but not for .c files:
c:\progs\dm\bin\dmc.exe test.c -c
AAA(l1); ^ test.c(8) : Error: undefined identifier 'l1' AAA(l1); ^ test.c(8) : Warning 6: value of expression is not used --- errorlevel 1
Feb 02 2004
parent reply "Walter" <walter digitalmars.com> writes:
Thanks, I have it fixed now. -Walter
Feb 02 2004
parent reply chris elliott <biol75 york.ac.uk> writes:
thank you, I got the new beta this morning. I'm afraid it now fails with 
another error, the linker says previous definition different. This did 
not occur with 8.38

chris

C:\wx\wx24b\samples\image>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  image.cpp -oimage.obj

rcc -D__NT__ -r -I..\..\include -I..\..\lib\_sc -I..\..\contrib\include 
-I..\../
src/regex;..\../src/png;..\../src/jpeg;..\../src/zlib;..\../src/tiff 
image.rc

link  /DELEXECUTABLE /RC -L/exet:nt/su:windows image.obj , image.exe, 
image, ..\
..\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 user
32 uuid
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

c:\wx\dm\bin\..\lib\snn.lib(_exit)  Offset FFDD5H Record Type 00C3
  Error 1: Previous Definition Different : __Exit

--- errorlevel 1

C:\wx\wx24b\samples\image>scppn
Digital Mars C/C++ Compiler Version 8.39.4n
Copyright (C) Digital Mars 2000-2004.  All Rights Reserved.
Written by Walter Bright
www.digitalmars.com

Walter wrote:

 Thanks, I have it fixed now. -Walter
 
 
Feb 04 2004
parent reply "Walter" <walter digitalmars.com> writes:
Need to link with /noi flag. -Walter

"chris elliott" <biol75 york.ac.uk> wrote in message
news:bvqrcm$12dq$1 digitaldaemon.com...
 thank you, I got the new beta this morning. I'm afraid it now fails with
 another error, the linker says previous definition different. This did
 not occur with 8.38
 c:\wx\dm\bin\..\lib\snn.lib(_exit)  Offset FFDD5H Record Type 00C3
   Error 1: Previous Definition Different : __Exit
Feb 04 2004
next sibling parent chris elliott <biol75 york.ac.uk> writes:
Walter wrote:

 Need to link with /noi flag. -Walter
 
Thanks, changed in wxWindows CVS 2.4 and head chris
Feb 05 2004
prev sibling parent reply "W這dzimierz Skiba" <abx abx.art.pl> writes:
"Walter" <walter digitalmars.com> wrote in 
news:bvshdk$rv7$1 digitaldaemon.com:

 Need to link with /noi flag. -Walter
/noi change is not listed in changes at http://www.digitalmars.com/download/freecompiler.html so is probably old switch but http://www.digitalmars.com/ctg/ctgLinkSwitches.html does not list it. There is /noi switch listed but in http://www.digitalmars.com/ctg/lib.html What is the rule for /noi switch targeted for future releases? ABX
Feb 13 2004
parent reply "Walter" <walter digitalmars.com> writes:
"W這dzimierz Skiba" <abx abx.art.pl> wrote in message
news:c0isim$2a2i$1 digitaldaemon.com...
 "Walter" <walter digitalmars.com> wrote in
 news:bvshdk$rv7$1 digitaldaemon.com:

 Need to link with /noi flag. -Walter
/noi change is not listed in changes at http://www.digitalmars.com/download/freecompiler.html
What happened is the routine _Exit was added to the library for standard compatibility, in addition to the old equivalent _exit.
 so is probably old switch but
 http://www.digitalmars.com/ctg/ctgLinkSwitches.html does not list it.
See www.digitalmars.com/ctg/ctgLinkSwitches.html#ignorecase
 There
 is /noi switch listed but in http://www.digitalmars.com/ctg/lib.html
 What is the rule for /noi switch targeted for future releases?
/noi has always been there in the linker, and will remain.
Feb 13 2004
parent "W這dzimierz Skiba" <abx abx.art.pl> writes:
"Walter" <walter digitalmars.com> wrote in 
news:c0iu3o$2e9f$2 digitaldaemon.com:
 There
 is /noi switch listed but in http://www.digitalmars.com/ctg/lib.html
 What is the rule for /noi switch targeted for future releases?
/noi has always been there in the linker, and will remain.
Please consider listing it in documentation, since in that form it will be distributed over the world within wxWindows and could confuse peaople (like me). Thanks for explanation. ABX
Feb 13 2004