Newbie Question - Easy Points...

Hey Guys.

Just wondering a few things.
Points will be split, so please everyone answer if they can!

*** some quick info:
*** I am using WinXP, and want to compile to run on Windows.
*** (eventually want to compile for mac and linux too though)
*** I will start new questions for each part, if need be.
*** Let me know if you can offer more info and I will start a new question

What is the BEST FREE C++ Software package to use.
When coding in C, I used PELLES C, which included the compiler, linker and builder...
Are there any good free C++ software packages of the same level?

How can I make a GUI with C++...
What is the EASIEST way.
PLEASE either link me to a beginners tutorial, or write one up for me.

Are there any sites like: (thats for PHP, but its PERFECT)
But for C++??

I have tried google.
But there are soo many sites to browse through.
I figured I would cut my losses by asking professionals.
LVL 11
Who is Participating?
DariuzkConnect With a Mentor Commented:
>> 2) How can I make a GUI with C++...
for windows,linux & mac

you can use wxGlade program for visual editing wxWidgets GUI's.

for IDE you can use KDevelop on Linux, DEV-C++ on Windows
Qt for windows and linux only

you can use Qt Designer program for visual editing Qt GUI's.
comes with Qt library.

mrwad99Connect With a Mentor Commented:
>> 2) How can I make a GUI with C++...

I would say MFC.  But that requires visual studio.  

It is not necessarily about what is easiest; it is about what is used in industry.  Would you really want to learn and become good at something that nobody else uses ?  No.  So go with what is the standard.  And as I said, I believe that is MFC.

You have chosen C++.  That tells me that you don't just want to build a GUI to get the end result, you want to do so as a learning process.  If you wanted just the end result, then the easiest way for a beginner would be VB (yuck).

There are other toolkits out there, but none as widely used as MFC.  Microsoft built visual studio with MFC, so if MS use it, so should you :)

Regarding tutorials; there is no good online resource for MFC as far as I am concerned.  Unless you can download an E-book, buy one or borrow one from a library.  I recommend Jeff Prosise's book:

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

neesterAuthor Commented:
>> nonubik <<
GREAT links!
Thanks for that.
Defiantly will help!
i will try the program soon!

Hope its good :)

>> mrwad99  <<
Your correct.
Im doing this for a learning process.
I already know VB, thats why I want to move to C++.
I want faster programs, and more control.

I actually do have VC++, but have heard that its "not real c++"...
Its like an "advanced" VB.

Thanks for the book reference - although I don't really have time to read a book.
I am at uni, and I am learnign C at the moment, so I can't read a C++ book.
Will confuse me for exams :P

And I dont have the time.

Your input will definatly get some points tho!
Thanks for that.
MFC - i am guessing is ONLY for Win32 compilations them...
How easy is it to port something coded for MFC to a Linux/Mac based system?

neesterAuthor Commented:
What I want is something like this:

That will work for me.
I tried putting that code into DEV-C++

Got these errors:

[Linker error] undefined reference to `GetStockObject@4'
[Linker error] undefined reference to `TextOutA@20'
>[Linker error] undefined reference to `GetStockObject@4'
>[Linker error] undefined reference to `TextOutA@20'

Need to link against Gdi32.lib.
neesterAuthor Commented:
>> Need to link against Gdi32.lib.
sorry but that means nothing to me :(

I found this page:

I have to say - it is the BEST page i have read so far.
very simple.
Although nothing about GUI's really...
I'm not so familiar with DevC++, but at your project settings you must have a linker page. There at the 'additional objects/modules' you have to add the gdi32.lib to link with it (for the definitions of TextOut and GetStockObject are in the gdi32.dll).
neesterAuthor Commented:
Ahh ok.
I think i found it.

Where is the file gdi32.lib
is it a standard C++ header?
or somethign else>
gdi32.lib should be in (one of) the library folder of the DevC++. It's not a header file, it's a standard import library file
wxWidgets pack is in DEV-C++ IDE too (so you can try it on Windows).
itsmeandnobodyelseConnect With a Mentor Commented:
>>>> I actually do have VC++, but have heard that its "not real c++"

Nope. VC 6.0 is the most used C++ compiler in the world. VC 7.2 is one of the best compilers at all and most compliant with C++ standard.

Maybe you heard of "managed C++" in VS.NET that is a "restricted C++" as the output isn't  normal machine code but input for DotNet JIT Compiler (Just-In-Time). VB.NET, C# and J++ also were able to produce such intermediate code. But even the restrictions - e. g. no multiple inheritance - make "managed C++"  equal to VB. You better would say that VB.NET isn't VB anymore.

So, if you already have VC Compiler (what version?), there is no need to change as you could write portable code as good (or bad) as with any other compiler on Windows platform.

>>>> MFC - i am guessing is ONLY for Win32 compilations them...

Yes. I heard of some attempts to port MFC classes to UNIX platforms but AFAIK there is nothing that makes an MFC Application compilable on UNIX.

MFC once is a class wrapper to the native WINAPI - what makes it difficult to get a portable version in that part as WINAPI is different to other GUI APIs. Then it is a class framework for Windows GUI Application based on the design of a so-called "Document-View" architecture. That is called "model-view" elsewhere and IMHO should be convertable to other platforms (though I don't know of any successful attempt). However, MFC isn't solely a class library but comes with Class Wizard, Application Studio (resource editor) and Visual Studio. So it wouldn't be easy (maybe impossible) to make a full equivalent to MFC on another platform.

>>>> How easy is it to port something coded for MFC to a Linux/Mac based system?

You could check the following link,t=gr

Regards, Alex

neesterAuthor Commented:
>> Dariuzk << and >> itsmeandnobodyelse  <<

Great answers!!
I will check out those links later tonight!


Really appreciate it!!

I have Visual Studio 6.
But I do have access to .Net if need be.
My Uni have it on the Lab PCs.

I was always under the impression that coding with Visual C++ was "easy" compared to real C++.
Anyway I will definalty follow up on all that.
But Personaly - I prefer using and supporting open source stuff.
So far Dev-C++ looks great!
>I was always under the impression that coding with Visual C++ was "easy" compared to real C++.

Visual C++ is just an integrated development environment for C++ under Windows. I doubt it's a 'false' C++ :o)
>> VC 7.2 is one of the best compilers at all and most compliant with C++ standard.
I think GNU C++ is most compliant with C++ standard. 'cos GNU allways cares about standards, I cann't say that about Microsoft.  
>>>> GNU allways cares about standards, I cann't say that about Microsoft

No, the problem isn't that MS doesn't care about standards but that they do try to make their own standards. But, AFAIK, C++ standard never was a target where MS was trying to create an own standard.

That might be a reason that MS C/C++ compilers always had a good reputition (Windows only of course) and newer VC 7 compilers are known to be compliant to C++ standard. VC6 was made 1997/1998 - prior to release of C++ standard. Therefore it isn't compliant in some points.

Regards, Alex
Answer 1 & 2
Use Qt
U can develop your GUI faster and the application will compile in all known platforms (Windows, Linux, Mac, SGI, etc.)

Visit the site for further help.

mornaoConnect With a Mentor Commented:
MS now have Beta2 versions of C++ for Studio 2005, downloadable, though there are other 'free' compilers out there.

Borland TurboC2 (can target 16 bit and 32 bit computers) good for older handheld devices with 8086/80386, free from Borland Archives.
Borland C5.02 (aka 5.05, good for learning and is fast) available free download from Borland Archives. Both are Kernigan and Richie. Although C will teach the basics.
MS eMbedded Visual C++4 (sp4 available) free from Microsoft, and has a WindowsCE emulator if you wish to play with CE devices.

Starting out this level, you have to create the GUI elements, but if you just wish to use what's there, go to MS.

Recommend C/C++/C# Programmers Bible by Kris Jamsa - it tells you the differences and pitfalls as well as what to do.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.