guys anyone knows what can I do to compile my O.S using something like that:
gcc -Wall -O3 -fstrength-reduce -ffreestanding -nostdlib -nostartfiles -fomit-frame-pointer -nostdinc -fno-builtin -c -o %2 %1
the windows prompt returns something like " cannot execute program "
is in portuguese that error forgive my english mistakes please.
maybe is something like cmdargs length
cannot use some args compiling at my WindowsXP cmd
-
- Member
- Posts: 190
- Joined: Tue Sep 26, 2006 1:40 pm
- Libera.chat IRC: Nokurn
- Location: Ontario, CA, USA
- Contact:
If you're still looking for help, I might be able to offer some:
DOS (cmd/command) has a limit on command lengths. 127 characters is the max length. It will give you a "The system cannot execute the specified program." notice if you try to use a command longer than 127 characters. There is, however, a workaround to this. You may execute commands longer than 127 characters through a third-party program, such as make.
Here's one of my earlier workarounds:
Add as many do_command("command");s as you need. Just be sure to put them before getchar();.
Compile with: gcc build.c -o build.exe
Hope this helped
DOS (cmd/command) has a limit on command lengths. 127 characters is the max length. It will give you a "The system cannot execute the specified program." notice if you try to use a command longer than 127 characters. There is, however, a workaround to this. You may execute commands longer than 127 characters through a third-party program, such as make.
Here's one of my earlier workarounds:
Code: Select all
build.c
#include <stdio.h>
#include <stdlib.h>
void do_command(char *command)
{
printf("%s\n", command);
system(command);
}
int main(int argc, char* argv[])
{
do_command("build_command1");
do_command("build_command2");
do_command("etc");
/*
* Pauses so that the person building the program
* may read errors/warnings before termination.
*/
getchar();
return 0;
}
Compile with: gcc build.c -o build.exe
Hope this helped
- carbonBased
- Member
- Posts: 382
- Joined: Sat Nov 20, 2004 12:00 am
- Location: Wellesley, Ontario, Canada
- Contact:
I believe this limit is larger on Win2k/Xp systems... regardless, though, there is also a limit when executing through external programs, such as make, as suggested.Jeremiah Griffin wrote: DOS (cmd/command) has a limit on command lengths. 127 characters is the max length.
This limit is substantially larger, so you're unlikely to hit it as easily, but I just wanted to toss this out, as I've reached it in the past and was a bit boggled by it at the time.
--Jeff