Executing MSYS from cmd.exe with arguments
Posted
by Chris Allison
on Stack Overflow
See other posts from Stack Overflow
or by Chris Allison
Published on 2010-03-30T16:12:09Z
Indexed on
2010/03/30
17:33 UTC
Read the original article
Hit count: 513
Hi, I am trying to learn wxWidgets library, using mingw and msys to compile the code. So far so good, but I can not find a way to send a command to MSYS through CMD.exe.
I use SublimeText to edit files, and it has an option to run makefiles. I want my makefiles to be able to open an instance of MSYS and send the g++ command and arguments to it.
Example: Right now my makefile is:
test.exe : main.cpp
g++ -s main.cpp -o test.exe `wx-config --cxxflags` `wx-config --libs`
When mingw32-make goes to run the g++ command, it sends it to cmd.exe, which doesn't handle the back-ticks and wx-config jazz. (But the command does work when run from inside MSYS and the directory holding main.cpp)
I want to be able to use something like...
msys --command g++ -s main.cpp*...etc..*
so it will load the msys enviroment, and run the command. Is this possible? I am a huge makefile newbie, so if there is an easier way, please show me!
TIA!
© Stack Overflow or respective owner