csc and full path to src file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mathieu

    csc and full path to src file

    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\Proj ects\gdcm\relea se-cl\Examples\Csh arp
    \ManipulateFile .cs

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

    Thanks.
    -Mathieu

    (*)
    cd C:\cygwin\home\ mmalaterre\Proj ects\gdcm\relea se-cl\Examples
    \Csharp
    C:\WINDOWS\Micr osoft.NET\Frame work\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\Pro jects\gdcm
    \release-cl\Examples\Csh arp\ManipulateF ile.cs' could not be opened
    ('Le fichier sp‚cifi‚ est introuvable. ')
    NMAKE : fatal error U1077: 'C:\WINDOWS\Mic rosoft.NET\Fram ework
    \v1.1.4322\csc. exe' : return code '0x1'
  • Jani Järvinen [MVP]

    #2
    Re: csc and full path to src file

    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
    janij@removethi s.dystopia.fi



    Comment

    • mathieu

      #3
      Re: csc and full path to src file

      On Nov 14, 5:02 pm, "Jani Järvinen [MVP]"
      <ja...@removeth is.dystopia.fiw rote:
      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

      Comment

      Working...