1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

TCC/LE string replacement differing from cmd.exe

Discussion in 'TCC/LE Support' started by adam_0, Sep 7, 2017.

  1. adam_0

    Joined:
    Sep 7, 2017
    Messages:
    2
    Likes Received:
    0
    First post, looking for some help. I'm trying to build Go 1.4.3 with their build script (https://github.com/golang/go/blob/go1.4.3/src/make.bat#L57) which works with cmd.exe but not tcc.exe. (some brief background: to build from source, one must build a version of Go prior to 1.5 to "bootstrap" the building of the latest version -- all versions 1.5+ are built in Go instead of C).

    The line in question is a little bit hairy:

    Code:
    set DEFGOROOT=-DGOROOT_FINAL="\"%GOROOT_FINAL:\=\\%\""
    So I tried to simplify it and see where the root of the problem is:

    Code:
    [C:\Program Files (x86)\JPSoft\TCCLE14]set FOO=C:\my-test\some-stuff\asdf
    
    [C:\Program Files (x86)\JPSoft\TCCLE14]set BAR=%FOO:\=\\%
    
    [C:\Program Files (x86)\JPSoft\TCCLE14]echo %FOO%
    C:\my-test\some-stuff\asdf
    
    [C:\Program Files (x86)\JPSoft\TCCLE14]echo %BAR%
    C:\\\\my-test\\\\\\\\\some-stuff\\\\\\\\\\\\asdf
    
    Pretty strange... but here's what I discovered:

    Code:
    C:\\\\my-test\\\\\\\\\some-stuff\\\\\\\\\\\\asdf
                 \my-test\          \some-stuff\
    
    That's right, for some reason the number of slashes is related to the size of the directory before.

    Not sure what's going on here, but any help is appreciated!
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,855
    Likes Received:
    83
    Not reproducible with TCC or TCC-RT v21.
     
  3. adam_0

    Joined:
    Sep 7, 2017
    Messages:
    2
    Likes Received:
    0
  4. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,855
    Likes Received:
    83
    TCC/LE is free and unsupported, and v14 is the most recent (and probably last) version.

    TCC-RT is free and supported. TCC and TCMD are supported, but not free.
     

Share This Page