4k and VC++ 2005
category: code [glöplog]
Why most of the projects related with the demoscene is under VC++ 2005?
I was reading some 1k/4k's source code and they are using VC++ 2005... Is it something about the executable size?
Why not using more recent versions of the VC++?
Sorry if it sounded like a stupid question. I'm just trying to understand the workflow of a 4k prod. And, by the way, if you have some article about it, it would be very helpful.
Thanks in advance
I was reading some 1k/4k's source code and they are using VC++ 2005... Is it something about the executable size?
Why not using more recent versions of the VC++?
Sorry if it sounded like a stupid question. I'm just trying to understand the workflow of a 4k prod. And, by the way, if you have some article about it, it would be very helpful.
Thanks in advance
Probably just because people are lazy when it comes to upgrading.
Isn't there any existing article about 4k demo workflow?
the work flow of a 4k is pretty straight forward:
1) go here http://www.iquilezles.org/www/material/isystem1k4k/isystem1k4k.htm
2) go here http://4klang.untergrund.net/
3) go here http://www.crinkler.net/
4) code :)
1) go here http://www.iquilezles.org/www/material/isystem1k4k/isystem1k4k.htm
2) go here http://4klang.untergrund.net/
3) go here http://www.crinkler.net/
4) code :)
kusma may be about right :)
there are of course some minor differences between compiler versions but that only makes a few bytes. its more important to have the correct compiler options set when creating a 4k.
speaking of which, the compiler option /QIfist has been deprecated since vs2005. Dont know if its still available in e.g. 2010, but i dont think thats a real reason to stick to 2005 :)
there are of course some minor differences between compiler versions but that only makes a few bytes. its more important to have the correct compiler options set when creating a 4k.
speaking of which, the compiler option /QIfist has been deprecated since vs2005. Dont know if its still available in e.g. 2010, but i dont think thats a real reason to stick to 2005 :)
You'll be fine using a more recent version, just be sure to know (as gopher said) your compiler options and set accordingly.
qifist still gives me warnings when building in the most recent vc++ express - but i think it still works.
random blabla on making 4k
random blabla on making 4k
Ferris: Which compiler options should be set accordingly? Any hints, links?
Thanks
Thanks
Thank you all, it was very welcome. :)
No problem!
VS2010:
Config prop's:
- General
- Project defaults
- Character set: not set (reverts to ASCII)
- Whole program optimization: No whole program optimization
- C/C++
- Optimization:
- Optimization: Minimize size (/01)
- Enable intrinsic functions: Yes (/Oi)
- Favor size of speed: Favor small code (/Os)
- Precompiled headers:
- Precompiled header: Not using precompiled headers (not necessary for size, but these are useless for such small projects and will likely only cause trouble)
- Linker
- Manifest file
- Generate manifest: No (/MANIFEST:NO)
- Debugging
- Generate debug info: No
Should be all you need. Afaik, though, iq's frameworks already have proper options set, so you may not need to worry about these at all :)
VS2010:
Config prop's:
- General
- Project defaults
- Character set: not set (reverts to ASCII)
- Whole program optimization: No whole program optimization
- C/C++
- Optimization:
- Optimization: Minimize size (/01)
- Enable intrinsic functions: Yes (/Oi)
- Favor size of speed: Favor small code (/Os)
- Precompiled headers:
- Precompiled header: Not using precompiled headers (not necessary for size, but these are useless for such small projects and will likely only cause trouble)
- Linker
- Manifest file
- Generate manifest: No (/MANIFEST:NO)
- Debugging
- Generate debug info: No
Should be all you need. Afaik, though, iq's frameworks already have proper options set, so you may not need to worry about these at all :)
apologies, didn't keep the extra spaces I added.
Code:
Config prop's:
- General
- Project defaults
- Character set: not set (reverts to ASCII)
- Whole program optimization: No whole program optimization
- C/C++
- Optimization:
- Optimization: Minimize size (/01)
- Enable intrinsic functions: Yes (/Oi)
- Favor size of speed: Favor small code (/Os)
- Precompiled headers:
- Precompiled header: Not using precompiled headers (not necessary for size, but these are useless for such small projects and will likely only cause trouble)
- Linker
- Manifest file
- Generate manifest: No (/MANIFEST:NO)
- Debugging
- Generate debug info: No
Ah and silly me, forgot the most important one :D
Linker->Input->Ignore all default libraries: Yes (/NODEFAULTLIB)
Linker->Input->Ignore all default libraries: Yes (/NODEFAULTLIB)
Erm...
http://www.iquilezles.org/www/material/isystem1k4k/isystem.zip
The link is broken D:
http://www.iquilezles.org/www/material/isystem1k4k/isystem.zip
The link is broken D:
why yes, yes it is :/
version I have laying around my hd, I hope iq doesn't mind. Keep checking his site though for when it's updated.
- Optimization: Minimize size (/01)
- Enable intrinsic functions: Yes (/Oi)
- Favor size of speed: Favor small code (/Os)
not neccessarily :)
at least i found out in my projects that it makes the compiler produce code which is far less self similar. the uncompressed filesize is reduced a lot, but after compression it ends up bigger than just disabling optimization completely and let crinkler do its magic.
its always a matter of trial and error, this is my recommendation though:
- Optimization: Disabled (/0d)
- Enable intrinsic functions: Yes (/Oi)
- Favor size of speed: Neither
- Enable intrinsic functions: Yes (/Oi)
- Favor size of speed: Favor small code (/Os)
not neccessarily :)
at least i found out in my projects that it makes the compiler produce code which is far less self similar. the uncompressed filesize is reduced a lot, but after compression it ends up bigger than just disabling optimization completely and let crinkler do its magic.
its always a matter of trial and error, this is my recommendation though:
- Optimization: Disabled (/0d)
- Enable intrinsic functions: Yes (/Oi)
- Favor size of speed: Neither
In addition to what gopher said, sometimes enabling size-optimisations on Visual Studio makes Crinkler sad. At those times you have two options:
1. Mentor to the rescue.
2. Good luck getting out of the mumbo jumbo of coding for a specific configuration.
1. Mentor to the rescue.
2. Good luck getting out of the mumbo jumbo of coding for a specific configuration.
And now! Go make a demo about it, or intro :)
All: thank you for hints and clarifications:)
Quote:
- Enable intrinsic functions: Yes (/Oi)
Shouldn't that cause the code size to grow?
this might be helpful as well.
Rare: Nope. The compiler knows very well about the intrinsics. So, in fact it might take into account the necessities of an intrinsic function, it might inline it by directly embedding the assembly instructions that make up the function, or at extreme cases it might even replace the whole thing with a completely insane code snippet you most likely wouldn't think of. Happened before. :)
The point is, the compiler doesn't need to treat an intrinsic like a function from an unknown library. It's not a black box of voodoo and magic. It's something the compiler knows about like the back of its hand… So to speak.
So, in fact, using intrinsics is more likely to drop the size than to inflate it.
The point is, the compiler doesn't need to treat an intrinsic like a function from an unknown library. It's not a black box of voodoo and magic. It's something the compiler knows about like the back of its hand… So to speak.
So, in fact, using intrinsics is more likely to drop the size than to inflate it.
i am eager to see another one coming!
just keep in mind its for fun!
You´ll have some nice-looking visuals and (maybe) fitting audio infront of you, worth to get released, watched and even rated very soon!
( while the rating is obviously done NOT only by coders, so even if you achieve sth in code never done before you wont get what you deserve, as there are many ppl in the scene that dont code and so they vote on other criterias! never let yourself get into a bad mood due to a bad comment...its alright ;) )
AND: we should implement some sort of STICKY for the BBS for sure ;)
( sorry, garg! )
just keep in mind its for fun!
You´ll have some nice-looking visuals and (maybe) fitting audio infront of you, worth to get released, watched and even rated very soon!
( while the rating is obviously done NOT only by coders, so even if you achieve sth in code never done before you wont get what you deserve, as there are many ppl in the scene that dont code and so they vote on other criterias! never let yourself get into a bad mood due to a bad comment...its alright ;) )
AND: we should implement some sort of STICKY for the BBS for sure ;)
( sorry, garg! )
also, talking about intrinsics:
http://www.xyzw.de/c190.html
http://www.xyzw.de/c190.html
Awesome.