Compiler-Latest (W7-8)?

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

Hi guys, I'm going to have another run at programing. I need some updated adevice/info. I'm looking for info on the latest compiler, both free and paid. I tried Bloodshed on W8x64, but got errors. So, what's new?

What about getting work as programmer in a non music software environment? How much more then then basic do I need to know?
Do I need year of experience?
Thanks for any info :)

Post

Have you checked out the Visual Studio Community?

http://www.visualstudio.com/en-us/produ ... rs-vs.aspx

Works wonders IMO.

Post

Mayae wrote:Have you checked out the Visual Studio Community?

<span class="skimlinks-unlinked">http:/ ... spx</span>

Works wonders IMO.
Thanks, Mayae! I've not looked at that since about 09'

Post

Here is my "First Program" :P its just a window with text. 464 KB (475,166 bytes). Simple to delete Double click to run.
http://abstractcats.org/AC%20First%20Run.exe
Last edited by abstractcats on Thu Dec 18, 2014 11:50 pm, edited 1 time in total.

Post

500kb?

Post

camsr wrote:500kb?
Sorry :oops: 464 KB (475,166 bytes)

Post

You should static link, much smaller small files

Post

camsr wrote:You should static link, much smaller small files
Cool. Not sure how to, static link, I'm afraid :oops: Probably should know, though. :oops:
Thanks.

Post

camsr wrote:You should static link, much smaller small files
You should normally observe the exact opposite, considering the code from the library needs to be included in the executable with static linking. One of the reasons dynamic linking was invented in the first place was to avoid duplicating the code in every binary, to keep them smaller.

Linking the compiler runtime statically might make sense for other reasons (notably save the user from having to install it separately; one can do this from properties -> c/c++ -> code generation -> runtime library -> change Multi-Threaded DLL to Multi-Threaded ), but it normally doesn't make your binaries any smaller, rather the opposite.

To see the difference I just built a random project of mine (simple text editor + a custom UI toolkit + freetype + two ttf fonts as resources) with regular dynamic linking in MSVC2013 community and XP toolchain, against DLL runtime (release) and I get a binary of 325kB where as linking the CRT statically gives a binary of 424kB. So about 100kB lost in this case (it could be less or more, depending on how much from the library is actually needed). This is an optimized release build; the debug build for the same thing is 851kB (with dynamically linked debug runtime, but I'm not sure if statically linking debug runtimes ever makes any sense).

That said, unless you need to make your binaries as small as possible for some specific reason (eg. you are trying to produce a size-limited intro for a demo-party or something; if you are doing this then every single thing in your binary must be designed with size as the first, second and third priority) I really wouldn't worry about it too much.

Post

mystran wrote:
That said, unless you need to make your binaries as small as possible for some specific reason (eg. you are trying to produce a size-limited intro for a demo-party or something; if you are doing this then every single thing in your binary must be designed with size as the first, second and third priority) I really wouldn't worry about it too much.
Yeah, I don't get what camsr's point in mentioning the size even was...? But I make a bet : he will next suggest using some ancient junk version of Visual Studio, like VC6, to get smaller binaries. Or even worse, shit like the Borland Turbo "C++" compiler... :hihi:

Post

IDK maybe I was thinking of a different option. My "hello worlds" size in at around 40kb, statically linked.

Post

Xenakios wrote:
mystran wrote:
That said, unless you need to make your binaries as small as possible for some specific reason (eg. you are trying to produce a size-limited intro for a demo-party or something; if you are doing this then every single thing in your binary must be designed with size as the first, second and third priority) I really wouldn't worry about it too much.
Yeah, I don't get what camsr's point in mentioning the size even was...? But I make a bet : he will next suggest using some ancient junk version of Visual Studio, like VC6, to get smaller binaries. Or even worse, shit like the Borland Turbo "C++" compiler... :hihi:
GCC 2.95.3 forever!

edit: On a more serious note though, if you tell modern MSVC to optimize for size, it DOES produce significantly smaller code (which potentially compresses better with an executable packer as well; if you disassemble the result it looks very different from what the compiler usually does and somewhat more regular) but the resulting code will also be significantly slower.

edit2: if you are actually trying to seriously optimize for size, then the MSVC "optimize for size" mode will still drive you nuts with some of the silly things it does, like inlining constant addresses where keeping it in a register would take less bytes, or wasting bytes on pointless frame-pointers where unnecessary.. but it's still a huge contrast with the usual "just make it fast" which happily duplicates the same code dozen times just to squeeze out a couple of cycles :)
Last edited by mystran on Fri Dec 19, 2014 6:44 am, edited 2 times in total.

Post

Xenakios wrote: Yeah, I don't get what camsr's point in mentioning the size even was...? But I make a bet : he will next suggest using some ancient junk version of Visual Studio, like VC6, to get smaller binaries. Or even worse, shit like the Borland Turbo "C++" compiler... :hihi:
No way, those can't even compile x64 :)

Post

camsr wrote:
Xenakios wrote: Yeah, I don't get what camsr's point in mentioning the size even was...? But I make a bet : he will next suggest using some ancient junk version of Visual Studio, like VC6, to get smaller binaries. Or even worse, shit like the Borland Turbo "C++" compiler... :hihi:
No way, those can't even compile x64 :)
Oh come on, x64 code is like 2 times size of x86 to begin with, how can you live with that?! :hihi:

Post

Thanks for the input, guys! I wrote the program on my W7x64 machine and then downloaded it to my W8x64 machine and I can confirm it works as expected :) YAY! Now to learn the rest! Many hours and days and weeks to go! I wrote it in the last version of Bloodshed. I believe I was doing it wrong, when I tried first on my W8 machine, I'll try that again, tomorrow. Oh, if you guys can point me to any new tutorials for C++ and DSP, that would be great :)

Post Reply

Return to “DSP and Plugin Development”