pouët.net

Intro size optimize with vc7

category: general [glöplog]
 
Hello guys,

I have a question about the vc7 c++ compiler. I have converted my dx9 intro system to the .net programming environment. Of course it is still a win32 executable. But the libs and executable are like three times bigger in release mode than when compiled with the vc6 compiler. I use the same compiler options like compiling without default libs, etc. Can someone give me some advise about this, i hate to do the compiler tweaking stuff myself :) Thanks!
Um, I'm not sure what you're doing that's causing this, but you may want to hex-edit the executable and see what kind of stuff is being stashed inside of it. Perhaps you left browsing info on? Stack overflow checks? Etc?
added on the 2004-04-07 13:04:00 by sagacity sagacity
#1 .NET doesnt produce "win32 executables", its .NET executables

#2 I dont think you know what .NET is, what you probably have done is to convert your workspaces to VS.NET sollutions, or?

#3 Doesnt matter what you do... You will have to ignore the standardlibs or really mess around to get to use VC7 for introcoding, since VC7 defaults to a runtime dll that doesnt exist.

#4 Binary size of the .exe shouldnt be bigger than in vc6, double checked that everything uses Multithreaded DLL stuff?

ZZZZZZzzzzzzzzzzzzzzZzzzzzzzz
added on the 2004-04-07 14:41:21 by Hatikvah Hatikvah
Doesnt exist defaulty in any windows install that is.


GAH THAT zzzZZZZZZzzzzzzzzZZZZZzzzzzz is needed

ZZZZZZzzzzzzzzzzzzzzZzzzzzzzz (tries again)
added on the 2004-04-07 14:43:06 by Hatikvah Hatikvah
I know exactly what .NET is, i am working with it for 2 years now for my work.

I converted my project indeed to a solution, but the development environment can still create non .net libraries and executables, and that is exactly what it does.. Still thank you for thinking i am that stupid :S

I will check at home for the multithreading dll stuff
There is a tutorial about this @ CFXWEB and also in Hugi (The coding issue). Something about "Doing 64k intros with Visual Studio".
The main thing is that you have to ignore the default libs and do the links to the functions yourself. Import only the LIBs you really need (KERNEL32.LIB, USER32.LIB, DX???.LIB, whatever)....
added on the 2004-04-07 15:27:16 by raer raer
Hey, thanks for your response...

but as a matter of fact i created quite some windows intros already for windows (ptct, westside twiddly and eastside works) so i am familiar with that issue. The only problem is that the same settings don't work for me with the vc7 compiler. But i will try to tweak some compiler settings, although i hate doing that ;)
obey the bei !
Why do you want to switch to VC7 for introcoding anyway?
added on the 2004-04-07 16:38:58 by eye eye
Because i like the editor, etc, and i am used to it now. But maybe you are right that i shouldnt do that. I was just checking if somebody had positive experience with it and know some trick or so.
You can even develop in VS.NET and compile your final (and/or intermediates) with OpenWatcom. C++ feature set of Watcom is mediocre, but it's not much different from VC6 and irrelevant for an intro anyway. And it's very easy to get rid of the standard lib, and the lib source is distributed with it.

IDE in OpenWatcom is only for selecting and compiling files. It is delivered with an editor, but you can set up that it works with every other editor well where you can supply the file and line through command line. I have set it up for SciTE.

Does anyone have experience whether OW or MSVC generate smaller code?
added on the 2004-04-07 16:56:16 by eye eye
go rob go
added on the 2004-04-07 19:44:01 by psenough psenough
3 times bigger is pretty big. When we moved our 4K intros from VS6 to VS.net, we found that the size went up by about 60 bytes because of the new linker. After some digging, we found that LINK was doing some weird page alignment things that it didn't do by default. We just needed to throw some switches to get the size back to normal (/OPT:NOWIN98 in our particular case.).

I don't know what is making your size go up so much, but there is probably some new switch or default setting in VS.net that you don't know about. I can't really help you here, since I don't know your code. All I can say is good luck.
added on the 2004-04-07 21:27:38 by s_tec s_tec
eye/midiclub: Yeah I'm sorry but the OpenWatcom compiler sucks ass compared to the VS one, so I don't think that's a particularly good idea.

*However* if you're on no-budget it's probably pretty decent.
added on the 2004-04-07 22:25:27 by sagacity sagacity
"CFXWEB and also in Hugi (The coding issue). Something about "Doing 64k intros with Visual Studio".

does anyone have the source code for these, they were on ukscene.org.
added on the 2004-04-07 22:40:01 by jippie jippie
Sagacity: You don't tell me nothing. OpenWatcom is getting better very rapidly from the compatibility standpoint, and it's arguably better than VC6. And i actually have free licenses from the campus for VS98 and VS.NET2003, but i really refuse to install such irrationally huge beasts. I'd even gladly pay for the DigitalMars compiler, which is nearly as standard compatible as VC7 and GCC, and is generally a good choice just not for intros.

I'd rather write a usable IDE myself (or i don't need one), but i'm mainly conserned with a technical question right now how good is the size optimisation that Watcom offers.
added on the 2004-04-08 01:41:40 by eye eye
"I know exactly what .NET is, i am working with it for 2 years now for my work.

I converted my project indeed to a solution, but the development environment can still create non .net libraries and executables, and that is exactly what it does.. Still thank you for thinking i am that stupid :S"

Well, that answer was indeed quite stupid.. I mean, sure, the development tool Visual Studio.NET has as "biggest new feutures" the .NET support, but saying you converted your stuff to .NET because Visual Studio.NET would allow you to, is still plain wrong.

--

Oh, and OpenWatcom doesnt have ANY templates, sure, you might not wanna use to many templates in an intro.. But sometimes you life depend on them ;-)

--

Anyways, i think the easiest sollution is to just compile the final with vc6, luckily vc6 isnt any big shit so it doesnt really hurt to have it lying around :-)
added on the 2004-04-08 02:09:11 by Hatikvah Hatikvah
if OpenWatcom is arguably better than VC6 then i'd like to hear some arguments. Please enlighten me!
added on the 2004-04-08 03:12:58 by obi1 obi1
btw i would be really interested about any reports considering intels compiler. anyone got his hands on it and can tell something about it. only thing i know for sure is that its really fast, even on amd systems
added on the 2004-04-08 03:37:30 by ttl ttl
There's also the Digital mars C++ compiler which is not bad (free). PellesC (free) is interesting too (based on lcc). Lcc32 (free also based on lcc) and of course Gcc (free). Open watcom is derivated from the old watcom C which was good in it's time.
The very best, imho, is the intel's one (not free) especially the optimization side is light years ahead, it produces smaller executables than vc and is integrated directly into visual studio (i don't know if it can be integrated with vc7 but if it does then this may be a solution to use that interface wihile keeping descents filesizes).
added on the 2004-04-08 04:10:13 by hitchhikr hitchhikr
rob, i have made 2 4kb intros with the VS.NET-environment, so perhaps you should be able to tweak a 64kb out of it? :-)
arneweisse: BITE YOUR ASS! STLport has worked with Watcom 11 and it still works with OpenWatcom!
added on the 2004-04-08 14:00:25 by eye eye
so saying that it doesn't support ANY templates is wrong, you just cannot rely on them too well - but not really worse than with VC6.
added on the 2004-04-08 14:01:24 by eye eye

login