|
From: Nathan R. <zer...@ho...> - 2011-06-28 21:51:07
|
Hello,
I'm trying to use MinGW make to compile a program with the Visual C++ compiler, but
I'm running into some strange behaviour.
Consider the following trivial makefile:
my_program :
cl /c src\test.cpp
("cl" is the command for the Visual C++ compiler).
This works fine. However, if I add quotes around the input file name, as such:
my_program :
cl /c "src\test.cpp"
I get an error:
cl : Command line warning D9024 : unrecognized source file type 'c:/', object file assumed
It seems that MinGW make is converting the /c option into the path c:/
However this seems to only happen if there are quotes around the src\test.cpp
If there are no quotes, everything is fine.
If I add other options, it gets even weirder:
my_program :
cl /c /O2 "src\test.cpp"
cl : Command line warning D9024 : unrecognized source file type 'c:/', object file assumed
cl : Command line warning D9024 : unrecognized source file type 'C:/mingw/msys/1.0/O2', object file assumed
Again, MinGW make converted something that wasn't supposed to be a path, into a path.
But again, it works fine if I removed the quotes around src\test.cpp
What is going on here? Can this path conversion functionality be disabled?
Note that while I have MSYS installed on my system, I am using a regular Windows command
prompt, not MSYS, and I am using mingw32-make, not MSYS make.
Thanks,
Nate.
|