Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

UNIX/Linux-style paths

Aug
10
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
 
Last edited:
Back
Top