www.digitalmars.com         C & C++   DMDScript  

c++.dos - Predefined Macros

reply Steve Topilnycky <no.spam.steve topcatcomputing.com> writes:
Why would this predfined macro fail?


sc test.c -ms -C -S -3 -a2 -c -gf -otest.obj 
Error: C:\WORKING\TEST\test.c(25): undefined identifier 
'__DMC_VERSION_STRING__'
Lines Processed: 161  Errors: 1  Warnings: 0
Build failed

#include <stdio.h>
/*
    _MSC_VER        Microsoft C 6.0 and later
    _QC             Microsoft Quick C 2.51 and later
    __TURBOC__      Borland Turbo C, Turbo C++ and BC++
    __BORLANDC__    Borland C++
    __ZTC__         Zortech C and C++
    __SC__          Symantec C++
    __WATCOMC__     WATCOM C
    __POWERC        Mix Power C
    __GNUC__        Gnu C
    __EMX__         Emx Gnu C
    __DMC__           Digital Mars
*/



int main (int argc, char *argv[])
{

    printf("Hello World\n");

    printf("%x\n",__DMC__);
    printf("%s\n",__DMC_VERSION_STRING__);
}


If I run it with the last printf commented out, it works. 

C:\Working\test>test
Hello World
827

I was testing some code, for my "About" box, so I can show what compiler 
& version I was using (DMC of Course), but I get the error message 
above.

I copied the marcos right from the web page reference.
Suggestions.

Also, I downloaded the 8.36 update, and extracted it to my DM folder. 
The IDDE is still showing  7.51.  How do I determine if I have the most 
recent version?

Thanks!


-- 

Regards,

Steve Topilnycky             
Top Cat Computing
Web:  http://www.topcatcomputing.com/
Sep 22 2003
parent reply "Walter" <walter digitalmars.com> writes:
"Steve Topilnycky" <no.spam.steve topcatcomputing.com> wrote in message
news:MPG.19d8cef72770e38998968b news.digitalmars.com...
 Why would this predfined macro fail?


 sc test.c -ms -C -S -3 -a2 -c -gf -otest.obj
 Error: C:\WORKING\TEST\test.c(25): undefined identifier
 '__DMC_VERSION_STRING__'
 Lines Processed: 161  Errors: 1  Warnings: 0
 Build failed
I don't know. The following compiles and runs as expected: ----------------------------- #include <stdio.h> void main() { printf("%s\n", __DMC_VERSION_STRING__); } --------------------------------
 Also, I downloaded the 8.36 update, and extracted it to my DM folder.
 The IDDE is still showing  7.51.  How do I determine if I have the most
 recent version?
www.digitalmars.com/faq.html#version
Sep 22 2003
parent reply Steve Topilnycky <no.spam.steve topcatcomputing.com> writes:
In the c++.dos newsgroup Walter wrote: 

 
 I don't know. The following compiles and runs as expected:
 
Walter, Interesting, I copied & pasted your code into the test project and I get the same error. Are there any special options that need to be set in the project. I am compiling it as a DOS app currently... -- Regards, Steve Topilnycky Top Cat Computing Web: http://www.topcatcomputing.com/
Sep 22 2003
parent reply "Walter" <walter digitalmars.com> writes:
"Steve Topilnycky" <no.spam.steve topcatcomputing.com> wrote in message
news:MPG.19d9578baabaaa5998968c news.digitalmars.com...
 In the c++.dos newsgroup Walter wrote:


 I don't know. The following compiles and runs as expected:
Walter, Interesting, I copied & pasted your code into the test project and I get the same error. Are there any special options that need to be set in the project. I am compiling it as a DOS app currently...
Perhaps you need to download a later compiler version. That macro wasn't defined in earlier versions.
Sep 22 2003
parent reply Steve Topilnycky <no.spam.steve topcatcomputing.com> writes:
In the c++.dos newsgroup Walter wrote: 

 
 Perhaps you need to download a later compiler version. That macro wasn't
 defined in earlier versions.
 
Walter, I thought I had the latest. I received the original on CD, and I downloaded dmc.zip from ftp://ftp.digitalmars.com/ and extracted the contents to my DM folder. Was there something else I needed to do? I ran SCVER and here are the results: C:\dm\bin>scver + Version Retrieval Utility, Release 7.10b1 Copyright (C) 1999, 2000 Digital Mars C++ Version Retrieval Utility, Release 7. 10b1 All Rights Reserved. appexprs.exe: version not found appx32.exe: AppExpress 750b10PA bldclnt.dll: BuildSystem 7.50b17 bldclnt.exe: BuildSystem 7.50b17 brow32d.dll: Aruba 7.5b66? browserd.dll: Aruba 750b21 spwnrnd.dll: BuildSystem 7.50b15 wnet16.dll: BuildSystem 7.50b15 wnet32.dll: BuildSystem 7.50b15 wshr16.dll: BuildSystem 7.50b15 wshr32.dll: BuildSystem 7.50b15 wfwchk16.dll: BuildSystem 7.50b15 wfwchk32.dll: BuildSystem 7.50b15 shellnd.dll: BuildSystem 7.50b18 smake.exe: Smake 7.50b9 smakend.dll: Smake 7.50b9 spp.exe: version not found sppn.exe: Preprocessor 8.1B3n sppnd.dll: Preprocessor 8.1B5nd spwnlnd.dll: BuildSystem 7.50b15 scwmn16.exe: idde 7.21b7 scwmn32.exe: idde 7.50b80 scwmn32s.exe: idde 7.21b7 scwrm16.dll: idde 7.21b5 scver.dat: version not found scver.exe: version utility 7.10b1 scw.exe: idde 7.21b5 scw32.exe: idde 7.50b46 scw32s.exe: idde 7.21b5 scwdebug.dll: idde 7.10b1 rsver.dll: version not found rsver32.dll: UnlabeledUnlabeledUnlabeled..... sc.exe: compiler driver 8.35n sccn.exe: version not found sccnd.dll: C/C++ Compiler 7.7B1nd sccx.exe: version not found scd.dll: compiler driver 8.0B2nd scppn.exe: C/C++ Compiler 8.36.4n scppnd.dll: C/C++ Compiler 8.27.5nd scppx.exe: version not found rsrcc.dll: version not found rsrcc32.dll: Unlabeled rsstr32.dll: UnlabeledUnlabeledUnlabeled..... rsstring.dll: version not found rstudio.exe: version not found rsundo.dll: version not found rsundo32.dll: UnlabeledUnlabeledUnlabeled..... rsutil.dll: version not found rsutil32.dll: UnlabeledUnlabeledUnlabeled..... rshex.dll: version not found rshex32.dll: UnlabeledUnlabeledUnlabeled..... rsicon.dll: version not found rsicon32.dll: UnlabeledUnlabeledUnlabeled..... rsid32.dll: UnlabeledUnlabeledUnlabeled..... rsidmgr.dll: version not found rsintf.dll: version not found rsintf32.dll: UnlabeledUnlabeledUnlabeled..... rsmenu.dll: version not found rsmenu32.dll: UnlabeledUnlabeledUnlabeled..... rsbitmap.dll: version not found rscomm.dll: version not found rscomm32.dll: UnlabeledUnlabeledUnlabeled..... rscur32.dll: UnlabeledUnlabeledUnlabeled..... rscursor.dll: version not found rsdialog.dll: version not found rsdlg32.dll: UnlabeledUnlabeledUnlabeled..... rsfont.dll: version not found rsfont32.dll: UnlabeledUnlabeledUnlabeled..... rsgr32.dll: UnlabeledUnlabeledUnlabeled..... rsgrcomm.dll: version not found rcc.exe: rcc 7.50B5 rccnd.dll: rcc 7.50B6 rs32.exe: UnlabeledUnlabeledUnlabeled..... rsacc32.dll: UnlabeledUnlabeledUnlabeled..... rsaccel.dll: version not found rsbit32.dll: UnlabeledUnlabeledUnlabeled..... obj2asm.exe: disassembler 8.0B1n prjmgr.dll: idde 7.21b6 prjmgr32.dll: idde 7.50b82 masmboxc.exe: BuildSystem 7.50b15 nb32.dll: BuildSystem 7.50b15 nbd.dll: BuildSystem 7.50b18 nbnd.dll: BuildSystem 7.50b18 obj2asm.dll: disassembler 8.0B1nd link.exe: link 7.50B1 linknd.dll: link 7.50B1 masmbox.exe: BuildSystem 7.50b15 ide.dll: idde 7.21b5 ide32.dll: idde 7.50b80 implib.exe: implib 7.6B1n implibnd.dll: implib 7.6B1nd lib.exe: librarian 7.6B3x libnd.dll: librarian 7.6B3nd dosbox.exe: BuildSystem 7.50b15 dosboxc.exe: BuildSystem 7.50b15 buildsvr.exe: BuildSystem 7.50b15 iddefont.dll: IddeFont 7.5b1 Courier iddeft32.dll: IddeFont 7.5b1 Courier vedbg.dll: debug engine 7.50b65 ..\lib\cwindos.lib: rtl 7.50b35 ..\lib\snn.lib: rtl 7.50b35 ..\lib\swc.lib: rtl 7.50b35 ..\lib\swindos.lib: rtl 7.50b35 ..\lib\swl.lib: rtl 7.50b35 ..\lib\swm.lib: rtl 7.50b35 ..\lib\sws.lib: rtl 7.50b35 ..\lib\sdc.lib: rtl 7.50b35 ..\lib\sdl.lib: rtl 7.50b35 ..\lib\sdm.lib: rtl 7.50b35 ..\lib\sds.lib: rtl 7.50b35 ..\lib\sdx.lib: rtl 7.50b35 ..\lib\mwindos.lib: rtl 7.50b35 ..\lib\lwindos.lib: rtl 7.50b35 ..\lib\snd.lib: rtl 7.50b35 ..\lib\sndd.lib: rtl 7.50b35 ..\lib\snnd.lib: rtl 7.50b35 C:\dm\bin> -- Regards, Steve Topilnycky Top Cat Computing Web: http://www.topcatcomputing.com/
Sep 23 2003
next sibling parent Steve Topilnycky <no.spam.steve topcatcomputing.com> writes:
In the c++.dos newsgroup Steve Topilnycky wrote: 

 
 I needed to do?  I 
 ran SCVER and here are the results:
 
 
Ah, I got it now.. I had just downloaded the most recent and unzipped it. I went back to the Download page and caught the section about upgrading the CD. I downloaded each patch and unzipped them in order. The program now compiles correctly.. Thanks.. I thought by unzipping the most recent version, it would update all the appropriate files.. Obviously, I was wrong.. Thanks for your help Walter! -- Regards, Steve Topilnycky Top Cat Computing Web: http://www.topcatcomputing.com/
Sep 23 2003
prev sibling parent TEST <TEST_member pathlink.com> writes:
In article <MPG.19da06ce46a3bd3c98968d news.digitalmars.com>, Steve Topilnycky
says...
In the c++.dos newsgroup Walter wrote: 

 
 Perhaps you need to download a later compiler version. That macro wasn't
 defined in earlier versions.
 
Walter, I thought I had the latest. I received the original on CD, and I downloaded dmc.zip from ftp://ftp.digitalmars.com/ and extracted the contents to my DM folder. Was there something else I needed to do? I ran SCVER and here are the results: C:\dm\bin>scver + Version Retrieval Utility, Release 7.10b1 Copyright (C) 1999, 2000 Digital Mars C++ Version Retrieval Utility, Release 7. 10b1 All Rights Reserved. appexprs.exe: version not found appx32.exe: AppExpress 750b10PA bldclnt.dll: BuildSystem 7.50b17 bldclnt.exe: BuildSystem 7.50b17 brow32d.dll: Aruba 7.5b66? browserd.dll: Aruba 750b21 spwnrnd.dll: BuildSystem 7.50b15 wnet16.dll: BuildSystem 7.50b15 wnet32.dll: BuildSystem 7.50b15 wshr16.dll: BuildSystem 7.50b15 wshr32.dll: BuildSystem 7.50b15 wfwchk16.dll: BuildSystem 7.50b15 wfwchk32.dll: BuildSystem 7.50b15 shellnd.dll: BuildSystem 7.50b18 smake.exe: Smake 7.50b9 smakend.dll: Smake 7.50b9 spp.exe: version not found sppn.exe: Preprocessor 8.1B3n sppnd.dll: Preprocessor 8.1B5nd spwnlnd.dll: BuildSystem 7.50b15 scwmn16.exe: idde 7.21b7 scwmn32.exe: idde 7.50b80 scwmn32s.exe: idde 7.21b7 scwrm16.dll: idde 7.21b5 scver.dat: version not found scver.exe: version utility 7.10b1 scw.exe: idde 7.21b5 scw32.exe: idde 7.50b46 scw32s.exe: idde 7.21b5 scwdebug.dll: idde 7.10b1 rsver.dll: version not found rsver32.dll: UnlabeledUnlabeledUnlabeled..... sc.exe: compiler driver 8.35n sccn.exe: version not found sccnd.dll: C/C++ Compiler 7.7B1nd sccx.exe: version not found scd.dll: compiler driver 8.0B2nd scppn.exe: C/C++ Compiler 8.36.4n scppnd.dll: C/C++ Compiler 8.27.5nd scppx.exe: version not found rsrcc.dll: version not found rsrcc32.dll: Unlabeled rsstr32.dll: UnlabeledUnlabeledUnlabeled..... rsstring.dll: version not found rstudio.exe: version not found rsundo.dll: version not found rsundo32.dll: UnlabeledUnlabeledUnlabeled..... rsutil.dll: version not found rsutil32.dll: UnlabeledUnlabeledUnlabeled..... rshex.dll: version not found rshex32.dll: UnlabeledUnlabeledUnlabeled..... rsicon.dll: version not found rsicon32.dll: UnlabeledUnlabeledUnlabeled..... rsid32.dll: UnlabeledUnlabeledUnlabeled..... rsidmgr.dll: version not found rsintf.dll: version not found rsintf32.dll: UnlabeledUnlabeledUnlabeled..... rsmenu.dll: version not found rsmenu32.dll: UnlabeledUnlabeledUnlabeled..... rsbitmap.dll: version not found rscomm.dll: version not found rscomm32.dll: UnlabeledUnlabeledUnlabeled..... rscur32.dll: UnlabeledUnlabeledUnlabeled..... rscursor.dll: version not found rsdialog.dll: version not found rsdlg32.dll: UnlabeledUnlabeledUnlabeled..... rsfont.dll: version not found rsfont32.dll: UnlabeledUnlabeledUnlabeled..... rsgr32.dll: UnlabeledUnlabeledUnlabeled..... rsgrcomm.dll: version not found rcc.exe: rcc 7.50B5 rccnd.dll: rcc 7.50B6 rs32.exe: UnlabeledUnlabeledUnlabeled..... rsacc32.dll: UnlabeledUnlabeledUnlabeled..... rsaccel.dll: version not found rsbit32.dll: UnlabeledUnlabeledUnlabeled..... obj2asm.exe: disassembler 8.0B1n prjmgr.dll: idde 7.21b6 prjmgr32.dll: idde 7.50b82 masmboxc.exe: BuildSystem 7.50b15 nb32.dll: BuildSystem 7.50b15 nbd.dll: BuildSystem 7.50b18 nbnd.dll: BuildSystem 7.50b18 obj2asm.dll: disassembler 8.0B1nd link.exe: link 7.50B1 linknd.dll: link 7.50B1 masmbox.exe: BuildSystem 7.50b15 ide.dll: idde 7.21b5 ide32.dll: idde 7.50b80 implib.exe: implib 7.6B1n implibnd.dll: implib 7.6B1nd lib.exe: librarian 7.6B3x libnd.dll: librarian 7.6B3nd dosbox.exe: BuildSystem 7.50b15 dosboxc.exe: BuildSystem 7.50b15 buildsvr.exe: BuildSystem 7.50b15 iddefont.dll: IddeFont 7.5b1 Courier iddeft32.dll: IddeFont 7.5b1 Courier vedbg.dll: debug engine 7.50b65 ..\lib\cwindos.lib: rtl 7.50b35 ..\lib\snn.lib: rtl 7.50b35 ..\lib\swc.lib: rtl 7.50b35 ..\lib\swindos.lib: rtl 7.50b35 ..\lib\swl.lib: rtl 7.50b35 ..\lib\swm.lib: rtl 7.50b35 ..\lib\sws.lib: rtl 7.50b35 ..\lib\sdc.lib: rtl 7.50b35 ..\lib\sdl.lib: rtl 7.50b35 ..\lib\sdm.lib: rtl 7.50b35 ..\lib\sds.lib: rtl 7.50b35 ..\lib\sdx.lib: rtl 7.50b35 ..\lib\mwindos.lib: rtl 7.50b35 ..\lib\lwindos.lib: rtl 7.50b35 ..\lib\snd.lib: rtl 7.50b35 ..\lib\sndd.lib: rtl 7.50b35 ..\lib\snnd.lib: rtl 7.50b35 C:\dm\bin> -- Regards, Steve Topilnycky Top Cat Computing Web: http://www.topcatcomputing.com/
Aug 29 2005