-
Good dos compiler
Hi, I am looking for a compiler that creates a dos executable and can make it real small. I have a bit of code I wrote that is about 5kb and when I compile it in Visual C++ I get an exe file size of about 440kb and doesn't work in dos. Any suggestions? Thanks.
-
djgpp
>>I get an exe file size of about 440kb<<
Take a look at your compiler settings (don't compile with debug info).
-
Thanks for the reply. I get 2 errors though, trying to compile with this. They are both similar so I'll only list one:
recorder.cpp:107: error: `mkdir' undeclared (first use this function)
It is saying function mkdir() is not defined?
-
Did you include stat.h?
Code:
#include <sys/stat.h>
-
No, but I did now and it fixed it. But, not the other error:
error: `chdir' undeclared (first use this function)
-
Try adding
Code:
#include <unistd.h>
-
Try running the Ultimate eXecutable Packer on it. It's available at: http://upx.sourceforge.net/
About it not working in DOS... it's most likely being compiled for Win32 console which requires has to be run from a Windows DOS prompt.
-
Wow, thanks, it brought my file down to 43kb! Thanks!