Thread overview
getting message OPTLINK : Error 3: Cannot Create File
Nov 01, 2005
Israel
Nov 01, 2005
Israel
Nov 01, 2005
Derek Parnell
Nov 02, 2005
Israel
Nov 02, 2005
Derek Parnell
Nov 03, 2005
Israel
Nov 04, 2005
Walter Bright
November 01, 2005
Hi guys,

I'm hoping someone here can spot the problem.  I'm using the Code::Blocks IDE to drive the DMC compiler.

The compilation works fine, but the link is failing with: OPTLINK : Error 3: Cannot Create File \console1\console.exe

The build log is as follows:

Project   : Console application
Compiler  : Digital Mars Compiler (called directly)
Directory : C:\Utilities\WXP\Dev\C++\console1\
--------------------------------------------------------------------------------
Switching to target: default
dmc.exe -mn -c       -I"C:\Program Files\dm845c\dm\stlport\stlport"
-I"C:\Program Files\dm845c\dm\include" -o.objs\main.obj main.cpp
link.exe /NOLOGO    .objs\main.obj ,
"C:\Utilities\WXP\Dev\C++\console1\console.exe", ,
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

OPTLINK : Error 3: Cannot Create File \console1\console.exe
Process terminated with status 1 (0 minutes, 6 seconds)
0 errors, 0 warnings


(P.S. I also posted this in the codeblocks forums at http://forums.codeblocks.org/index.php?topic=1246.msg8826#msg8826)

Thanks very much,

Israel


November 01, 2005

In article <dk8gp0$our$1@digitaldaemon.com>, Israel says...

snip

>Directory : C:\Utilities\WXP\Dev\C++\console1\

The problem *appears* to be that the linker doesn't tolerate the C++ folder name
in the path; when I changed this to C:\Utilities\WXP\Dev\CPP\console1\
the executable was created.

Bug?  Feature?  Undocumented feature? (grin)


November 01, 2005
On Tue, 1 Nov 2005 23:44:51 +0000 (UTC), Israel wrote:

> In article <dk8gp0$our$1@digitaldaemon.com>, Israel says...
> 
> snip
> 
>>Directory : C:\Utilities\WXP\Dev\C++\console1\
> 
> The problem *appears* to be that the linker doesn't tolerate the C++ folder name
> in the path; when I changed this to C:\Utilities\WXP\Dev\CPP\console1\
> the executable was created.
> 
> Bug?  Feature?  Undocumented feature? (grin)

Optlink is an *old* MS-DOS application and it doesn't tolerate 'weird' characters, such as space and +, in folder names. Walter is in no mind to bring it up to date either, so you need to be careful how you name folders it will need.

-- 
Derek
(skype: derek.j.parnell)
Melbourne, Australia
2/11/2005 10:47:50 AM
November 02, 2005
In article <7pwf2motfosm$.1o0j2ph0o5ms0$.dlg@40tude.net>, Derek Parnell says...

snip

>Optlink is an *old* MS-DOS application and it doesn't tolerate 'weird' characters, such as space and +, in folder names. Walter is in no mind to bring it up to date either, so you need to be careful how you name folders it will need.

Is there a better way to link?  I saw on the digitalmars website that the linker was a super high-performance linker- I take it that link.exe is not it?

What should I be using instead?

Thanks,

Israel

>
>-- 
>Derek
>(skype: derek.j.parnell)
>Melbourne, Australia
>2/11/2005 10:47:50 AM


November 02, 2005
On Wed, 2 Nov 2005 10:27:29 +0000 (UTC), Israel wrote:

> In article <7pwf2motfosm$.1o0j2ph0o5ms0$.dlg@40tude.net>, Derek Parnell says...
> 
> snip
> 
>>Optlink is an *old* MS-DOS application and it doesn't tolerate 'weird' characters, such as space and +, in folder names. Walter is in no mind to bring it up to date either, so you need to be careful how you name folders it will need.
> 
> Is there a better way to link?  I saw on the digitalmars website that the linker was a super high-performance linker- I take it that link.exe is not it?
> 
> What should I be using instead?

link.exe is OptLink. And it is a super high-performance (read: fast) linker because it is written in highly optimised hand-coded assembler. This makes it very hard to maintain now. I suspect that Walter is worried about the cost of changing it and the high risk of breaking it in unexpected ways.

He would very much like someone else to write a replacement ;-)

-- 
Derek
(skype: derek.j.parnell)
Melbourne, Australia
3/11/2005 10:05:41 AM
November 03, 2005
In article <mgxmqnhiow0y$.4sxfs90ps26o.dlg@40tude.net>, Derek Parnell says...
>
>On Wed, 2 Nov 2005 10:27:29 +0000 (UTC), Israel wrote:
>
>> In article <7pwf2motfosm$.1o0j2ph0o5ms0$.dlg@40tude.net>, Derek Parnell says...
>> 
>> snip

snip

>link.exe is OptLink. And it is a super high-performance (read: fast) linker because it is written in highly optimised hand-coded assembler. This makes it very hard to maintain now. I suspect that Walter is worried about the cost of changing it and the high risk of breaking it in unexpected ways.
>
>He would very much like someone else to write a replacement ;-)

Hi Derek,

Thanks for your comments and explanations.  I would love to be able to help out here, because I really appreciate the time and effort that Walter and all the other guys contribute, doing tremendous open-source stuff that we all benefit from.

Alas, I'm pretty worthless on this platform- my speciality is in another world. Maybe some day I'll be able to make a contribution here also.

Thanks again for the info.

Best Regards,

Israel
>
>-- 
>Derek
>(skype: derek.j.parnell)
>Melbourne, Australia
>3/11/2005 10:05:41 AM


November 04, 2005
"Derek Parnell" <derek@psych.ward> wrote in message news:mgxmqnhiow0y$.4sxfs90ps26o.dlg@40tude.net...
> link.exe is OptLink. And it is a super high-performance (read: fast)
linker
> because it is written in highly optimised hand-coded assembler. This makes it very hard to maintain now. I suspect that Walter is worried about the cost of changing it and the high risk of breaking it in unexpected ways.

Optlink is frankly an incredible linker. After 10 years, it remains far and away the fastest linker in existence, by a huge margin. It was written by Steve Russell who's an old school genius at assembly language programming.

Only 3 bugs in it have surfaced in the last 10 years. That's *incredible* for such a complex application.

The problem with +, -, and spaces in the command line is not because it's an MS-DOS program (it isn't, it's a Win32 program), but because it was built to match the old Microsoft linker command line format, where such characters had special meanings.

> He would very much like someone else to write a replacement ;-)

I'm going to need a replacement for 64 bit linking. But I'll stick with optlink for 32 bits! And to be perfectly honest, optlink is why DMC++ sticks with OMF rather than going to COFF object module format.