|
-
July 26th, 2010, 12:13 PM
#16
Re: Question about C++, compilers
How should I go about compiling C++ files meant for QT?
Qt is very different from normal C++ libraries. It adds non-standard features to the language, and it includes its own "preprocessor" which you have to put your source files through before feeding them to an actual C++ compiler. You'll have to go to the Qt website for instructions on getting all of that set up.
-
July 26th, 2010, 12:24 PM
#17
Re: Question about C++, compilers
 Originally Posted by ninja9578
Writing C++ on Windows is hell, Windows does not have a make command.
Huh? I must say that having to maintain a makefile is hell compared to using MSVC's project settings... For those that instead love makefiles nmake is part of the express installation package.
-
July 26th, 2010, 01:27 PM
#18
Re: Question about C++, compilers
If you're writing the project it's fine, try compiling wxWidgets for Visual C++ It's not your programs that makefiles are for, I've only written a few makefiles in my whole life, it's all of the libraries that you end up needing that you wish windows had a make function.
If I remember correctly, nmake isn't make compatible. Libraries all use real make files, not Microsoft's interpretation of how make should work.
-
July 26th, 2010, 01:31 PM
#19
Re: Question about C++, compilers
 Originally Posted by ninja9578
If you're writing the project it's fine, try compiling wxWidgets for Visual C++  It's not your programs that makefiles are for, I've only written a few makefiles in my whole life, it's all of the libraries that you end up needing that you wish windows had a make function.
If I remember correctly, nmake isn't make compatible. Libraries all use real make files, not Microsoft's interpretation of how make should work.
Well, you can always use CMake to generate the project files I guess. There are options, anyway.
-
July 26th, 2010, 01:45 PM
#20
Re: Question about C++, compilers
 Originally Posted by Speedo
Qt is very different from normal C++ libraries. It adds non-standard features to the language, and it includes its own "preprocessor" which you have to put your source files through before feeding them to an actual C++ compiler. You'll have to go to the Qt website for instructions on getting all of that set up.
And in doing so requires you to use the 'make' command. Which I get an error for.
And reading on it seems make is not from qt but your compiler?
So I tried to install minGW stand alone and see what this whole make thing is, but the make command still is not recognized.
All I would like to do is build applications with the qt framework!
So I am totally lost at this point?
-
July 26th, 2010, 01:54 PM
#21
Re: Question about C++, compilers
 Originally Posted by Chris Evil
And in doing so requires you to use the 'make' command. Which I get an error for.
A quick check brings up Installing Qt on Windows, which provides examples to the contrary (though it also states that "Open Source Versions of Qt is not officially supported for use with any version of Visual Studio").
 Originally Posted by Chris Evil
So I tried to install minGW stand alone and see what this whole make thing is, but the make command still is not recognized.
You could use mingw32-make, or install MSYS and then use make. I am afraid that I am not clear of the differences.
-
July 26th, 2010, 02:24 PM
#22
Re: Question about C++, compilers
 Originally Posted by laserlight
I recently build Qt using VS2005 following this guide. You have to read well, take things one step at a time and have some perseverance if you want to make it, but it's not impossible. By the way, I don't think this will be easier using another compiler/IDE.
A few problems I ran into:
- Make sure you have enough disk space. Building debug and release libraries (dynamic only, no static ones) took up 10 GB.
- Make sure you run the commands from the command line tool inside Visual Studio. Don't just run "cmd", else the nmake command/program won't work.
- I had to first build the libraries with support for QT3, which would give errors somewhere halfway, then start again building without support for QT3. Probably due to some incorrect dependency in some library, but I didn't bother to investigate.
Cheers, D Drmmr
Please put [code][/code] tags around your code to preserve indentation and make it more readable.
As long as man ascribes to himself what is merely a posibility, he will not work for the attainment of it. - P. D. Ouspensky
-
July 26th, 2010, 02:50 PM
#23
Re: Question about C++, compilers
 Originally Posted by Chris Evil
And in doing so requires you to use the 'make' command. Which I get an error for.
And reading on it seems make is not from qt but your compiler?
Mostly correct. The make utility is sometimes provided by a compiler install, sometimes as a stand-alone utility. More on this below.
So I tried to install minGW stand alone and see what this whole make thing is, but the make command still is not recognized.
All I would like to do is build applications with the qt framework!
So I am totally lost at this point?
Not at all. I haven't tried this in a while, but Nokia supports an IDE and compiler for every platform QT is supported on:
Qt Creator is a new cross-platform integrated development environment (IDE) tailored to the needs of Qt developers. Qt Creator is available bundled together with the latest Qt libraries and additional development tools as part of the Qt SDK, which provides everything you need to get started with cross-platform Qt development in a single install.
Go to the QT downloads page and download the Qt Creator 2.0.0 Binary for Windows. It should give you everything you need to create and build QT projects. I believe there is even a set of tutorials built in.
Apart from what they are, is there no 'native' make command for windows? So are you not mean/encouraged to compile C++ files with windows?
Windows is distributed as a general purpose operating system. You are supposed to install whatever applications you need to make it what you want (at least, that's the theory). As such, it doesn't have native tools for a lot of things.
If you want to do code development, you have to find/buy all the tools you need and install them. Make is not provided as part of the "out of the box" Windows install. I'm not familiar with what is provided by MinGW, although it appears from their web site that make is in there in some fashion (either as part of MinGW or from the msys add on, or both). At one time, Borland C++ also provided a make utility (in the bin folder), not sure if it still does or not. Cygwin can also install make for you. As others have said, Visual Studio provides nmake, which is not fully compatible with make.
A quick check brings up Installing Qt on Windows, which provides examples to the contrary (though it also states that "Open Source Versions of Qt is not officially supported for use with any version of Visual Studio").
Note that this appears to be using the Daily Dev Snapshot of QT which is not something I'd recommend for someone just starting out.
Hope this helps you out. Again, the first thing I would try is using the QT provided IDE as that's where you'll get the best QT support. Good Luck!
Last edited by ajhampson; July 26th, 2010 at 02:55 PM.
Reason: One final comment
-
July 29th, 2010, 02:23 PM
#24
Re: Question about C++, compilers
What I asked about a native make command for windows, what I meant is does it natively have any support for this make command?
I do have qt creator. And it does work, was just interested to get it to 'compile' projects on a more low level - just to understand this whole compilation, QT framework thing...
As for QT with visual studio that's not really what I'm looking for..
Hmmmm...
Would it be an easy task to write a C++ source file with notepad and compile it with MinGW? Without using code::blocks?
-
July 29th, 2010, 02:25 PM
#25
Re: Question about C++, compilers
Yeah, not that hard to compile using gcc.
-
July 29th, 2010, 04:12 PM
#26
Re: Question about C++, compilers
 Originally Posted by Chris Evil
What I asked about a native make command for windows, what I meant is does it natively have any support for this make command?
I thought I answered that:
Windows is distributed as a general purpose operating system. You are supposed to install whatever applications you need to make it what you want (at least, that's the theory). As such, it doesn't have native tools for a lot of things.
If you want to do code development, you have to find/buy all the tools you need and install them. Make is not provided as part of the "out of the box" Windows install. I'm not familiar with what is provided by MinGW, although it appears from their web site that make is in there in some fashion (either as part of MinGW or from the msys add on, or both). At one time, Borland C++ also provided a make utility (in the bin folder), not sure if it still does or not. Cygwin can also install make for you. As others have said, Visual Studio provides nmake, which is not fully compatible with make.
Am I just not understanding your question?
-
August 1st, 2010, 04:18 AM
#27
Re: Question about C++, compilers
The original problem was "working" Qt...
I really recommend to download (and install) the Qt SDK for Windows, witch comes bundled with MingW compiler (and make tool) with qmake (tool specific to Qt for project files, running their "compilers" <moc and uic> that generate c++ code, that can be compiled by mingw) and everything running out_of_the_box (just install and works with Qt Creator IDE)
You just need to add to the PATH if you want to run Qt applications without coping the dll's.
NOTE: if you try to integrate Qt with Codeblocks or other compiler/IDE you will need to provide some batch files (compiler options... etc) to run qmake on the Qt files (the ones with Q_OBJECT classes) because if you don't, the c++ compiler doesn't know what signals/slots(and other Qt language above C++) are, so you can't build from the IDE.
There are some plug-ins for Visual Studio and Eclipse that include all the tools (and possibly you need to build Qt from source, but for VS i think they give pre-build Qt libraries, but i'm not sure, i use Qt Creator for Qt applications )
LE: the link is to the open source (LGPL) version of Qt.
Last edited by Zlatomir; August 1st, 2010 at 04:20 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|