Thread overview
Mixed "C"-gnals
Sep 17, 2002
Aurura
Sep 17, 2002
user
Will all of my c/c++ files have to be in DigitalMars bin?
Sep 17, 2002
Aurura
Sep 18, 2002
user
Sep 18, 2002
Aurura
Sep 18, 2002
bw
...well, uh.. er, um...
Sep 18, 2002
Aurura
Ooh, that's a semi colon, not a comma!
Sep 18, 2002
Aurura
Sep 18, 2002
Michael Comperchio
September 17, 2002
I actually found a tutorial for the absolute beginner in C and C++ online. While I understand that I still need to get a book, I was still delighted to find more online enlightenment.

So, of course, comes my next questions:

All the program exercises for these tutorials have (obviously) a ".c" extension. Will this be compatible with the DigitalMars compiler?

Will I need to rename them to '.cpp' before I can use any of them?  or will that corrupt the file or compiler?

Me (again)


September 17, 2002
No you don't have to rename them. As long as C++ sources are in *.cpp files and c sources are in *.c files.

The compiler is a C and C++ compiler.

Aurura wrote:
> I actually found a tutorial for the absolute beginner in C and C++ online.
> While I understand that I still need to get a book, I was still delighted to
> find more online enlightenment.
> 
> So, of course, comes my next questions:
> 
> All the program exercises for these tutorials have (obviously) a ".c" extension.
> Will this be compatible with the DigitalMars compiler?
> 
> Will I need to rename them to '.cpp' before I can use any of them?  or will that
> corrupt the file or compiler?
> 
> Me (again)
> 
> 

September 17, 2002
the '.c' files I have were originally in a folder called 'CTutorial'.

I had to move a '.c'  into DigitalMars' bin file in order for it to link and compile.  Though I'm satisfied with the result, I'd like to ask if all of the .c or .cpp files I ever use or create will have to be saved in DigitalMars' bin file in order to work?

Me


September 18, 2002
Aurura wrote:
> the '.c' files I have were originally in a folder called 'CTutorial'.
> 
> I had to move a '.c'  into DigitalMars' bin file in order for it to link and
> compile.  Though I'm satisfied with the result, I'd like to ask if all of the .c
> or .cpp files I ever use or create will have to be saved in DigitalMars' bin
> file in order to work?
> 
> Me
> 
> 
No you don't have to move those *.c and *.cpp files to the bin folder. You have make sure the the bin dir is in the search path.

September 18, 2002
...exactly how do I do that?


September 18, 2002
In article <amad0k$2b9d$1@digitaldaemon.com>, Aurura says...
>
>...exactly how do I do that?
>
>

lot's of ways to skin a cat, sorry if this is too much information.

from a prompt...
set path=c:\etc\etc\dm\bin;%PATH%

-or- you can add c:\etc\dm\bin to your autoexec.bat PATH= statement if you have one.  that way you don't have to reset it every time you open a new window.

-or- you could create a sc.bat file and stick it in your windows\command folder, something like...

rem sc.bat
@echo off
c:\etc\etc\dm\bin\sc.exe %1 %2 %3 %4 %5
rem end sc.bat

-or- you could create a dmvars.bat i've been using this...

rem dmvars.bat
@echo off
if "%1"=="OFF" goto remove
if "%1"=="off" goto remove

subst s: c:\cpp\dm
set path=s:\bin;c:\windows;c:\windows\command;c:\xdos;
set INCLUDE=
set LIB=
echo DMC++ variables set
goto end

:remove
c:
subst s: /d
set path=c:\windows;c:\windows\command;c:\xdos;
echo DMC++ variables removed
goto end

:end
rem end dmvars.bat




September 18, 2002
...I tried your first example in five different ways.

Here's how I tried them:

1.  set path=c:\DigMars\dm\bin,%PATH%
   Too many parameters

2.  set path=c:\DigMars\dm\bin
   (Took me back to the original prompt)

3. set path=c:\DigMars\dm\bin,compiler
   Too many parameters

4.set path=c:\DigMars\dm\bin, compiler
   Too many parameters

5.set path=c:\DigMars\dm\bin,%compiler%
  Syntax error

As you can see, I have no idea what I'm doing.
I'll keep trying.  Any additional assistance would be absolutely wonderful.

Me


September 18, 2002
okay, so I used a semi colon instead.  now, I type in path, and I get:

PATH=C:\DIGMARS\DM\BIN;C:\DIGMARS\DM\BIN;COMPILER

um... was this supposed to happen this way?

feeling sheepish,

Me


September 18, 2002
Aurura wrote:
> ...I tried your first example in five different ways.
> 
> Here's how I tried them:
> 
> 1.  set path=c:\DigMars\dm\bin,%PATH%
>    Too many parameters
> 
> 2.  set path=c:\DigMars\dm\bin
>    (Took me back to the original prompt)
> 
> 3. set path=c:\DigMars\dm\bin,compiler
>    Too many parameters
> 
> 4.set path=c:\DigMars\dm\bin, compiler
>    Too many parameters
> 
> 5.set path=c:\DigMars\dm\bin,%compiler%
>   Syntax error
> 
> As you can see, I have no idea what I'm doing.
> I'll keep trying.  Any additional assistance would be absolutely wonderful.
> 
> Me
> 
> 

you need dot-commas (;) not commas....