LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-18-2003, 01:07 PM   #1
xconspirisist
Member
 
Registered: Dec 2002
Location: United Kingdom
Distribution: Ubuntu
Posts: 276

Rep: Reputation: 30
Ide's and open source c++


hey there, I want to get into programming c++ in linux. Can anyone recomend a decent ide, ( not emacs.. erw ), something like MSVC would be brilliant, I love the fileview, workspace enviroment.

I primarily learn from staring at other peoples code - can you recomend a decent site where I can get this sort of code ? www.pscode.com was wicked, but at lot of code has loopholes, and is for MSVC only.

Thanks.
 
Old 11-18-2003, 01:17 PM   #2
LogicG8
Member
 
Registered: Jun 2003
Location: Long Island, NY
Distribution: Gentoo Unstable (what a misnomer)
Posts: 380

Rep: Reputation: 30
kdevelop
anjuta
codewarrior (not free)

Any kind of software you are looking for
you can probably find it here and most of
it comes with source code.
www.freshmeat.net
 
Old 11-19-2003, 01:48 AM   #3
xconspirisist
Member
 
Registered: Dec 2002
Location: United Kingdom
Distribution: Ubuntu
Posts: 276

Original Poster
Rep: Reputation: 30
im using anjuta now - its absolutly AMASING !! far better than MSVC.. but thats sort of default, though

However, when I compile, I get an error whenever I use

PHP Code:
#include <iosteam.h> 
It says the file is out of date, or something, should I use a different header file ?
 
Old 11-19-2003, 02:02 AM   #4
MartinN
Member
 
Registered: Nov 2003
Location: Ronneby, Sweden
Posts: 555

Rep: Reputation: 30
That should be iostream.h

And, yes, it is deprecated. You should get used to using
Code:
#include <iostream>
(no .h).

It is similar to the old file, except that it uses the namespace std.

Regards
Martin
 
Old 11-19-2003, 04:00 AM   #5
moeminhtun
Member
 
Registered: Dec 2002
Location: Singapore
Distribution: Fedora Core 6
Posts: 647

Rep: Reputation: 30
C++BuilderX.
It's available for all platforms, Windows, Linux and solaris. That means you only have to learn how to use IDE once for all platforms. And it includes GNU GCC compilers and borland C++ compilers. You can choose any compiler you like to compile your code.


Check out at

http://www.borland.com

I think the personal edition is free.

Last edited by moeminhtun; 11-19-2003 at 04:08 AM.
 
Old 11-19-2003, 03:31 PM   #6
estiedi
LQ Newbie
 
Registered: Oct 2003
Location: Luxemburg
Distribution: Suse; debian
Posts: 23

Rep: Reputation: 15
I evaluated Borland C++ Builder 6 once, while working for a software company that wanted to switch from Powerbuilder7(which is a piece of crap) to some other programming environment. The platform they used was Windows2000. I can only discourage people from using it. It's a buggy piece of crap based on Pascal (Delphi) libraries. It looks nice, but as soon as you try to do something seriously, you get exceptions all over your poor body or it simply crashes.
I don't understand why people want to use C++ to make GUI applications anyway? It's much easier to use some interpreted language or a 4GL for that and build the application's engine in C++.
if (programming for Windows)
use Microsoft's .NET stuff && plan a couple of years to learn the framework);
elseif (programming for multiple platforms)
use java || Delphi/Kylix (never used that one myself) || perl ...;
else
use g++, Qt, GTK2,....;

This is of course IMHO only.
 
Old 11-20-2003, 01:10 AM   #7
tauseef
LQ Newbie
 
Registered: Nov 2003
Location: Pakistan
Distribution: Mandrake
Posts: 15

Rep: Reputation: 0
Well C++BuilderX is not CBuilder 6.
Borland has finally realised the problem with CBuilder 6.
C++BuilderX is a brand new product that as got nothing to do with delphi.
It is using WXWindows as underlying toolkit. But it is very expensive.

But I wonder why does anyone want to moveonto anything if they have KDevelop ?. It is very capable and free and almost standard on all distros (That include KDE) and includes almost VC-like interface.
 
Old 11-20-2003, 01:23 AM   #8
moeminhtun
Member
 
Registered: Dec 2002
Location: Singapore
Distribution: Fedora Core 6
Posts: 647

Rep: Reputation: 30
Because KDevelop can use only in Linux.

Today, the computing is already changed.
Today computing is all about openness, open-standard and platform independence unlike 10 years ago.

Last edited by moeminhtun; 11-20-2003 at 01:53 AM.
 
Old 11-21-2003, 08:42 AM   #9
mbabuskov
Member
 
Registered: Nov 2003
Location: Subotica
Distribution: Slackware, Knoppix, Mandriva
Posts: 42

Rep: Reputation: 15
Re: Ide's and open source c++

Quote:
Originally posted by technowax
hey there, I want to get into programming c++ in linux. Can anyone recomend a decent ide, ( not emacs.. erw ), something like MSVC would be brilliant, I love the fileview, workspace enviroment.

Thanks.
I use wxWindows library, wxGlade to develop the GUI, SciTE to edit the code and g++ as compiler. It works just great.

Also, if you don't care about being cross-platform, Glade + GTK is a very good option.
 
Old 11-21-2003, 05:34 PM   #10
xconspirisist
Member
 
Registered: Dec 2002
Location: United Kingdom
Distribution: Ubuntu
Posts: 276

Original Poster
Rep: Reputation: 30
Thanks for the help, about the iostream.

Why the hell did they change it to not include .h ??! I cant see any gain from that at all....
 
Old 11-21-2003, 07:22 PM   #11
Skyline
Senior Member
 
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104

Rep: Reputation: 45
Something to do with complying with the new ANSI C++ standard - you can still include the old C header files by preceding with a c - ie stdio.h becomes cstdio.
 
Old 11-22-2003, 04:43 AM   #12
xconspirisist
Member
 
Registered: Dec 2002
Location: United Kingdom
Distribution: Ubuntu
Posts: 276

Original Poster
Rep: Reputation: 30
/* Created by Anjuta version 1.1.98 */
/* This file will not be overwritten */

#include <iostream.h>
int main()

{
cout << "Hello world\n";
return (0);
}


^^ using that code - if I remove the .h, it says cout is undeclared. If I keep the .h, it says the file has been depreciated... !
 
Old 11-22-2003, 10:34 AM   #13
Skyline
Senior Member
 
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104

Rep: Reputation: 45
Smile

As Martin mentioned, with # include <iostream> etc , you'll need to use namespace std as in the code below:

Code:
# include <iostream> 
# include <string>

using namespace std;

int main()

{

char name [75];

cout << endl;
cout << "Hello LQ member!" << endl;
cout << endl;

cout << "Please type in your Username, and then press enter:" << endl;
cin.getline(name, 75, '\n');

cout << endl;
cout << "Hi " << name << " - hope you enjoy your time at LQ." << endl;
cout << endl;

return 0;

}

Last edited by Skyline; 11-22-2003 at 10:35 AM.
 
Old 11-22-2003, 02:01 PM   #14
xconspirisist
Member
 
Registered: Dec 2002
Location: United Kingdom
Distribution: Ubuntu
Posts: 276

Original Poster
Rep: Reputation: 30
ahh right, im a coding newbie thanks.
 
Old 11-23-2003, 03:08 AM   #15
MartinN
Member
 
Registered: Nov 2003
Location: Ronneby, Sweden
Posts: 555

Rep: Reputation: 30
Hi again. Sorry, I've been out of town for a couple of days. The code from Skyline works, but I would like to point out two different solutions that don't open the namespace wide open.

Solution 1:
Code:
#include <iostream>

using std::cout;
using std::endl;

int main(void)
{


  cout << "Hello world" << endl;

  return 0;

} //int main(...
Solution 2:
Code:
#include <iostream>

int main(void)
{


  std::cout << "Hello world" << std::endl;

  return 0;

} //int main(...
The purpose of a namespace is to avoid name clashes in big projects. I suggest reading the chapter on namespaces in your C++ textbook.

If you have no C++ textbook, I would suggest that you get a copy of C++ Primer (Lippman / Lajoie) and not The C++ Programming Language (Stroustrup). Anyone who has (tried to) read a Stroustrup textbook can tell you why.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
IDE's TranceDude Linux - Software 2 08-12-2005 01:36 PM
RAID. Just for the extra ide's Zarneth Linux - Hardware 1 07-24-2005 06:45 AM
Weird keyboard error in Java IDE's larstj Linux - Software 1 03-16-2004 12:56 PM
Linux IDE's nny0000 Programming 8 01-14-2004 01:53 AM
Java IDE's? unholy Programming 3 11-02-2003 07:18 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration