why the psp-g++ don`t accept the cygwin&MinGW style pat

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
leonliu
Posts: 5
Joined: Mon Dec 15, 2008 12:39 am

why the psp-g++ don`t accept the cygwin&MinGW style pat

Post by leonliu »

Hi guys, I used psp-g++.exe to compile a file on gygwin,faild whin neither

psp-g++ -I/g/pspkit/devkitPSP/psp/sdk/include main.cpp

nor

psp-g++ -I/cygdrive/g/pspkit/devkitPSP/psp/sdk/include main.cpp

but,if use win32 style path,it sucess

psp-g++ -Ig:/pspkit/devkitPSP/psp/sdk/include main.cpp


who can tell me why!!!!
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

Are you running psp-g++ from a windows command prompt, or a cygwin command prompt?
leonliu
Posts: 5
Joined: Mon Dec 15, 2008 12:39 am

Post by leonliu »

ooPo wrote:Are you running psp-g++ from a windows command prompt, or a cygwin command prompt?
I was running psp-g++ from cygwin command prompt.
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

My only other guess would be that you're running a pre-built toolchain meant for mingw or whatever they use to let you build it directly into a windows binary.
Heimdall
Posts: 245
Joined: Thu Nov 10, 2005 1:29 am
Location: Netherlands
Contact:

Post by Heimdall »

mingw toolchains accept both path formats:

either microsoft style C:\directory\file.extension
or unix C:/directory/file.extension

HOWEVER :) you must be consistent in the command invocation, in other words, if you pick \ you must always use it, the same for /, example:

gcc -I..\include src\file.c -o bin\file.o -> OK
gcc -I../include src/file.c -o bin/file.o -> OK
gcc -I../include src\file.c -o bin\file.o -> NOT OK (include slash different from file)

Also note that mingw builds do not understand /cygdrive/c because there is no directory named cygdrive in the root of the drive where the binary exists.

Please try to check which gcc are you using is it mingw? is it cygwin? and make a simple test as above... hope this can help!
Post Reply