I configured TextPad to compile with gcc -Wall a c file
C:\MinGW\bin\gcc.exe
-Wall $File
$FileDir
How can I start the program with the same call?
GCC and run program
Moderators: AmigoJack, bbadmin, helios, MudGuard
-
ben_josephs
- Posts: 2464
- Joined: Sun Mar 02, 2003 9:22 pm
- talleyrand
- Posts: 624
- Joined: Mon Jul 21, 2003 6:56 pm
- Location: Kansas City, MO, USA
- Contact:
-
ben_josephs
- Posts: 2464
- Joined: Sun Mar 02, 2003 9:22 pm
- talleyrand
- Posts: 624
- Joined: Mon Jul 21, 2003 6:56 pm
- Location: Kansas City, MO, USA
- Contact:
Ben and I were discussing the filename of the executible. What you are asking for is to hit the button, compile your code and then run it, yes? If so, what you probably need to do is either make two tools, one you have already with gcc. The other would call the program located... Nevermind, that won't work. That leaves the alternative which is the creation of a batch file to do the two commands. My batch making skills are extremely rusty but this ought to do the job (worked for me just now). Save this out as a gcc.bat (or whatever) and set your tool parameters up as
$BaseName.exe $FileName
$BaseName.exe $FileName
Code: Select all
@echo off
rem %1 is the name of the executible
rem %2 is the name of the source file
E:\mingw\bin\gcc.exe -Wall -o %1 %2
rem Not sure if call is needed here or not.
call %1 4
I choose to fight with a sack of angry cats.
-
-LG-
- Posts: 6
- Joined: Tue Nov 18, 2003 8:23 pm
- talleyrand
- Posts: 624
- Joined: Mon Jul 21, 2003 6:56 pm
- Location: Kansas City, MO, USA
- Contact: