Wiki

Changes between Version 6 and Version 7 of CommandLine

Show
Ignore:
Timestamp:
06/01/11 08:09:08 (13 years ago)
Author:
hopscc
Comment:

Tidy up wording for -ref

Legend:

Unmodified
Added
Removed
Modified
  • CommandLine

    v6 v7  
    5757 
    5858== Options == 
    59    options form : -option:value, synonyms 
     59   options form : -[option or synonym]:value 
     60 
     61=== -Reference/-Ref === 
     62  * Specifies a file (in .Net an assembly file) that can resolve 'using namespace' references. 
     63 
     64   Providing a reference to a resolving file is done using '''-ref:''' option file and can specify an absolute pathname or a filename.  
     65   - in .Net this can can be either an .exe or a .dll . 
     66 
     67   a) assemblyFileName.exe or assemblyFileName.dll[[BR]] 
     68   b) \its\fullPath\assemblyFileName.exe or \its\fullPath\assemblyFileName.dll[[BR]] 
    6069 
    6170 
    62    passing reference to an assembly be it .exe or .dll[[BR]] 
    63    is done through -ref: it can take either of the two[[BR]] 
    64    a) assemblyFileName.exe or assemblyFileName.dll[[BR]] 
    65    b) itsFullPath\assemblyFileName.exe or itsFullPath\assemblyFileName.dll[[BR]] 
     71{{{ 
     72e.g. 
     73cobra -c -ref:anyAssembly.dll codeFile.cobra 
     74                 or  
     75cobra -c -ref:anyAssembly.exe codeFile.cobra 
    6676 
    67 cobra -c -ref:anyAssembly.dll codeFile.cobra[[BR]] 
    68                  or [[BR]] 
    69 cobra -c -ref:anyAssembly.exe codeFile.cobra[[BR]] 
    70               with Full Paths[[BR]] 
    71 cobra -c -ref:itsFullPath\anyValidAssembly.dll codeFile.cobra[[BR]] 
    72                  or [[BR]] 
    73 cobra -c -ref:itsFullPath\anyValidAssembly.exe codeFile.cobra[[BR]] 
     77#with Full Paths 
     78cobra -c -ref:\its\fullPath\anyValidAssembly.dll codeFile.cobra 
     79                 or  
     80cobra -c -ref:\its\fullPath\anyValidAssembly.exe codeFile.cobra 
     81}}} 
    7482 
    75    if you are not providing paths of the referenced assemblies then you can use[[BR]] 
    76   -lib: option to provided additional paths for compiler to search for the referenced assemblies[[BR]] 
    77    this can work good for assemblies outside of the GAC i.e private assemblies[[BR]] 
    78    but suppose you want to include System.Speech which is found in both .net 3.5[[BR]] 
    79    and .net 4.0 so even if you provide additional paths through -lib: for System.Speech[[BR]] 
    80    if compiler is compiled on .net 4.0 it may default to using .net 4.0 version of System.Speech[[BR]] 
    81    so when you want to specify paths to the referenced assembly explicitly[[BR]] 
    82    use -ref:withFullPath\to\requiredAssembly.dll or .exe[[BR]] 
     83 
     84   If you are not providing the paths of the referenced assemblies then you can use[[BR]] 
     85   the -lib: option to give additional paths for the compiler to search for the referenced assemblies.[[BR]] 
     86   This can work well for assemblies outside of the GAC i.e private assemblies[[BR]] 
     87   but if you want to include (something like) System.Speech which is found in both .net 3.5[[BR]] 
     88   and .net 4.0 even if you specify additional paths to search using -lib:,[[BR]] 
     89   if the compiler is compiled on .net 4.0 it may default to using the .net 4.0 version.[[BR]] 
     90   So when you need to unambiguously specify paths to the referenced assembly use an absolute pathname[[BR]] 
     91   i.e use -ref:\withFullPath\to\requiredAssembly.dll or .exe[[BR]] 
    8392 
    8493