csc and full path to src file

M

mathieu

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'
 
J

Jani Järvinen [MVP]

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
(e-mail address removed)
http://www.saunalahti.fi/janij/
 
M

mathieu

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top