Need suggestions for: C++ IDE and threading/GUI libraries.

D

Daniel Pitts

A little background first. I've done a bit of C++ programming in the
past, but then fell in love with the ease of multithreaded and GUI
programming in Java. I've been using Java for a long time now and have
learn quite a bit about OO design, and its application in Java. I'd
like to re-enter the world of C++, but I feel reluctant to give up my
favorite IDE (IntelliJ IDEA) and easy-to-use Swing GUI framework.

I'm not looking to start a flame war, so I'd prefer hearing the merits
of your suggestion, without criticizing other suggestions.

The projects I will be doing initially will be strictly
non-professional, personal projects. In particular, I'd like to be able
to quickly get up and running with single frame.

Actually, my goal is to re-write a simple multi-threaded Ray Tracer of
mine in c++. Yes, yes, I know their are plenty that are already way more
sophisticated than I'll probably ever be able to create... Its an
exercise, nothing more.

I'm comfortable with either a Linux or Windows, although I'd prefer
Windows for now.

So, with all that in mind.
What would be a good IDE to invest time and maybe some (preferably
small amount of) money in?
What GUI framework should I check out? Ease of getting set up is
the primary goal, portability is secondary or lower at the moment.
What should I look into for create a multi-threaded c++ program? I'm
familiar with a lot of concurrency issues, but only specifically to Java.

Thanks in advance for all who feel like suggesting something,
Daniel.
 
I

Ioannis Vranos

Daniel said:
A little background first. I've done a bit of C++ programming in the
past, but then fell in love with the ease of multithreaded and GUI
programming in Java. I've been using Java for a long time now and have
learn quite a bit about OO design, and its application in Java. I'd
like to re-enter the world of C++, but I feel reluctant to give up my
favorite IDE (IntelliJ IDEA) and easy-to-use Swing GUI framework.

I'm not looking to start a flame war, so I'd prefer hearing the merits
of your suggestion, without criticizing other suggestions.

The projects I will be doing initially will be strictly
non-professional, personal projects. In particular, I'd like to be able
to quickly get up and running with single frame.

Actually, my goal is to re-write a simple multi-threaded Ray Tracer of
mine in c++. Yes, yes, I know their are plenty that are already way more
sophisticated than I'll probably ever be able to create... Its an
exercise, nothing more.

I'm comfortable with either a Linux or Windows, although I'd prefer
Windows for now.

So, with all that in mind.
What would be a good IDE to invest time and maybe some (preferably
small amount of) money in?
What GUI framework should I check out? Ease of getting set up is the
primary goal, portability is secondary or lower at the moment.
What should I look into for create a multi-threaded c++ program? I'm
familiar with a lot of concurrency issues, but only specifically to Java.

Thanks in advance for all who feel like suggesting something,
Daniel.


If you prefer Windows-only applications, I suggest you learn about .NET.
Also you can download Visual C++ 2008 Express Edition for free.

CLI is an ISO standard defining a Virtual Machine. .NET is a
CLI-compliant VM. Another CLI-compliant VM is Mono. Both .NET and Mono
are installed on top of Windows like the Java Virtual Machine (JVM).


What is commonly called "Java", is actually two things: Java/JVM, that
is Java the language syntax and the JVM.

SUN could allow more languages to interact with JVM, as MS does for .NET.

C++/CLI is an ECMA-standardised C++ syntax (in other words an extension
to ISO C++) that takes advantage of all CLI facilities, by keeping
native code (ISO C++ code) and managed code (C++/CLI) code as separate
notions while allowing them to be intermixed at the same time.


C#/CLI is also an ECMA-standardised language (syntax) that takes
advantage of most CLI facilities.


C++/CLI is the most powerful of all .NET languages, as MS says, C++ is
the systems programming language of .NET.


For example you can provide a managed interface (written in C++/CLI) to
native C++ code, including compile-time templates. For example you can
even write C++/CLI generics code as a managed interface to compile-time
ISO C++ templates. The other .NET languages can not do stuff like that.\


Also an interesting thing that C++/CLI provides and that C#/CLI and the
rest of .NET languages do not provide, is deterministic destruction and
objects with stack semantics.

To accomplish this, C++/CLI allows to define both a destructor (for
deterministic destruction) and a finalizer (called when the object is
garbage collected and only if the destructor was not called before), for
managed classes.


Examples of deterministic destruction of managed objects:

// Managed class
ref class SomeClass
{
String ^stringVal;

// ...

public:

// Destructor
~SomeClass ()
{
// Does something
}

// Finalizer
!SomeClass()
{
~SomeClass();
}
// ...
};



//Deterministic destruction
// SomeClass::~SomeClass() is called

void somefunc()
{
SomeClass ^h= gcnew SomeClass;

// ...

delete h;
}


//Deterministic destruction
// SomeClass::~SomeClass() is called

// Stack semantics
void somefunc()
{
SomeClass obj;

// ...

// obj is destroyed at the end of its scope.
}


An interesting reading about this:

http://www.gotw.ca/publications/C++CLIRationale.pdf
 
D

Davis King

A little background first. I've done a bit of C++ programming in the
past, but then fell in love with the ease of multithreaded and GUI
programming in Java. I've been using Java for a long time now and have
learn quite a bit about OO design, and its application in Java. I'd
like to re-enter the world of C++, but I feel reluctant to give up my
favorite IDE (IntelliJ IDEA) and easy-to-use Swing GUI framework.

I'm not looking to start a flame war, so I'd prefer hearing the merits
of your suggestion, without criticizing other suggestions.

The projects I will be doing initially will be strictly
non-professional, personal projects. In particular, I'd like to be able
to quickly get up and running with single frame.

Actually, my goal is to re-write a simple multi-threaded Ray Tracer of
mine in c++. Yes, yes, I know their are plenty that are already way more
sophisticated than I'll probably ever be able to create... Its an
exercise, nothing more.

I'm comfortable with either a Linux or Windows, although I'd prefer
Windows for now.

So, with all that in mind.
What would be a good IDE to invest time and maybe some (preferably
small amount of) money in?
What GUI framework should I check out? Ease of getting set up is
the primary goal, portability is secondary or lower at the moment.
What should I look into for create a multi-threaded c++ program? I'm
familiar with a lot of concurrency issues, but only specifically to Java.

Thanks in advance for all who feel like suggesting something,
Daniel.

IDE:
If you want to do programming on Windows then you can't really beat
the new free versions of visual studio express. Although if you want
a really powerful editor I suggest you check out Vim (http://
www.vim.org). It runs on every platform I'm aware of including
windows and integrates with visual studio. But, I have to admit that
during the first 2 or 3 weeks of learning Vim you will want to kill
yourself since learning it is a pain. However, it is my favorite
editor by far and once you get good at it using any other editor feels
like trudging through molasses by comparison. :)

Build System:
Another useful tool for C++ development is CMake (http://
www.cmake.org). CMake is basically a project makefile except it
allows you to create your makefiles in a portable format. If you
really don't care about the ability to compile your projects on
multiple platforms then you may want to pass on this (although you
should take a look at it anyway). So for example, I use CMake for all
my projects and when I want to build one of them, on any platform, I
simply invoke CMake. It creates the appropriate build environment for
whatever platform I'm currently on, be it a visual studio project, gcc
and gmake makefiles, or whatever.

C++ Libraries:
There are a number of good libraries out there but I'll plug mine :)
If you want to take a look it is at http://dclib.sourceforge.net and
includes all the threading functionality you should need (including
the Monitor synchronization approach like java does). It also
includes a simple GUI framework that would allow you to display an
image on the screen along with a few buttons quite easily.

-Davis
 
D

Daniel Pitts

Davis said:
IDE:
If you want to do programming on Windows then you can't really beat
the new free versions of visual studio express. Although if you want
a really powerful editor I suggest you check out Vim (http://
www.vim.org). It runs on every platform I'm aware of including
windows and integrates with visual studio. But, I have to admit that
during the first 2 or 3 weeks of learning Vim you will want to kill
yourself since learning it is a pain. However, it is my favorite
editor by far and once you get good at it using any other editor feels
like trudging through molasses by comparison. :)
Quite in love with Vim myself, but I've gotten use to a much more
heavyweight IDE. Even heavier than Visual Studios; I would have thought
they'd have make a useful auto-complete by now, instead of this
half-broken and you-still-have-to-type-out-most-of-it (un)Intellisense. :)
Build System:
Another useful tool for C++ development is CMake (http://
www.cmake.org). CMake is basically a project makefile except it
allows you to create your makefiles in a portable format. If you
really don't care about the ability to compile your projects on
multiple platforms then you may want to pass on this (although you
should take a look at it anyway). So for example, I use CMake for all
my projects and when I want to build one of them, on any platform, I
simply invoke CMake. It creates the appropriate build environment for
whatever platform I'm currently on, be it a visual studio project, gcc
and gmake makefiles, or whatever. I'll check it out.
C++ Libraries:
There are a number of good libraries out there but I'll plug mine :)
If you want to take a look it is at http://dclib.sourceforge.net and
includes all the threading functionality you should need (including
the Monitor synchronization approach like java does). It also
includes a simple GUI framework that would allow you to display an
image on the screen along with a few buttons quite easily.

-Davis
I'll check that out too.
Thanks for your reply!
Daniel.
 
E

Erik Wikström

Quite in love with Vim myself, but I've gotten use to a much more
heavyweight IDE. Even heavier than Visual Studios; I would have thought
they'd have make a useful auto-complete by now, instead of this
half-broken and you-still-have-to-type-out-most-of-it (un)Intellisense. :)

Unfortunately I think it is one of the better auto-completes for C++
(though I have not tested other editors recently), C++ is a complex
language which makes auto-complete hard. You should see the auto-
complete when writing C#, sometimes it knows what you want before you
have even started typing.

I'll check that out too.

You might also want to take a look at boost (www.boost.org), a
collection of various libraries, such as threading and more.

For a GUI framework I like Qt, but wxWidgets is also popular.
 
A

Andy Champ

Ioannis Vranos wrote:
C++/CLI is the most powerful of all .NET languages, as MS says, C++ is
the systems programming language of .NET.


For example you can provide a managed interface (written in C++/CLI) to
native C++ code, including compile-time templates. For example you can
even write C++/CLI generics code as a managed interface to compile-time
ISO C++ templates. The other .NET languages can not do stuff like that.\

We are working with C++ in a managed (.net) environment. For the most
part we are using "traditional" C++ - STL, rather than .NET APIs, but
with a C# GUI and some other managed features..

Just to give an opinion - I am reminded of Levassor on one of his early
gearboxes: "C’est brutale, mais ça marche" - it's brutish, but it goes.

I much prefer to run C++ in native mode, and C# for the Managed stuff;
I also find that there are odd occasions when you just can't do what you
want in .NET - though perhaps I shouldn't try to be such a control freak
:) - and that the debugger, under VC2005, isn't much good. It has a
nasty habit of not showing you the data.

Autocomplete has been mentioned. We use an add-on called VisualAssist
(or some similar spelling) from the much more memorably named Whole
Tomato Software (http://www.wholetomato.com/) which does improved
autocomplete and much more.But USD250 might be a bit much for home.

Andy
 
I

Ioannis Vranos

Andy said:
I much prefer to run C++ in native mode, and C# for the Managed stuff;

Why? Does C#/CLI provides any advantage that is better than C++/CLI?
(Note that I don't use both). :)
 
E

Erik Wikström

Why? Does C#/CLI provides any advantage that is better than C++/CLI?
(Note that I don't use both). :)

Yes and no. C# is built from the ground up to take advantage of the CLR
and the syntax is much cleaner (than C++/CLI). There are also a number
of cool features in the latest version of C# (3.0?). On the other hand
you have access to more CLR features with C++/CLI.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,961
Messages
2,570,131
Members
46,689
Latest member
liammiller

Latest Threads

Top