-
-
- I found out why the Borland compiler I have is having its problems: it’s an educational version; a couple of the (commonly used) commands don’t work, —but it does allow making freestanding executables.(?-not sure I follow that reasoning, but there it is-) The header files sizes of different brands of compilers vary widely; apparently one cannot remove the offending header file and replace it with any other by the same name. !nuts!
-
- Does anybody know of a C/C++ compiler that includes all the regular/typical functions and commands, AND that allows making freestanding executables (programs which will run on computers that do not have that company’s compiler installed)? The big companies sell multi-thousand dollar compilers; I can only suppose that’s what they’re for, but the product info rarely says and I don’t got them kinda dollerz. - I see that a lot of companies get Harvard-grad shifty when you start asking exactly what their products do. - MC
Sorry if I’m missing the point, but what about GCC? It’s been about 4 years since written anything in C (all Java now :)) but last I remember, it was a great, free compiler.
Or are you looking for another IDE?
I’ve never seen a C++ compiler that didn’t compile to native code. What commands exactly is the Borland educational version missing? Usually, educational versions are missing high-power features like enterprise database connectivity functions, but are otherwise functional.
If you’re a student, you may be able to get some excellent educational pricing on Microsoft C++, or even NFR pricing, which is dirt cheap.
Above recommendation for GCC seconded. It’s a great compiler, it runs on pretty much anything, and it’s free.
–
peas on earth
-
-
- With the Borland compiler, I found out myself that it doesn’t let you enter float values as numbers. I am informed that there are a few other issues like this too: the instructional guide conveniently “skips” these problems, by not saying anything about the command at all. Example: the written tutorial uses {cout >>} but never says anything about {cin <<}, because with that compiler, it don’t work. The compiler and book were packaged in a “Teach Yourself C in 24 Hours” kit. Someone from another board wrote and said there are a couple other problems I’ll find down the line; not insurmountable, but annoying. The copyright date is '95, ver. is 4.52. What version are they on now?
-
- I seem to recall that there is a .dll file needed to make standalone MS Vis Basic programs; I have heard the same of MS Vis C++ Professional (which I can get for half retail), but I heard that the .dll isn’t easily extractable from the install or source CD; that’s the difference between the “Professional” package ($200 retail) and the “Enterprise” package ($2000 retail). - MC
Programs built using Microsoft’s Visual Basic do indeed need a DLL to run (MSVBVM50.DLL for programs built with VB 5, MSVBVM60.DLL for programs built with VB 6.) These DLLs are supplied as part of the VB package, and are freely distributable (IE, you’re free to distribute the DLL along with your executable).
Note that if your program is using some of the extra controls supported by VB (such as its Winsock control) you’ll also need to include other DLLS and/or OCXs (MSWINSCK.OCX in the above case), also designated by Microsoft as freely distributable.
Programs built with Microsoft’s C++ compilers may also require DLLs (such as MFC40.DLL) to run, also designated by Microsoft as freely distributable, and provided with all flavors of that compiler. The difference between the various flavors (and costs) of their C++ packages have to do with other capabilities. (The Enterprise edition, for example, includes a Source Control System package that helps a group of programmers working on the same project to keep their code in synch.) In your case, the cheapest C++ package Microsoft sells should do just fine.
Lots of folks don’t realize that these DLs are required because it’s pretty common theses days for their customers’ PCs to have those DLLS already installed because of other applications.
Note also that it is completely possible to create executables with MSC++ that don’t require other dll’s to run. I do it all the time. But, if you’re looking for something with a nice GUI, you’re going to link to the MFC dll’s. As the above post stated, you’re free to distribute these with your executable, so it’s usually not a problem.
-
-
- I don’t know enough to know what I know. I only know when it don’t work.
-
-
-
- I likely need as much help as I can afford. I seem to recall way back (long before I started taking classes) that - uh, there was some way that MicroBill (and others) could detect from the .exe if you compiled a program with their compiler. The presumption was that, if you bought the regular bargain-priced compiler, you weren’t supposed to use it for commercial production unless you had a license from whoever wrote the compiler, to do so. That was the reason that certain parts were (supposedly) intentionally missing. - MC
-
Nope. You’re hearing a lot of urban legends or something. As someone else said, the only difference between the various flavors of compiler are the tools and support applications they come with. The ‘learning’ edition doesn’t have the database connectivity that the Professional Edition has, and the Enterprise edition has a bunch of stuff for doing things like debugging stored procedures in SQL Server and such.
-
-
- Well, it did it again.
-
-
-
- I typed in a few of the book examples of functions, and couldn’t get anything to run without errors. This time is is returning a value from the function; the code will run but I can’t seem to get anything to return any way I try, or at least, any way the textbook shows, which is the way I’m supposed to be doing it. -But I got paid today - more than enough to get VC++, and I don’t have time trying to get something unfamiliar to work; Microsoft wins again by default. Nevermind. - MC
-
-
-
- One last whippin’ for this old nag , , ,
-
-
-
- I bought MS Vis C++. Everything (8 different example programs) that wouldn’t work on the Sam’s “Teach Yourself C in 24 Hours”/Borland compiler, worked perfectly on the MS VisC++ compiler. The Borland runs the accompanying book examples fine, but doesn’t seem to do lots of other important things. Be warned . . . - MC
-
I haven’t seen your code, but I can pretty much assure you that if you can’t get a value returned from a function, then you’re doing something wrong. There are pretty much no commercial C compilers that broken. I don’t use that compiler myself, but people build commercial software with it, which would be impossible if the compiler was unable to return values from functions.
–
peas on earth
-
-
- I shoulda explained better; I can’t get a function to return a float value.
-
-
-
- Also, as I said, this isn’t a regular (retail) compiler; it’s been jacked (i.e., “jacked” like when thieves jack up a car so they can steal the wheels, and leave you with a car of limited usefulness). The examples in the accompanying book will work but lots of other things don’t. I didn’t mean to imply that none of Borland’s compilers work. - MC
-
It’s starting to make sense - you’ve got a compiler that can only handle integers, or you forgot to link the math library when you compiled your programs. Also, you need to include “math.h” (or the Borland equivalent) in your declarations. If the compiler is advertised as being able to handle floating point numbers, then your problem is almost certainly that you don’t have the floating point libraries linked when you compile (although that should have generated warnings or errors at compile time).
The other possibility is that you aren’t declaring your functions properly. C will happily let you do things like declare a value to be an integer, then try to assign a floating point value to it. The compiler will just grab the first two bytes pointed at by your other variable and go merrily on its way with the wrong answer, unless you have prototyped your code properly, in which case you’ll get a compiler error or warning when you try to compile your code.
-
-
- It don’ motta, but here’s one example that won’t work:
-
#include <stdio.h>
#include <float.h>
#include <math.h>
void main()
{
float a = 0;
cout << "Enter a number: ";
cin >> a;
cout << "The number is: " << a << endl;
}
-
- I couldn’t detirmine what float.h was good for. The reference library refers to something about it beeing needed for “advanced” math functions, which math.h contains. If I key in a decimal number into this program I get a runtime Floating Point “float overflow” error. I can assign a float to var ‘a’ and print it out, but it won’t accept one entered. --MS VisC++ runs this correctly with just the stdio.h header. - MC
-
-
- well nuts, my headers left. Shoulda been:
stdio.h
float.h
math.h
- well nuts, my headers left. Shoulda been:
-
-
-
- MC
-
Next thing to check would be your link options to make sure the math library is being linked.