-
2.5K :)
It puts up a message box :)
Although, for DOS apps you can cheat because a .COM file doesn't need to have any of the extra information that an .EXE needs to be loaded properly (.com files are a maximum of 64K, and always loaded into the same memory location).
-
what project settings do you have? I have release, libs only user32.lib, CRT as dll, custom entry point:
Code:
void MyMain()
{
MessageBoxA(blabla);
}
and no header files, I declared MessageBoxA manually...
optimized for size (that won't do anything), the strings are both "" (saves 4k), subsystem windows...
any other things?
-
Simple method :)
Redeclare the CRT entry-point:
Code:
int _mainCRTStartup() {
MessageBoxA(NULL, "Hello", "Random", 0);
return 0;
}
That doesn't even need the CRT at all :D
-
I did that. Well, I gave my function another name, but I set it as the entry point of my application.
Maybe VC++ 5 creates smaller apps than VC++ 6 ?
-
Hmm. Try using the "Ignore standard libraries" option.
-
nope, didn't change it. Do you have the project somewhere?
-
1 Attachment(s)
-
thanks. I just managed to nearly block a Athlon 600 MHz with integer operations and a damn lot of function calls. I'll try to figure out how many exactly.
-
Impressive :)
Oh yeah, and the fact that I wrote that in pure C probably had something to do with it ;)
-
Hey, that could be it.
I have a little problem:
Code:
int fib(int n)
{
if(n == 0 || n == 1)
return 1;
return fib(n-1) + fib(n-2);
}
Can you think of a formula how often this thing is called for any number n?
Basically, it's 2^n, but there is this if thing...
-
Hmm...
If I compile your project on my pc with VC++ 6.0 it creates a 16k exe...
-
1 - I'm not familiar with Big-O notation so can't help you here :)
2 - Try adding this to the linker options: /OPT:NOWIN98
-
too late. Loading your project somehow killed my VC++, the menu bar is missing :(
This is the same error some others here experienced. I'm off looking at the microsoft homepage for a solution...
-
Hee hee.
Makefiles aren't so bad ;)
-
:(
I uninstalled VC++, only to find that there is a solution without reinstalling it. Worst is, I can't find my installation CD now !!!
I DON'T HAVE VC++ AT THE MOMENT :(:(:(:(:(:(:(
-
Why do you need it? Just pick another compiler :confused:
What VC++ specific features are you using?
-
Borland :p
(supports MFC, btw :D)
I've never had code completion for C++, and it didn't hurt me :D