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++ - SC name conflicts with NT Service cmd

↑ ↓ ← SD <stephanedelaval wanadoo.fr> writes:
Hi
I am running Windows XP.
I have installed digital mars and updated the PATH to first point to the 
dmars directory.

When in my C source directory, I launch SC.EXE, the program which is 
invoked is a Microsoft NT service Controller and services. I have to put 
the full program path.

Another point : when I run scppn, I get the error "Fatal error: unable to 
open input file 'typeinfo.h'". sc.exe compiles without error.

Any similar experience and fix ?

Thx

Stephane Delaval
Oct 19 2002
→ Christof Meerwald <cmeerw web.de> writes:
On Sat, 19 Oct 2002 11:22:06 +0000 (UTC), SD wrote:
 When in my C source directory, I launch SC.EXE, the program which is 
 invoked is a Microsoft NT service Controller and services. I have to put 
 the full program path.

Or use "dmc.exe" instead of "sc.exe"
 Another point : when I run scppn, I get the error "Fatal error: unable to 
 open input file 'typeinfo.h'". sc.exe compiles without error.

sc.exe/dmc.exe sets some environment variables (defined in sc.ini) so that scppn knows where to look for standard include files - you shouldn't run scppn directly. bye, Christof -- http://cmeerw.org JID: cmeerw jabber.at mailto cmeerw at web.de ...and what have you contributed to the Net?
Oct 19 2002
"Matthew Wilson" <dmd synesis.com.au> writes:
I have run into this from time to time. You need to ensure that your DMC
path components come before those of the system. I do this by having a
command/batch (.cmd on NT/2K/XP;.bat on 9x/ME), containing (the following is
the NT version)

 echo off
echo .
echo Setting up command line environment for Digital Mars C/C++ 8.30
echo .

rem Compiler drive
if (%COMP_DRV%) == () goto got_no_comp_drv
goto got_comp_drv
:got_no_comp_drv
set COMP_DRV=C:
:got_comp_drv

rem Work drive
if (%WORK_DRV%) == () goto got_no_work_drv
goto got_work_drv
:got_no_work_drv
set WORK_DRV=C:
:got_work_drv

set COMP_DIR=%COMP_DRV%\PROGRAMS\DM\DM830\DM
set COMP_BIN=%COMP_DIR%\BIN
set
COMP_INC=%COMP_DIR%\include;%COMP_DIR%\include\win32;%COMP_DIR%\stl;%COMP_DI
R%\stlsoft
set COMP_LIB=%COMP_DIR%\lib

set WORK_DRV=H:
set WORK_DIR=\Dev\Test\

PATH=%COMP_BIN%;%PATH%;
path
set INCLUDE=%COMP_INC%
set LIB=%COMP_LIB%

echo .
%WORK_DRV%
cd %WORK_DIR%
echo .
cmd.exe

As you can see from the "PATH=%COMP_BIN%;%PATH%;" line, the DMC path is set
to take priority over the existing, system, path. You're more than welcome
to take whatever parts of this may be useful to you.

BTW, if you want a little help working with environment variables, you can
download the Environment Variable Expander from
http://www.synesis.com.au/r_systools.html. Simply typing "nvx PATH" or
"nvx -p" at the command line will give you an ordered list of the current
PATH setting, as in the following for one of my machines

P:\PROGRAMS\DM\DM830\DM\BIN
P:\Program Files\Intel\VTune\CGGlbCache
P:\Program Files\Intel\VTune\Analyzer\Bin
P:\Program Files\Intel\VTune\Shared\Bin
P:\Program Files\Intel\ICID
P:\Program Files\Intel\EDB
P:\Program Files\Intel\ISelect\Bin6
P:\Program Files\Intel\Compiler60\Ia64\Bin
P:\Program Files\Intel\Compiler60\IA32\Bin
P:\Program Files\Microsoft.NET\FrameworkSDK\Bin\
F:\WINXP\Microsoft.NET\Framework\v1.0.3705\
c:\bin
F:\WINXP\system32
F:\WINXP
F:\WINXP\system32\WBEM
P:\SDKs\Microsoft SDK\Bin\.
P:\SDKs\Microsoft SDK\Bin\WinNT\.


"SD" <stephanedelaval wanadoo.fr> wrote in message
news:aorf8t$1n88$1 digitaldaemon.com...
 Hi
 I am running Windows XP.
 I have installed digital mars and updated the PATH to first point to the
 dmars directory.

 When in my C source directory, I launch SC.EXE, the program which is
 invoked is a Microsoft NT service Controller and services. I have to put
 the full program path.

 Another point : when I run scppn, I get the error "Fatal error: unable to
 open input file 'typeinfo.h'". sc.exe compiles without error.

 Any similar experience and fix ?

 Thx

 Stephane Delaval

Oct 19 2002
↑ ↓ → SD <stephanedelaval wanadoo.fr> writes:
"Matthew Wilson" <dmd synesis.com.au> wrote in
news:aosmp4$2up4$1 digitaldaemon.com: 

 I have run into this from time to time. You need to ensure that your
 DMC path components come before those of the system. I do this by
 having a command/batch (.cmd on NT/2K/XP;.bat on 9x/ME), containing
 (the following is the NT version)
 
  echo off
 echo .
 echo Setting up command line environment for Digital Mars C/C++ 8.30
 echo .
 
 rem Compiler drive
 if (%COMP_DRV%) == () goto got_no_comp_drv
 goto got_comp_drv
:got_no_comp_drv
 set COMP_DRV=C:
:got_comp_drv
 
 rem Work drive
 if (%WORK_DRV%) == () goto got_no_work_drv
 goto got_work_drv
:got_no_work_drv
 set WORK_DRV=C:
:got_work_drv
 
 set COMP_DIR=%COMP_DRV%\PROGRAMS\DM\DM830\DM
 set COMP_BIN=%COMP_DIR%\BIN
 set
 COMP_INC=%COMP_DIR%\include;%COMP_DIR%\include\win32;%COMP_DIR%\stl;%

 MP_DI R%\stlsoft
 set COMP_LIB=%COMP_DIR%\lib
 
 set WORK_DRV=H:
 set WORK_DIR=\Dev\Test\
 
 PATH=%COMP_BIN%;%PATH%;
 path
 set INCLUDE=%COMP_INC%
 set LIB=%COMP_LIB%
 
 echo .
 %WORK_DRV%
 cd %WORK_DIR%
 echo .
 cmd.exe
 
 As you can see from the "PATH=%COMP_BIN%;%PATH%;" line, the DMC path
 is set to take priority over the existing, system, path. You're more
 than welcome to take whatever parts of this may be useful to you.
 
 BTW, if you want a little help working with environment variables, you
 can download the Environment Variable Expander from
 http://www.synesis.com.au/r_systools.html. Simply typing "nvx PATH" or
 "nvx -p" at the command line will give you an ordered list of the
 current PATH setting, as in the following for one of my machines
 
 P:\PROGRAMS\DM\DM830\DM\BIN
 P:\Program Files\Intel\VTune\CGGlbCache
 P:\Program Files\Intel\VTune\Analyzer\Bin
 P:\Program Files\Intel\VTune\Shared\Bin
 P:\Program Files\Intel\ICID
 P:\Program Files\Intel\EDB
 P:\Program Files\Intel\ISelect\Bin6
 P:\Program Files\Intel\Compiler60\Ia64\Bin
 P:\Program Files\Intel\Compiler60\IA32\Bin
 P:\Program Files\Microsoft.NET\FrameworkSDK\Bin\
 F:\WINXP\Microsoft.NET\Framework\v1.0.3705\
 c:\bin
 F:\WINXP\system32
 F:\WINXP
 F:\WINXP\system32\WBEM
 P:\SDKs\Microsoft SDK\Bin\.
 P:\SDKs\Microsoft SDK\Bin\WinNT\.
 
 
 "SD" <stephanedelaval wanadoo.fr> wrote in message
 news:aorf8t$1n88$1 digitaldaemon.com...
 Hi
 I am running Windows XP.
 I have installed digital mars and updated the PATH to first point to
 the dmars directory.

 When in my C source directory, I launch SC.EXE, the program which is
 invoked is a Microsoft NT service Controller and services. I have to
 put the full program path.

 Another point : when I run scppn, I get the error "Fatal error:
 unable to open input file 'typeinfo.h'". sc.exe compiles without
 error. 

 Any similar experience and fix ?

 Thx

 Stephane Delaval


Many thanks to both of you for your help. Stephane
Oct 20 2002