Compiling and running programs in Lucid Puppy 2.5.2
I have downloaded devx and configured it with puppy and it works well. But i cannot compile and run c++ programs. I used the g++, but it always shows sum error even if everything is correct. I think that the libraries for c++ are old and so i am downloading latest release of gcc. Will it help me compiling and running c++ programs? If no, then how do i do it? And how do i add other programming languages in my puppy, like latest ver of python, ruby and some other languages?
|
Quote:
Quote:
If you mean you're using 5.2.5, have you looked at LucidPuppyUpdate?? You can update things online. http://puppylinux.org/wikka/LucidPuppyUpdate |
Sorry, i am actually using puppy 5.2.5. Given below a program i tried to compile using g++
#include<iostream.h> void main() { cout<<"hello"; } there might be errors in the above program but the one i tried to compile was 100% correct. When i compiled it, it gave errors. 1 related to the main(), 1 related to cout. I cannot tell what were the actual errors because i am posting this reply via cell phone. What can be the problem? |
Well, without the output it's hard to say. But you're doing at least three things which are weird.
1. You should say iostream, not iostream.h. 2. The main signature usually returns int. 3. You need to specify a scope for cout. Code:
#include <iostream> |
Quote:
|
I did not use the conventions you posted earlier, i used the traditional iostream.h and void main(). I think that must be the problem. Is it the Linux convention that main should return int and the header file should be iostream and not iostream.h?
|
No, this is standard C++ conventions:
http://www.cplusplus.com/doc/tutoria...ram_structure/ Code:
// my first program in C++ Code:
#include <iostream> Code:
#include <iostream> |
All times are GMT -5. The time now is 12:18 PM. |