www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - crimson editor

reply James Cox <James_member pathlink.com> writes:
I am trying to use D language on Crimson Editor. I keep getting this message.
---------- Capture Output ----------
 "C:\D\dmc\dm\bin\dmc.exe" hello.d

 Terminated with exit code -1.

On tools - user tools - command I input C:\D\dmc\dm\bin\dmc.exe I am not sure if this is correct. Cox
Aug 06 2005
parent reply Nod <Nod_member pathlink.com> writes:
In article <dd2nid$1nlg$1 digitaldaemon.com>, James Cox says...
I am trying to use D language on Crimson Editor. I keep getting this message.
---------- Capture Output ----------
 "C:\D\dmc\dm\bin\dmc.exe" hello.d

 Terminated with exit code -1.

On tools - user tools - command I input C:\D\dmc\dm\bin\dmc.exe I am not sure if this is correct. Cox

Is the dmd executable in your PATH? If you're on XP/2000, you can set this in MyComputer->Properties->Advanced Tab->Environment Variables, or somewhere close by... (not on XP at the moment) Other than that, shouldn't you be calling dmd.exe instead of dmc.exe? Dmc is the C++ compiler afaik. -Nod-
Aug 06 2005
parent reply James Cox <James_member pathlink.com> writes:
In article <dd2pbu$1osr$1 digitaldaemon.com>, Nod says...
In article <dd2nid$1nlg$1 digitaldaemon.com>, James Cox says...
I am trying to use D language on Crimson Editor. I keep getting this message.
---------- Capture Output ----------
 "C:\D\dmc\dm\bin\dmc.exe" hello.d

 Terminated with exit code -1.

On tools - user tools - command I input C:\D\dmc\dm\bin\dmc.exe I am not sure if this is correct. Cox


Is the dmd executable in your PATH? If you're on XP/2000, you can set this in
MyComputer->Properties->Advanced Tab->Environment Variables, or somewhere close
by... (not on XP at the moment)

Other than that, shouldn't you be calling dmd.exe instead of dmc.exe? Dmc is the
C++ compiler afaik.

-Nod-

I am new at this and am not sure of what I am doing.

I set the path in envronment variables to dmd.exe but I still get the same message. I set the path to ;C:\D\dmd\dmd\bin;C:\D\dmd\dm\bin. The error message on the Crimson editor is. ---------- Capture Output ----------
 "C:\D\dmd\dmd\bin\dmd.exe" hello.d

Can't run 'C:\D\dmd\dmd\bin\..\..\dm\bin\link.exe', check PATH
 Terminated with exit code -1.

dmd.exe is in folder C:\D\dmd\dmd\bin\dmd.exe.
Aug 06 2005
parent reply BCS <BCS_member pathlink.com> writes:
It's finding dmd.exe just fine. What it' choking on is link.exe. You have to
tell it exactly where it is if you don't put it where it's expected to be.

1)Find the full path to Link.exe
2)set the environment variable "LINKCMD" to that path.


In article <dd2von$1tks$1 digitaldaemon.com>, James Cox says...
In article <dd2pbu$1osr$1 digitaldaemon.com>, Nod says...
In article <dd2nid$1nlg$1 digitaldaemon.com>, James Cox says...
I am trying to use D language on Crimson Editor. I keep getting this message.
---------- Capture Output ----------
 "C:\D\dmc\dm\bin\dmc.exe" hello.d

 Terminated with exit code -1.

On tools - user tools - command I input C:\D\dmc\dm\bin\dmc.exe I am not sure if this is correct. Cox


Is the dmd executable in your PATH? If you're on XP/2000, you can set this in
MyComputer->Properties->Advanced Tab->Environment Variables, or somewhere close
by... (not on XP at the moment)

Other than that, shouldn't you be calling dmd.exe instead of dmc.exe? Dmc is the
C++ compiler afaik.

-Nod-

I am new at this and am not sure of what I am doing.

I set the path in envronment variables to dmd.exe but I still get the same message. I set the path to ;C:\D\dmd\dmd\bin;C:\D\dmd\dm\bin. The error message on the Crimson editor is. ---------- Capture Output ----------
 "C:\D\dmd\dmd\bin\dmd.exe" hello.d

Can't run 'C:\D\dmd\dmd\bin\..\..\dm\bin\link.exe', check PATH
 Terminated with exit code -1.

dmd.exe is in folder C:\D\dmd\dmd\bin\dmd.exe.

Aug 06 2005
parent reply Mike Parker <aldacron71 yahoo.com> writes:
BCS wrote:
 It's finding dmd.exe just fine. What it' choking on is link.exe. You have to
 tell it exactly where it is if you don't put it where it's expected to be.

And by default it expects the linker to be in C:\dm\bin.
 1)Find the full path to Link.exe
 2)set the environment variable "LINKCMD" to that path.

Alternatively you can set the same variable in dmd/bin/sc.ini. But then you would have to do that every time you update D.
Aug 06 2005
parent reply James Cox <James_member pathlink.com> writes:
In article <dd3p0p$2fp1$1 digitaldaemon.com>, Mike Parker says...
BCS wrote:
 It's finding dmd.exe just fine. What it' choking on is link.exe. You have to
 tell it exactly where it is if you don't put it where it's expected to be.

And by default it expects the linker to be in C:\dm\bin.
 1)Find the full path to Link.exe
 2)set the environment variable "LINKCMD" to that path.

Alternatively you can set the same variable in dmd/bin/sc.ini. But then you would have to do that every time you update D.

I am now at the point when I compile this program. int main(char[][] args) { printf("hello world\n"); printf("args.length = %d\n", args.length); for (int i = 0; i < args.length; i++) printf("args[%d] = '%s'\n", i, cast(char *)args[i]); return 0; } I get this on the crimson editor output window. ---------- Capture Output ----------
 "C:\dmd\bin\dmd.exe" hello.d

 Terminated with exit code 0.

I get no output showing "hello world" I am not sure why. I think I am getting close. Please help.
Aug 07 2005
parent reply Nod <Nod_member pathlink.com> writes:
In article <dd5i8p$m0r$1 digitaldaemon.com>, James Cox says...
 <snip>

I get this on the crimson editor output window. ---------- Capture Output ----------
 "C:\dmd\bin\dmd.exe" hello.d

 Terminated with exit code 0.

I get no output showing "hello world" I am not sure why. I think I am getting close. Please help.

Well, from the output it looks like the program was compiled and linked successfully, as exit code 0 generally means success. An executable should have been generated. Have you tried running it? ;) -Nod-
Aug 07 2005
parent reply James Cox <James_member pathlink.com> writes:
In article <dd5n33$pne$1 digitaldaemon.com>, Nod says...
In article <dd5i8p$m0r$1 digitaldaemon.com>, James Cox says...
 <snip>

I get this on the crimson editor output window. ---------- Capture Output ----------
 "C:\dmd\bin\dmd.exe" hello.d

 Terminated with exit code 0.

I get no output showing "hello world" I am not sure why. I think I am getting close. Please help.


After running the program hello.d on crimson editor I now have hello.d, hello.exe, hello.obj and hello.map. When I go to the folder I have hello.exe in and click on it, it flashes up on the screen so fast I can not read it. Is there a way to run the program from crimson editor? Also is there a way to keep the console screen from disappearing? What would I type in on the console to access hello.exe which I have in folder dmd? Thanks for any help.

Well, from the output it looks like the program was compiled and linked successfully, as exit code 0 generally means success. An executable should have been generated. Have you tried running it? ;) -Nod-

Aug 07 2005
next sibling parent Derek Parnell <derek psych.ward> writes:
On Sun, 7 Aug 2005 22:05:25 +0000 (UTC), James Cox wrote:

 In article <dd5n33$pne$1 digitaldaemon.com>, Nod says...
In article <dd5i8p$m0r$1 digitaldaemon.com>, James Cox says...
 <snip>

I get this on the crimson editor output window. ---------- Capture Output ----------
 "C:\dmd\bin\dmd.exe" hello.d

 Terminated with exit code 0.

I get no output showing "hello world" I am not sure why. I think I am getting close. Please help.


After running the program hello.d on crimson editor I now have hello.d, hello.exe, hello.obj and hello.map. When I go to the folder I have hello.exe in and click on it, it flashes up on the screen so fast I can not read it. Is there a way to run the program from crimson editor? Also is there a way to keep the console screen from disappearing? What would I type in on the console to access hello.exe which I have in folder dmd? Thanks for any help.

Well, from the output it looks like the program was compiled and linked successfully, as exit code 0 generally means success. An executable should have been generated. Have you tried running it? ;)


I use crimson editor as well. The way I do this is that I only use CE to edit the program source and not run the compiler etc.... However, I do have a 'tool' set up to open a DOS console starting in the folder where the source file is. My settings for CE are ... Menu Text: DOS Prompt Command: C:\win2000\system32\cmd.exe Argument: Initial Dir: $(FileDir) Hot Key: None Close of Exit: [ticked] Capture output: [not ticked] Use short filename: [not ticked] Save before execute: [ticked] I have this set to Ctrl-2 so when I want to compile the code, I press Ctrl-2 to bring up a DOS console and type "build <whatever>". Hmmm ... I could add a command switch to Build so you can run the compiled program immediately after a successful link. That way, you need only to set up CE to run 'build' with this new switch and it can compile then run your program all in one step. -- Derek Melbourne, Australia 8/08/2005 9:26:08 AM
Aug 07 2005
prev sibling next sibling parent BCS <BCS_member pathlink.com> writes:
From the start menu, choose run
type "cmd" and press enter
this will get you a command line
use cd to get to the appropriate directory (cd /? Will show you how to use cd)
run the program by typing "hello"
Aug 07 2005
prev sibling parent reply Mike Parker <aldacron71 yahoo.com> writes:
James Cox wrote:

 After running the program hello.d on crimson editor I now have hello.d,
 hello.exe, hello.obj and hello.map. When I go to the folder I have hello.exe in
 and click on it, it flashes up on the screen so fast I can not read it. Is
there
 a way to run the program from crimson editor? Also is there a way to keep the
 console screen from disappearing? What would I type in on the console to access
 hello.exe which I have in folder dmd? Thanks for any help.

I just keep a command prompt open alongside CE and use it for building/running. I can understand the desire to do it with a keystroke or two from within CE, but it's not a hassle at all for me. Particularly when using Derek's Build utility. I have a couple of Build Respons Files for debug and release configs (and other configurations as needed). From CE I alt-tab to the command prompt, type build dbg, type exename. Maybe one day I'll try to figure out how to get all of that configured in CE, but for now it doesn't matter.
Aug 07 2005
parent James Cox <James_member pathlink.com> writes:
In article <dd6sln$1ml6$1 digitaldaemon.com>, Mike Parker says...
James Cox wrote:

 After running the program hello.d on crimson editor I now have hello.d,
 hello.exe, hello.obj and hello.map. When I go to the folder I have hello.exe in
 and click on it, it flashes up on the screen so fast I can not read it. Is
there
 a way to run the program from crimson editor? Also is there a way to keep the
 console screen from disappearing? What would I type in on the console to access
 hello.exe which I have in folder dmd? Thanks for any help.

I just keep a command prompt open alongside CE and use it for building/running. I can understand the desire to do it with a keystroke or two from within CE, but it's not a hassle at all for me. Particularly when using Derek's Build utility. I have a couple of Build Respons Files for debug and release configs (and other configurations as needed). From CE I alt-tab to the command prompt, type build dbg, type exename. Maybe one day I'll try to figure out how to get all of that configured in CE, but for now it doesn't matter.

Thanks for all the help. I set up the console to open with crtl 2. Is there any books on programming in the D language?
Aug 08 2005