I'm trying to make a quick c++ compiler in batch, but it keeps on giving me 2 errors.
The filename, directory name, or volume label syntax is incorrect.
g++: error: missing filename after '-o'
I don't know where these errors are coming from since I double checked my path that I was inputting , and it worked fine on normal command line, and I have a var after the -o that acts as a filename. I was wondering if anyone could help me figure this out.
Here is my Code
@echo off
set /p path = "Path of Program "
set /p file = "filename "
set /p exe = " exe name "
cd \
cd %path%
g++ %file% -IC:\Development\i686-w64-mingw32\include -L C:\Development\i686-w64-mingw32\lib -w -Wl,-subsystem,windows -lmingw32 -lSDL2main -lSDL2 -o %exe%
pause