I realize everyone has their own opinion, and of course their is always mine. My opinion is, I won't waste my time on anything but the best that there is available at the time. Or at least that was my opinion when I bought my software several years ago.
The hard part is the myriad of files and libraries and subdirectories and path changes and working out (real world example here) whether the compiler is in c:\mingw\bin or in c:\mingw\mingw32\bin and working out whether it is not compiling because of an error in the code or because it can't find a component somewhere in a subdirectory.
When I talk about C++, I tend to generalize quite a bit. When specifically talking about Microsoft software and C++, there are two areas of C++ that tend to be grouped together, true C++ and Microsoft Foundation Classes (MFC). MFC is basically nothing more than a bunch of class wrappers for some of the most common window functions, however, I would estimate that MFC provides probably 90% of the same programming functionality that can be obtained from standard C++ (just guessing of course). MFC programming also makes C++ programming about 90% easier, although you lose some functionality, roughly the missing 10%. For that missing 10%, you can always incorporate standard C++ into an MFC program.
When you start a new project in Visual Studio, you have a choice of many options pertaining to what type of program you want to create. By choosing an MFC type program, you are then give further choices, such as the base class for the application, whether or not to include active X, help files, multi-document support, containers, servers, etc... When you have finished selecting the type of application that you want to make, MFC will create the basic skeletal code for you. All you have to do from that point is compile it and you have a working application. However, to add special functionality and your own personal touches, you simply add code. The MFC classes provide a great way to add code, simply declare an object globally or locally and begin using it. When a class is referenced, you will have that drop down menu that you desire.
MFC is an all around good way to go to start making C++ applications, without going through the school of hard knocks. Besides having larger excution files, the only limitation is the loss of a little functionality. By the time you get well acquainted with MFC, you will have learned quite a bit of standard C++ along the way.
I hear you idbruce. This whole thread started because microsoft started muttering things about not supporting my XP computer for much longer, and also because the latest version of .net failed to install on my machine. So I got a new machine with Windows 8 and yes, it is fantastic, and yes, everything works much faster (cold boot to browsing in under 10 secs). But if I go and code a nifty program in .net 2012 maybe more than half the people on this forum won't be able to run it (XP is still 50% of computers according to one website).
I couldn't agree more about getting the best. And right now, after spending 5 hours trying to get Qt to install, I'm ready to just go back to Microsoft, even though they force you to buy new hardware every now and then.
@heater, what do I do now? See the screenshot. The Qt 317Mb package doesn't seem to have Mingw in it, even though it has a filename "qt-win-opensource-4.8.3-mingw.exe" It said it couldn't find a c:\mingw directory, so I cancelled the install and got Mingw from sourceforge, and in the install there was a question "do you want the latest version?", so mingw went off for another half an hour and downloaded the latest files. I did a cold boot for good measure. Qt says it can't find a particular file, and yet there it is (in the background of the screenshot).
This is the standard, basic, off the shelf install of Qt. Maybe most installations of Qt are re-installations so people probably already have a compiler, but how are they going to get new users if this is how it works? /end rant
I'm going back to M$ for a bit of rest and relaxation - I've got some great ideas that are starting to gel for a new cached form of pasm. I found some old C keywords that no-one uses any more, like "register" that forces a compiler to use local registers. But those will get trashed if you call a function from within the existing function and that is exactly the behaviour you want if a function happens to invoke a cognew. Static variables are on the stack (which is in hub) and are a bit slower. So with some super simple C looking language we can replicate that. There is a volatile keyword that does the opposite. Add a few more rules, like djnz's cannot be nested, and keywords like "If" that can put in a cmp and then a jump, and a base pointer as well as a stack pointer (all concepts borrowed from C), and the asm keyword that is in some non standard versions of C, and I think I can write a compiler that compiles to pasm that can run propeller video drivers etc.
As a software consumer, I tend to shun any programs that require .NET, even though it has somehow already wormed its way into my XP box. To me it represents excessive and unnecessary bloat. I can write a GUI program in Perl/Tk and package it in an .exe that includes everything: the Perl interpreter, all the necessary modules, and the Tk enviroment, usually in single-digit megabytes. Why should it take more than that? But even that is bloatware compared to the lean programs that Parallax distributes from their Delphi dev system.
Dr_A, I've seen that message too. The 4.8.3 or higher qt library needs MinGW 4.6.2 or higher which has that win32 header. If you have a version like that and you still get the message, just ignore it and move on. That's what I did and it works fine for me.
At some point you'll get to a solution that works for you. Whatever it is I'm sure will be fine.
@Phil, can you produce a binary for all major O/S from one source?
Thanks jazzed. Yes I ignored the message and it installed. 6 hours so far. Please forgive my slight irritation at this point. I now have a program called Qt designer, and it has a nifty and very simple GUI builder interface with drag and drop buttons and text boxes and things. And if I click on View Source, it produces some skeleton C code. That could be very handy if we translate that into something the Propeller can understand.
BUT - the last Qt install (back 5 hours ago) had a different program that had "hello world" as a text program. Now, that wouldn't compile, but at least it was standard looking C code with a friendly green arrow that you clicked to compile.
Is there a way of combining both of these things?
Aaargh, I just want to put a text box and a button on the screen, click on the button, and print "Hello World" in the text box.
M$ .NET may be bloatware, but this Qt thing is 6 hours work and over a gigabyte of downloads so far and it still can't print "Hello World". Is bloatware the new black?
Re PhiPi
As a software consumer, I tend to shun any programs that require .NET, even though it has somehow already wormed its way into my XP box. To me it represents excessive and unnecessary bloat. I can write a GUI program in Perl/Tk and package it in an .exe that includes everything: the Perl interpreter, all the necessary modules, and the Tk enviroment, usually in single-digit megabytes. Why should it take more than that? But even that is bloatware compared to the lean programs that Parallax distributes from their Delphi dev system.
Now that is interesting. As an aside, ten years ago I wrote a GUI VB6 program that did all the accounts for a medical practice. It ran on multiple sites and must have processed over ten million dollars in accounts. I had to let it go as they brought in online claims, but the key thing about this program was that it fitted on a single 1.2Mb floppy disk. And that included some pretty .jpg's for the splash screen.
In some ways I wonder if computers are going backwards!
So can Perl and Delphi still do this sort of thing? A GUI that is intuitive. "Hello World" without having to read a manual. Write programs that non computer people can pick up quickly (that was my challenge with the medical accounts program, as I had to do the training too, so I wrote the program based on all the feedback from non computer users). And compile to something small.
Isn't the Spin tool written in one of those languages.
Actually, the Spin tool is a bit of a masterpiece. Looks modern. Quick installation. Seems to work on multiple platforms. Does some very complicated things behind the scenes.
Aaargh, I just want to put a text box and a button on the screen, click on the button, and print "Hello World" in the text box.
Doc
Do you want the text box and button in the same application window frame, or are these meant to be two completely different entities?
I can create a C++ project file that will do exactly what you want in very little time, if you want me to do so.
Additionally, you did not respond, but I made you an offer for free software in Post 58. It may not be the best available at this time, but at that time, only the professional or enterprise version was better.
@Phil, can you produce a binary for all major O/S from one source?
No, I can't if serial I/O is required, since each OS has its own quirks and calling conventions. Other than that, though, Perl is pretty much OS-agnostic. I've written apps for Windows, Linux, and OS/X without having to shift gears. The nice thing about Linux and OS/X is that they already come with Perl -- no need to download and install it, as is the case for Windows; hence no need to create a binary in the first place.
@idbruce. No just in the same window. It is just an example of the console based program but translated over to a GUI platform, and as a consequence it ought to be simple. Just a few lines of code. Some C++ programs do run to more than that.
VB.Net and C# are both simple and trivial to write such a program so they are the gold standard. I can do it very quickly too in VB 2008 but M$ say I am not allowed to run 2010. My computer is obsolete and steam powered etc.
vb.net code and screenshot below. Autocomplete for the one line of code that needed to be added to label1. Autocomplete is very handy because a few years back they changed the syntax from "Label1.Label" to "Label1.Text" and that is the sort of thing that is easy to work out when you have a dropdown menu. I never needed to check a help file for that one and that is how writing code should be!
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Label1.Text = "Hello World"
End Sub
End Class
And yes, thankyou very much for the offer of C++ but I already have it (See post #59). Screenshot for proof
Actually, both VB6 and Visual C++ have a lot going for them. They are about the same vintage and I actually paid for both VB5 and VB6 and felt I got very good value from both programs. The downside is... you have to pay for them, so that cuts out the "bittorrent" generation And also they have a late '90s look and feel with gray buttons on gray background, and definitely do not look as sharp as the Spin tool.
I've looked at some of the more modern languages that try to replicate the "golden era" of GUI IDEs, where things were simpler but they are not quite as good as the real thing.
Is Delphi free or does it cost?
Researching Delphi IDEs now. Delphi XE3 is only $3639.20
No, I can't if serial I/O is required, since each OS has its own quirks and calling conventions. ...
I must assume you've written Perl based programs for parallax that "just work" and they are deployed on all platforms (or not?). I know serial IO is tough across platforms, but it is possible. I'd like to know more about what's in the way but I don't want to soil this thread too much.
@Dr_A I'm sorry you've had a hard time. I guess you were unfortunate enough to have stepped into it at the wrong time. It was always a piece of cake to make work until recently on windows.
Humblest apologies we, or is it I, seem to have wasted a good part of your weekend fighting with Qt installation. I happen to have access to an XP machine this weekend so as recompense I tried it myself. As Jazzed says things seem to have have change in Qt on Windows land recently. So let's see how it goes:
Install MinGW compiler.
Run that and it will install mingw.
Be sure to select the C and C++ compilers.
Hit continue if it complains about any missing header file just continue. Seems we don't need it.
I advise selecting the default installation directory c:/MinGW
Install Qt Libraries
Go here: http://qt-project.org/downloads and download version 4.8.3 of the Qt libraries:
"Qt libraries 4.8.3 for Windows (minGW 4.4, 317 MB)"
Run that and it will install the libs.
I advise selecting the default installation directory c:/Qt..whatever it is.
Now you should be able to play with the Qt examples and demos.
Install QtCreator
Run that and you should get a installed and QtCreator running.
Create a Qt Hello World App.
In Qt Creator:
Select: "File" -> "New File or Project".
In the resulting dialog select "Application" and "Qt Gui Application" and then hit "Choose".
Enter the name of your project and its location and hit next.
At this point you should get some message about not having a kit or kits.
Well, that was a blinder for me. Never seen it before. Turns out to be a new
Creator feature.
OK, it directs you to "options". Go there.
We need to select a compiler for this project(s) so under the "Compilers" tab hit the "Add" button and "MinGW" from the selection box it shows.
Now set the "compiler path" by browsing to C:\MinGW\bin\mingw32-c++.exe
We need to select a Qt libs version to use for this project(s) so under the "Qt Versions" tab hit the "Add" button. In the file navigation box select C:\Qt\4.8.3\bin\qmake.exe
We need a "kit" so under the "Kits" tab hit the "Add2 button. Enter a name for you kit, e.g "MinGWKit"
Enter a device type of "Desktop"
The "Device" should read "Run Locally"
The Sysroot can be blank.
Set "Compiler" to "Mingw"
Set "Qt version" to "Qt 4.8.3(4.8.3)"
Hit OK.
Note: You can get back into that kit configuration by selecting menu item
"Tools" -> "Options" and then "Build and Run".
Getting back to our project we should now have "kit" to select as named above.
Hit the big green triangle to run compile and run the project.
Now you can get that button in there. Just select the .ui file from under the "Forms" entry in the project tree. you can then see how to drag and drop components onto your main window.
Try Lazarus it's freeware based on FreePascal which can do most of what Delphi does. The complete development suite a 110 MB zip package. Ports of FreePascal are available for most OS'es and architectures.
Thanks heater. That makes a lot of sense.
1) The order is important. Install Mingw first, because then Qt can find it. Qt seems to have trouble finding existing compilers, but the install part of Qt can find it.
2) Don't download the 500mb package (or anything with 'beta')
3) Install the Libraries. These may or may not have been part of the 500mb package. Given the libraries are 317mb and the creator is 51mb maybe these have been combined together?
4) Install QtCreator. I haven't done this as I assumed that it would be part of the package since version 5 combined all this together, and that would explain why I don't have an IDE as yet that can write code. So I'll do that when I get home.
5) I would never have guessed all that stuff about kits. Thanks++
Thanks heaps for taking the time to put this together. Maybe Qt might like to change their instructions to be your post above
I must assume you've written Perl based programs for parallax that "just work" and they are deployed on all platforms (or not?).
It's easiest to address this with a simple example. Attached is a zip that includes a short Perl/Tk demo program that retrieves from the internet and displays current weather conditions for any U.S. zipcode. The self-contained .exe was packaged for Windows from the .pl source with perl2exe. The perl source file will run just fine under Linux. Just be sure to give it executable permissions. You may also have to install the Perl-tk package if your Linux installation does not already have it. (I had to for Linux Mint, but the package manager made it easy.) My iMac died awhile back, so I can't test it under OS/X. The source file should run okay on OS/X, though, under X11, assuming Tk is installed and assuming the shebang line points to the correct directory.
Those instructions look rather long winded, it takes longer to write it out than to do it. Just bite the bullet and jump in at the top.
Keep in mind that in all such systems we have, a language, some libraries and an IDE. They are normally all separate even if it's hard to see from the one click install of some set ups.
In this case C++ compiled by mingw, the Qt libraries and the Qt creator IDE.
If it's any consolation, when you are ready to move to Linux it is a one step install, on Debian and Ubuntu for example it's just the command:
You have to be the "root" user to install stuff, like administrator or whatever in Windows. You can get root privileges in two ways:
1) Issue the command "su" and you will be prompted for the root password. Then you can do your stuff and get back to normal user with "exit"
2) The preferred way. Use the sudo command:
$ sudo apt-get install qtcreator
Assuming sudo is set up correctly, which it normally is in Ubuntu, it will prompt for your normal user password and the execute the apt-get thing. When that is done you will be back as your normal user.
Interesting document. I have found myself in the Ubuntu Software Centre which makes browsing in categories very easy. Kind of like a free app store. I like it!
However, trying to download QtCreator and it says I don't have an internet connection. Which isn't true as it is browsing the internet just fine. I got momentarily distracted with some other nice offerings and am installing IDLE for Python at the moment. Just to prove I can get an IDE working in Ubuntu.
Also downloading Lazarus which is coming up in the Software Centre just under Qt. Installing that too. But Qt isn't downloading (neither the designer not the creator) Maybe it is trying to go to the same source as the command line version?
I like the way the Software Centre is organised. Much easier than searching through the internet. Probably much less risky in terms of viruses and semi-trojans that you get on some sites where they add a toolbar to your browser. Ubuntu software centre is clean and neat. All the popular programs on one page.
Addit - in Ubuntu got Python working and also Mono. Lazarus didn't complete the download. Will try Qt again in a bit.
Way late to this thread, but for my understanding of the question, my best answer would be to use the language you are most comfortable and knowledgeable using that enables you to meet the goals of the project in mind within a reasonable amount of time, including learning enough to fill in the holes for areas you have not worked in. If I took the time to really go out and learn all the languages I could possibly need, there would never be enough time to really accomplish anything.
Favorites?
For sys admin and oracle, Perl and Perl/tk and a few select additional related modules (been years though). Create some nice Solaris packaging tools and clearcase tools
For the prop, PASM; but now moving into C and GAS and Make
All else? dunno yet, not had the need. Can't keep up with all that is changing, used to keep up with Freshmeat when it was a reasonable number of updates a day, now like trying to see what I want to pick out of a rapids......
FF
As to distributions, I use Fedora 17. Use yum and yumx to get more packages as needed. Also good source for this info for Fedora or Centos is a site that is http://www.if-not-true-then-false.com
Good stuff there.
Can't believe the road blocks you are having in the way of getting hold of Qt.
As far as I can tell QtCreator is in not officially supported by Ubuntu so its in the "universe" so you should have "universe" specified in your /etc/apt/sources file. Something like so:
#############################################################
################### OFFICIAL UBUNTU REPOS ###################
#############################################################
###### Ubuntu Main Repos
deb [URL]http://au.archive.ubuntu.com/ubuntu/[/URL] quantal main restricted universe
deb-src [URL]http://au.archive.ubuntu.com/ubuntu/[/URL] quantal main restricted universe
###### Ubuntu Update Repos
deb [URL]http://au.archive.ubuntu.com/ubuntu/[/URL] quantal-security main restricted universe
deb [URL]http://au.archive.ubuntu.com/ubuntu/[/URL] quantal-updates main restricted universe
deb-src [URL]http://au.archive.ubuntu.com/ubuntu/[/URL] quantal-security main restricted universe
deb-src [URL]http://au.archive.ubuntu.com/ubuntu/[/URL] quantal-updates main restricted universe
Assuming your using the quantal release.
No idea if you can enable that "universe" from some GUI control.
Here is a useful tool that creates /etc/apt/sources files
Edit: Hmm...If you can get lazarus I guess you already have "universe" specified.
You could try sourcing from a different country in case your local repos are wonky. Change "au" to "us" or some such.
I'll get there with Qt. I wonder since they have been changing over to v5 whether some of the problems are with repositories and downloads? Anyway I need a moment to do that last step for the Windows install once I get home from work.
I'm pretty sure you won't see Qt v5 in a repository for stable versions of Debian or Ubuntu for a while. Debian especially is very conservative about jumping on new versions before they are really stable. So I would not expect disruption up at Noki, Digia or the Qt foundation to be an issue.
You'll have to please forgive me for being incredibly thick when it comes to installing this program, but I tried the simple way of downloading and running a file and it didn't work, so now I'm trying the method of slavishly copying the instructions *exactly* as they are written, without deviating a single step
I have Qt creator downloaded and running.
In the install instructions you say
Create a Qt Hello World App.
In Qt Creator:
Select: "File" -> "New File or Project".
In the resulting dialog select "Application" and "Qt Gui Application" and then hit "Choose".
Enter the name of your project and its location and hit next.
Attached is the screenshot after File - New Project.
Comments
I realize everyone has their own opinion, and of course their is always mine. My opinion is, I won't waste my time on anything but the best that there is available at the time. Or at least that was my opinion when I bought my software several years ago.
When I talk about C++, I tend to generalize quite a bit. When specifically talking about Microsoft software and C++, there are two areas of C++ that tend to be grouped together, true C++ and Microsoft Foundation Classes (MFC). MFC is basically nothing more than a bunch of class wrappers for some of the most common window functions, however, I would estimate that MFC provides probably 90% of the same programming functionality that can be obtained from standard C++ (just guessing of course). MFC programming also makes C++ programming about 90% easier, although you lose some functionality, roughly the missing 10%. For that missing 10%, you can always incorporate standard C++ into an MFC program.
When you start a new project in Visual Studio, you have a choice of many options pertaining to what type of program you want to create. By choosing an MFC type program, you are then give further choices, such as the base class for the application, whether or not to include active X, help files, multi-document support, containers, servers, etc... When you have finished selecting the type of application that you want to make, MFC will create the basic skeletal code for you. All you have to do from that point is compile it and you have a working application. However, to add special functionality and your own personal touches, you simply add code. The MFC classes provide a great way to add code, simply declare an object globally or locally and begin using it. When a class is referenced, you will have that drop down menu that you desire.
MFC is an all around good way to go to start making C++ applications, without going through the school of hard knocks. Besides having larger excution files, the only limitation is the loss of a little functionality. By the time you get well acquainted with MFC, you will have learned quite a bit of standard C++ along the way.
It also greatly helps to gain a thorough understanding of the MFC hierarchy, which can be seen here:
http://msdn.microsoft.com/en-us/library/ws8s10w4(v=vs.80).aspx
Bruce
I couldn't agree more about getting the best. And right now, after spending 5 hours trying to get Qt to install, I'm ready to just go back to Microsoft, even though they force you to buy new hardware every now and then.
@heater, what do I do now? See the screenshot. The Qt 317Mb package doesn't seem to have Mingw in it, even though it has a filename "qt-win-opensource-4.8.3-mingw.exe" It said it couldn't find a c:\mingw directory, so I cancelled the install and got Mingw from sourceforge, and in the install there was a question "do you want the latest version?", so mingw went off for another half an hour and downloaded the latest files. I did a cold boot for good measure. Qt says it can't find a particular file, and yet there it is (in the background of the screenshot).
This is the standard, basic, off the shelf install of Qt. Maybe most installations of Qt are re-installations so people probably already have a compiler, but how are they going to get new users if this is how it works? /end rant
I'm going back to M$ for a bit of rest and relaxation - I've got some great ideas that are starting to gel for a new cached form of pasm. I found some old C keywords that no-one uses any more, like "register" that forces a compiler to use local registers. But those will get trashed if you call a function from within the existing function and that is exactly the behaviour you want if a function happens to invoke a cognew. Static variables are on the stack (which is in hub) and are a bit slower. So with some super simple C looking language we can replicate that. There is a volatile keyword that does the opposite. Add a few more rules, like djnz's cannot be nested, and keywords like "If" that can put in a cmp and then a jump, and a base pointer as well as a stack pointer (all concepts borrowed from C), and the asm keyword that is in some non standard versions of C, and I think I can write a compiler that compiles to pasm that can run propeller video drivers etc.
I must admit, that is a pretty significant number.
-Phil
At some point you'll get to a solution that works for you. Whatever it is I'm sure will be fine.
@Phil, can you produce a binary for all major O/S from one source?
BUT - the last Qt install (back 5 hours ago) had a different program that had "hello world" as a text program. Now, that wouldn't compile, but at least it was standard looking C code with a friendly green arrow that you clicked to compile.
Is there a way of combining both of these things?
Aaargh, I just want to put a text box and a button on the screen, click on the button, and print "Hello World" in the text box.
M$ .NET may be bloatware, but this Qt thing is 6 hours work and over a gigabyte of downloads so far and it still can't print "Hello World". Is bloatware the new black?
Re PhiPi
Now that is interesting. As an aside, ten years ago I wrote a GUI VB6 program that did all the accounts for a medical practice. It ran on multiple sites and must have processed over ten million dollars in accounts. I had to let it go as they brought in online claims, but the key thing about this program was that it fitted on a single 1.2Mb floppy disk. And that included some pretty .jpg's for the splash screen.
In some ways I wonder if computers are going backwards!
So can Perl and Delphi still do this sort of thing? A GUI that is intuitive. "Hello World" without having to read a manual. Write programs that non computer people can pick up quickly (that was my challenge with the medical accounts program, as I had to do the training too, so I wrote the program based on all the feedback from non computer users). And compile to something small.
Isn't the Spin tool written in one of those languages.
Actually, the Spin tool is a bit of a masterpiece. Looks modern. Quick installation. Seems to work on multiple platforms. Does some very complicated things behind the scenes.
Hmm, Delphi. http://www.delphibasics.co.uk/ByFunction.asp?Main=Strings
Yay. A decent string library. Time to read some more...
Ah, and it looks a bit like Spin http://www.delphibasics.co.uk/RTL.asp?Name=Repeat
Interesting.
Doc
Do you want the text box and button in the same application window frame, or are these meant to be two completely different entities?
I can create a C++ project file that will do exactly what you want in very little time, if you want me to do so.
Additionally, you did not respond, but I made you an offer for free software in Post 58. It may not be the best available at this time, but at that time, only the professional or enterprise version was better.
Bruce
-Phil
VB.Net and C# are both simple and trivial to write such a program so they are the gold standard. I can do it very quickly too in VB 2008 but M$ say I am not allowed to run 2010. My computer is obsolete and steam powered etc.
vb.net code and screenshot below. Autocomplete for the one line of code that needed to be added to label1. Autocomplete is very handy because a few years back they changed the syntax from "Label1.Label" to "Label1.Text" and that is the sort of thing that is easy to work out when you have a dropdown menu. I never needed to check a help file for that one and that is how writing code should be!
And yes, thankyou very much for the offer of C++ but I already have it (See post #59). Screenshot for proof
Actually, both VB6 and Visual C++ have a lot going for them. They are about the same vintage and I actually paid for both VB5 and VB6 and felt I got very good value from both programs. The downside is... you have to pay for them, so that cuts out the "bittorrent" generation And also they have a late '90s look and feel with gray buttons on gray background, and definitely do not look as sharp as the Spin tool.
I've looked at some of the more modern languages that try to replicate the "golden era" of GUI IDEs, where things were simpler but they are not quite as good as the real thing.
Is Delphi free or does it cost?
Researching Delphi IDEs now. Delphi XE3 is only $3639.20
Oh, and need to check out PERL too!
LOL I was watching emails for a response. Sorry I missed your response.
I must assume you've written Perl based programs for parallax that "just work" and they are deployed on all platforms (or not?). I know serial IO is tough across platforms, but it is possible. I'd like to know more about what's in the way but I don't want to soil this thread too much.
@Dr_A I'm sorry you've had a hard time. I guess you were unfortunate enough to have stepped into it at the wrong time. It was always a piece of cake to make work until recently on windows.
Humblest apologies we, or is it I, seem to have wasted a good part of your weekend fighting with Qt installation. I happen to have access to an XP machine this weekend so as recompense I tried it myself. As Jazzed says things seem to have have change in Qt on Windows land recently. So let's see how it goes:
Install MinGW compiler.
Go here: http://sourceforge.net/projects/mingw/files/ and download the latest mingw installer:
"mingw-get-inst-20120426.exe"
Run that and it will install mingw.
Be sure to select the C and C++ compilers.
Hit continue if it complains about any missing header file just continue. Seems we don't need it.
I advise selecting the default installation directory c:/MinGW
Install Qt Libraries
Go here: http://qt-project.org/downloads and download version 4.8.3 of the Qt libraries:
"Qt libraries 4.8.3 for Windows (minGW 4.4, 317 MB)"
Run that and it will install the libs.
I advise selecting the default installation directory c:/Qt..whatever it is.
Now you should be able to play with the Qt examples and demos.
Install QtCreator
Go here: http://qt-project.org/downloads and download Qt Creator: "Qt Creator
2.6.0 for Windows (51 MB)"
Run that and you should get a installed and QtCreator running.
Create a Qt Hello World App.
In Qt Creator:
Select: "File" -> "New File or Project".
In the resulting dialog select "Application" and "Qt Gui Application" and then hit "Choose".
Enter the name of your project and its location and hit next.
At this point you should get some message about not having a kit or kits.
Well, that was a blinder for me. Never seen it before. Turns out to be a new
Creator feature.
OK, it directs you to "options". Go there.
We need to select a compiler for this project(s) so under the "Compilers" tab hit the "Add" button and "MinGW" from the selection box it shows.
Now set the "compiler path" by browsing to C:\MinGW\bin\mingw32-c++.exe
We need to select a Qt libs version to use for this project(s) so under the "Qt Versions" tab hit the "Add" button. In the file navigation box select C:\Qt\4.8.3\bin\qmake.exe
We need a "kit" so under the "Kits" tab hit the "Add2 button. Enter a name for you kit, e.g "MinGWKit"
Enter a device type of "Desktop"
The "Device" should read "Run Locally"
The Sysroot can be blank.
Set "Compiler" to "Mingw"
Set "Qt version" to "Qt 4.8.3(4.8.3)"
Hit OK.
Note: You can get back into that kit configuration by selecting menu item
"Tools" -> "Options" and then "Build and Run".
Getting back to our project we should now have "kit" to select as named above.
Hit the big green triangle to run compile and run the project.
Now you can get that button in there. Just select the .ui file from under the "Forms" entry in the project tree. you can then see how to drag and drop components onto your main window.
Hope I got it all covered here.
There are instructions for this new fangled "kits" thing here "http://blog.qt.digia.com/blog/2012/11/08/qt-creator-2-6-0-released/"
Try Lazarus it's freeware based on FreePascal which can do most of what Delphi does. The complete development suite a 110 MB zip package. Ports of FreePascal are available for most OS'es and architectures.
Links:
http://www.freepascal.org/
http://www.lazarus.freepascal.org/
1) The order is important. Install Mingw first, because then Qt can find it. Qt seems to have trouble finding existing compilers, but the install part of Qt can find it.
2) Don't download the 500mb package (or anything with 'beta')
3) Install the Libraries. These may or may not have been part of the 500mb package. Given the libraries are 317mb and the creator is 51mb maybe these have been combined together?
4) Install QtCreator. I haven't done this as I assumed that it would be part of the package since version 5 combined all this together, and that would explain why I don't have an IDE as yet that can write code. So I'll do that when I get home.
5) I would never have guessed all that stuff about kits. Thanks++
Thanks heaps for taking the time to put this together. Maybe Qt might like to change their instructions to be your post above
Re Lazarus - sounds good. I'll check that out.
-Phil
Those instructions look rather long winded, it takes longer to write it out than to do it. Just bite the bullet and jump in at the top.
Keep in mind that in all such systems we have, a language, some libraries and an IDE. They are normally all separate even if it's hard to see from the one click install of some set ups.
In this case C++ compiled by mingw, the Qt libraries and the Qt creator IDE.
If it's any consolation, when you are ready to move to Linux it is a one step install, on Debian and Ubuntu for example it's just the command:
$ apt-get install qtcreator
and boom you have a working dev environment.
Trying that now in ubuntu. Getting some errors - "could not open lock file" and "unable to lock the administration directory - are you root?"
Searching for solutions now... Some comments on forums re conflicts with the update manager.
You have to be the "root" user to install stuff, like administrator or whatever in Windows. You can get root privileges in two ways:
1) Issue the command "su" and you will be prompted for the root password. Then you can do your stuff and get back to normal user with "exit"
2) The preferred way. Use the sudo command:
$ sudo apt-get install qtcreator
Assuming sudo is set up correctly, which it normally is in Ubuntu, it will prompt for your normal user password and the execute the apt-get thing. When that is done you will be back as your normal user.
-Phil
Hmm - minor problem. Says it can't find archives. http://au.archive.ubuntu.com precise updates .... not found.
Looks like it is trying to get files from a local cache in Australia given the au prefix. Any way of forcing it to go back to Finland?
Here is some description: https://help.ubuntu.com/community/Repositories/Ubuntu
I would not mess with it unless you really have to.
However, trying to download QtCreator and it says I don't have an internet connection. Which isn't true as it is browsing the internet just fine. I got momentarily distracted with some other nice offerings and am installing IDLE for Python at the moment. Just to prove I can get an IDE working in Ubuntu.
Also downloading Lazarus which is coming up in the Software Centre just under Qt. Installing that too. But Qt isn't downloading (neither the designer not the creator) Maybe it is trying to go to the same source as the command line version?
I like the way the Software Centre is organised. Much easier than searching through the internet. Probably much less risky in terms of viruses and semi-trojans that you get on some sites where they add a toolbar to your browser. Ubuntu software centre is clean and neat. All the popular programs on one page.
Addit - in Ubuntu got Python working and also Mono. Lazarus didn't complete the download. Will try Qt again in a bit.
Favorites?
For sys admin and oracle, Perl and Perl/tk and a few select additional related modules (been years though). Create some nice Solaris packaging tools and clearcase tools
For the prop, PASM; but now moving into C and GAS and Make
All else? dunno yet, not had the need. Can't keep up with all that is changing, used to keep up with Freshmeat when it was a reasonable number of updates a day, now like trying to see what I want to pick out of a rapids......
FF
As to distributions, I use Fedora 17. Use yum and yumx to get more packages as needed. Also good source for this info for Fedora or Centos is a site that is http://www.if-not-true-then-false.com
Good stuff there.
Can't believe the road blocks you are having in the way of getting hold of Qt.
As far as I can tell QtCreator is in not officially supported by Ubuntu so its in the "universe" so you should have "universe" specified in your /etc/apt/sources file. Something like so:
Assuming your using the quantal release.
No idea if you can enable that "universe" from some GUI control.
Here is a useful tool that creates /etc/apt/sources files
http://repogen.simplylinux.ch/
Edit: Hmm...If you can get lazarus I guess you already have "universe" specified.
You could try sourcing from a different country in case your local repos are wonky. Change "au" to "us" or some such.
Just a memo to myself for later - nice summary of IDEs here http://en.wikipedia.org/wiki/Comparison_of_integrated_development_environments
You'll have to please forgive me for being incredibly thick when it comes to installing this program, but I tried the simple way of downloading and running a file and it didn't work, so now I'm trying the method of slavishly copying the instructions *exactly* as they are written, without deviating a single step
I have Qt creator downloaded and running.
In the install instructions you say
Attached is the screenshot after File - New Project.
Where is the "Application" that I need to select?