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

UNIX/Linux-style paths

Discussion in 'TCC/LE Support' started by smf, Sep 13, 2015.

  1. smf

    smf

    Joined:
    Aug 3, 2015
    Messages:
    10
    Likes Received:
    0
    I've enabled this option because of a cross platform project and I've discovered a bug.

    Compiling this program with mingw

    #include <stdio.h>

    int main(int argc, char *argv[])
    {
    for (int i = 0; i < argc; i++)
    {
    printf( "%s\n", argv[ i ]);
    }
    }

    C:\temp>gcc x.c -std=c99

    Runnng it in cmd 10.0.10240

    C:\temp>c:/temp/a.exe
    c:/temp/a.exe

    Running it in tccle 14.00.4

    [C:\temp]c:/temp/a.exe
    c:
    /temp/a.exe

    It runs the correct executable but somehow the parameters are passed incorrectly. This obviously causes problems for some programs.

    I tested it with visual studio 2015 community edition

    [C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64]vcvars64.bat

    [C:\temp]cl x.c

    and it exhibits the same problem in build 6.

    [C:\temp]c:/temp/x.exe
    c:
    /temp/x.exe

    [C:\temp]cmd
    Microsoft Windows [Version 10.0.10240]
    (c) 2015 Microsoft Corporation. All rights reserved.

    C:\temp>c:/temp/x.exe
    c:/temp/x.exe
     
    #1 smf, Sep 13, 2015
    Last edited: Oct 2, 2015

Share This Page