Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 489
  • Last Modified:

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
***

1)
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?

2)
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.

3)
Other than PLANET SOURCE CODE.
Are there any sites like: www.codewalker.com (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.
Thanks!
0
neester
Asked:
neester
  • 5
  • 5
  • 3
  • +4
5 Solutions
 
mrwad99Commented:
>> 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:

http://www.amazon.com/exec/obidos/tg/detail/-/1572316950/qid=1113915644/sr=8-1/ref=sr_8_xs_ap_i1_xgl14/002-6913013-8772843?v=glance&s=books&n=507846

:)
0
 
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?

THANKS!!
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
neesterAuthor Commented:
What I want is something like this:

http://openroad.org/school/gui/hellogui.html

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'
0
 
nonubikCommented:
>[Linker error] undefined reference to `GetStockObject@4'
>[Linker error] undefined reference to `TextOutA@20'

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


I found this page:
http://nuwen.net/gcc.html

I have to say - it is the BEST page i have read so far.
very simple.
Although nothing about GUI's really...
0
 
nonubikCommented:
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).
0
 
neesterAuthor Commented:
Ahh ok.
I think i found it.
Libraries?

Where is the file gdi32.lib
is it a standard C++ header?
or somethign else>
0
 
nonubikCommented:
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
0
 
DariuzkCommented:
>> 2) How can I make a GUI with C++...
a)
for windows,linux & mac
http://www.wxwidgets.org/
tutor: http://www.wxwidgets.org/hello.htm 
tutor: http://www.bzzt.net/~wxwidgets/icpp_wx1.html
tutor: http://www.wxwidgets.org/fosdem2003/html/talk/talk.html
tutor: http://www.wxwidgets.org/fosdem2003/html/tutorial/tutorial.html

you can use wxGlade program for visual editing wxWidgets GUI's.
http://wxglade.sourceforge.net/

for IDE you can use KDevelop on Linux, DEV-C++ on Windows
b)
Qt for windows and linux only
http://www.trolltech.com/products/qt/index.html
tutor: http://doc.trolltech.com/3.3/tutorial.html

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

0
 
DariuzkCommented:
wxWidgets pack is in DEV-C++ IDE too (so you can try it on Windows).
0
 
itsmeandnobodyelseCommented:
>>>> 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 http://www-106.ibm.com/developerworks/linux/library/l-mfc/?open&l=920,t=gr


Regards, Alex




0
 
neesterAuthor Commented:
>> Dariuzk << and >> itsmeandnobodyelse  <<
THANKS!

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!
0
 
nonubikCommented:
>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)
0
 
DariuzkCommented:
>> 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.  
0
 
itsmeandnobodyelseCommented:
>>>> 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
0
 
rajeev_devinCommented:
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 www.trolltech.com for further help.

Regards
Rajeev
0
 
mornaoCommented:
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.

 
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 5
  • 3
  • +4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now