Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

csc and full path to src file

27 views
Skip to first unread message

mathieu

unread,
Nov 14, 2008, 4:44:14 AM11/14/08
to
Hi there,

I do not understand what is going on with the following cmd line
(*). As specified I would like to compile the cs file:
C:/cygwin/home/mmalaterre/Projects/gdcm/trunk/Examples/Csharp/
ManipulateFile.cs

but for some reason the full path is being replaced by:

c:\cygwin\home\mmalaterre\Projects\gdcm\release-cl\Examples\Csharp
\ManipulateFile.cs

Is there something I need to do/know when compiling src code with full
path ?

Thanks.
-Mathieu

(*)
cd C:\cygwin\home\mmalaterre\Projects\gdcm\release-cl\Examples
\Csharp
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\csc.exe /r:C:/
cygwin/home/mmalaterre/Projects/gdcm/release-cl/bin/./gdcm_csharp.dll /
out:C:/cygwin/home/mmalaterre/Projects/gdcm/release-cl/bin/./
ManipulateFile.exe C:/cygwin/home/mmalaterre/Projects/gdcm/trunk/
Examples/Csharp/ManipulateFile.cs
Microsoft (R) Visual C# .NET Compiler version 7.10.6001.4
for Microsoft (R) .NET Framework version 1.1.4322
Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.

error CS1504: Source file 'c:\cygwin\home\mmalaterre\Projects\gdcm
\release-cl\Examples\Csharp\ManipulateFile.cs' could not be opened
('Le fichier sp‚cifi‚ est introuvable. ')
NMAKE : fatal error U1077: 'C:\WINDOWS\Microsoft.NET\Framework
\v1.1.4322\csc.exe' : return code '0x1'

Jani Järvinen [MVP]

unread,
Nov 14, 2008, 11:02:31 AM11/14/08
to
Hi Matheu,

the path separator in Windows is the backslash character \, not the
(forward) slash, /, like in Unix systems.

Furthermore, you should put quotation marks around the full path if it
contains spaces. Your example doesn't contain spaces in the path, but this
is easy to forget.

Now, I suspect your problem relates to the fact that you use the incorrect
path separator. Although you can use the slash in many applications just
fine, there no guarantee that it will always work. So, try rerunning your
command with \ as the separator.

And of course, make sure the file really exists and you have the rights to
access it!

--
Regards,

Mr. Jani Järvinen
C# MVP
Vantaa, Finland
ja...@removethis.dystopia.fi
http://www.saunalahti.fi/janij/


mathieu

unread,
Nov 14, 2008, 12:46:56 PM11/14/08
to
On Nov 14, 5:02 pm, "Jani Järvinen [MVP]"

<ja...@removethis.dystopia.fi> wrote:
> Hi Matheu,
>
> the path separator in Windows is the backslash character \, not the
> (forward) slash, /, like in Unix systems.

Indeed changing the src file path to a windows style one, did fixed my
issue. What is suprising is that /r and /out are fine with unix style
or windows style path.

Thanks
-M

0 new messages