I,ve installed the Compiler and I can,t get even the simplest code to compile properely.
Anyone know where the fix for this bug is?
Or is it a limit of the demonstration version?
void main(void) { cout << "Hello world!"; }
what is it the compileer you installled?
keil c????
if you be answer keil c then code you give is bad and not compiler
you code is c++ but compile is c
c not thinking about cout like this you be not good and give errror
Can someone answer my question in English please!
Keil C51 is an ANSI 'C' compiler - it is not a C++ compiler, and does not claim to be one.
http://www.keil.com/c51/c51.asp
Your code is C++ and, therefore, will not compile with Keil C51.
This is not a bug - this is perfectly correct behaviour!
So, if I pay for the compiler I will be able to compile this simple program.
Why is the demonstration version so limited? It looks very weak! Microsofts free compiler can do so much more!
I can,t afford to pay for the full version! So can you recommend to me a good cheap compiler that can do this simple job?
No. Your program is written in C++. The Keil C51 is a C compiler. It will compile programs written in C, but not programs written in C++, Pascal, Fortran, Oberon, Smalltalk, or any other programming language that is not C.
Why is the demonstration version so limited?
The limits of the evaluation verison have nothing to do with the "problem" you have encountered.
Microsofts free compiler can do so much more!
Microsofts compilers cannot produce output that will run on an 8051. If you need your programs to run on an 8051, you will need to use something other than a Microsoft compiler.
So can you recommend to me a good cheap compiler that can do this simple job?
A free/cheap C++ compiler for the '51 ? Sorry. There is a C++ compiler, but it's not cheap or free. There are free compilers, but they do C, not C++.
How about you switch to programming in C instead of C++ ? Then you will have plenty of options. Maybe the evaluation version of Keil will actually suffice for what you are trying to do.
Someone give a more positive (and helpful) response please!
I know how to write code using cout and expect my compiler to do it. Why so difficult to get a simple answer?
you looking very rude and not good!!!!!
why you not be listening??
code with cout using c++ not c
keil is goodc c compiller and good for profesional 8051 programers
if ypou needing c++ for 8051 you specnd big money you think!!!!
looking at
www.ceibo.com/.../c prices.pdf
So, essentially you're asking "Please tell me what I want to hear." ?
All the information you need is already in this thread.
I know how to write code using cout and expect my compiler to do it.
If you use cout, then you are writing code in C++. "Your compiler", therefore, needs to be a C++ compiler. The Keil C51 is not a C++ compiler.
In simple terms, you're trying to pound a nail with a screwdriver. You are using the wrong tool for the job at hand.
Why so difficult to get a simple answer?
The simple answer is already in this thread. The problem is that you did not read, understand or believe it.
It looks pretty helpful to me... You want a C++ compiler but the Keil compiler isn't.
I believe your questions have been answered.
Are you aware that you are posting on an embedded toolset forum?
If you're simply looking for free stuff on a PC then check out the GNU compiler. http://gcc.gnu.org/ They also have their own forums for support.
-- Joost
I've found one at Ceibo :)
Even better is that they have a demo version.
www.ceibo.com/.../8051cpp.zip
I,ll give it a try and see if it does better than the limited Keil package.
I'm sorry to tell you this, but the Ceibo C++ compiler uses the Keil compiler. Any limits that the evaluation version of the C51 compiler has (regarding code size, memory map restrictions, etc) will thus be inherited by the "free demo" of the Ceibo compiler.
And since the evaluation version of C51 is limited to 4 kB code size, you will most likely run into problems when you use "powerful" (also known as "bloated") string output functions like cout or printf().
Are you aware that the Keil compiler will not produce any output that will run on a PC ? It is a compiler for 8051-based microcontrollers.
I like C++ for embedded work. I do not like to use the C++ libraries, because of their size.
Trying to use C++ to write code for a demo compiler with a 4kB limit is quite amusing. I whish you great luck. You will be very happy with your choice...
If your goal was to write programs for a PC, then good luck.
If you where really planning on writing programs for '51-chips, then I think it is time you try to read up on the processor architecture. Don't talk about limited compiler until you have figured out exactly how limited the processor is, when it comes to running high-level languages.
It's a bit interesting that whenever someone gives you an answer you don't like, you are rude towards them. Basically, you are the kind of guy would google for information. If the first 10 (or 100) links says something you don't like, you continue scanning links until someone gives the "correct" answer. Even the 100th link is at the 100th place because the contents of the document is wrong...
Why have a demo version that won,t compile my simple program?
Anyone got any other suggestions (please limit to ones that are both helpful and in English)?
Why have a demo of a C compiler that doesn't compile Ada?
Why have a demo of a C compiler that doesn't compile Pascal?
Why have a demo of a C compiler that doesn't compile Cobol?
Don't you still get it. C and C++ are two completely different programming languages. You may test any C compiler in the world. It doesn't matter. A C compiler just can not compile C++ programs. I say it once more: A C COMPILER IS COMPLETELY UTTERLESSY IMPOSSIBLY UNABLE TO COMPILE A C++ PROGRAM, SINCE C++ IS A COMPLETELY DIFFERENT LANGUAGE!!!
What does it take for you to realize that you are trying the wrong programming language?
Would it help if I say it in Swedish? En C-kompilator kan inte kompilera C++-program!
Other people on this forum might be able to help with other languages, since it seems obvious that you can't parse English...