Justin
02-24-1999, 12:49 PM
... for MS DOS. I already downloaded DJGPP and it doesn't work. It gives me screensful of errors on a .c file that I have a compiled version of - I'm guessing it just doesn't support what I need it to.
Basically, I've always heard that for Windows programming, you should write all your DLL's in C and the rest in VB (or Visual Something) - the C DLL's will run many times faster. This is important for a certain project that I am building. But to start, I need to get C mastered and thus need a compiler.
Oh, preferably free http://www.aota.net/ubb/smile.gif If there are no good free ones, then cheap http://www.aota.net/ubb/smile.gif Also, does anyone know of a good tutorial on C / C++? And which one would I need to build (eventually) a Win32 DLL?
Any help would be greatly appreciated.
------------------
Justin Nelson, SFE Inc.
http://www.vdj.net
meikel
02-25-1999, 07:13 PM
Hi Justin,
many questions:
a) C for DOS
Try to get hands on a cheap CD containing old commercial DOS C compilers. I bought one for $20 that contained
Old Turbo C (borland)
Old Turbo Assembler (borland)
Old QuickBasic
Old Turbo Pascal (borland)
and many more.
Lots of info and stuff to look at. I'm not using it, but I know that I'm going to need it somewhen. So I took that CD with me when I saw it. Maybe it's placed somewhere in a store in the "bargain" area where you have to search thousands of old and outdated CDs.
b) C++ & VB
Since Visual Basic 5, this Basic compiles real executable code. It executes much faster. It's still not as fast as C code in many occasions, but it's not necessary to write a C++ DLL for many many projects.
b2) Ever took a look at Delphi?
Nobody ever suggested that this needs an additionl C compiler http://www.aota.net/ubb/smile.gif
c) C++ DLLs for Win32
Hmmm. Do you really need this?
If so, you need a compiler that can do this
* Any modern 32-bit C++ compiler
* Delphi (did I mention this already???)
I don't know of a cheap DLL compiler for Win32. Maybe you can grab a bargain price on some older C++ compilers (not as much bargain as in case a) but still a good deal).
For every C++ Compiler there is a "nearly-no-features" edition that's very cheap ($100-$200).
Meikel
Justin
02-25-1999, 07:39 PM
I know that usually the extra speed achieved in compiling a C++ DLL isn't necessary, but my program plays multiple mp3's at once, so it needs very fast decoding. Currently, I can only play 3 at a time without lagging on my 233, and people using a 150 or 166 have trouble playing 2 (for crossfading). So a little more speed would be awesome in this case, no matter how small an increase.
I eventually need a compiler capable of making a Win32 DLL, and I know that'll cost me, especially if I want MMX support, but I need only a simple compiler to learn with for now. Once I feel comfortable with the language, I will then spend the money on MS VC++ (wishing I'd just gotten the whole Visual Studio now).
Besides that, it's always good to know other languages. My program might function better as a C++ app anyway, seeing that most high end audio apps are C++.
I've thought about Delphi, which I learned today used to be Pascal (if I read right). I've never seen Delphi (or pascal) code or even read much about it yet, but I hear it's decent. But I can write much faster in VB.
All I really need to do ultimately is write a DLL to decode mp3 to wave or raw PCM. In VB this would be a nightmare of math, and VB isn't known for it's speed in math, where C is. I really want to write it myself from some C source I have now, rather than finding a third party DLL or OCX to do it. Just a matter of preference, and a need to learn.
So right now, with a DOS compiler, I can compile the source I have, play with it, change it, etc, until I figure out exactly what's going on. Even if I end up doing it in VB, i still need to crack the algorithm. For some reason the MPEG group will not publically release the algorithm anymore - I just happened upon this sample app from '91 before they realized that they could make a ton of cash with it.
It's fully legal to use, they just don't like to make it easier than necessary. And it's a matter of perceptual coding, so it's not a simple zip compression routine - it's a few hundred k of math.
Thanks for the advice. I don't find these old CD's around anywhere. I am hoping to find one on the web (never type the word 'free' in a search engine!).
BTW, VB still doesn't 'compile', technically, it is still interpreted at run time, hence the runtime DLL's. If you open a VB exe in a hex editor, you will find all of your control names, properties, etc, along with any literal strings, all right there in plain text. It's still faster than before, but not fast enough. And VB6 is VB5 plus stupid web stuff and database stuff, things I never use. Waste of money to upgrade (I'll never learn). And most of the bug fixes actually break old code.
Thanks for the advice. Oh, is there a demo version of Delphi? http://www.aota.net/ubb/smile.gif I always want to learn something new...
------------------
Justin Nelson, SFE Inc.
http://www.vdj.net
vBulletin® v3.6.8, Copyright ©2000-2009, Jelsoft Enterprises Ltd.