QtCreator broken native compiler messages - qt

There is a known bug in QtCreator: under Windows it cannot handle correctly compiler native messages.
When using MinGW it's all ok since it produces messages in English. But there is no Qt5 binaries for MinGW (and I don't want to build my own ones, since, I guess, it painful process). So I try to use MSVC. But, my MSVC prints error mesages in Russian. After QtCreator processes these messages it shows me something unreadable.
For now google didn't help me how to solve this problem.
Does anybody know the way to configure QtCreator? Or configure MSVC to print errors in English? Or even modify QtCreator's source putting some stub and "fixing" the problem?

Related

QT application on BeagleboneBlack

Hi I have a debian image on BBB I have already installed QT creator on B^3 but the problem is whenever I try to start a new project in qt creator, couldn't see any option of kit. Infact when i add qmake and compiler path the application throws error.
What can I do to solve the problem. Can i directly get the full pack of SDK from qt.io/download ?
You must compile Qt libraries for your device (BBB) on your own, using specified compiler. You can find more information on this topic, here:
Qt Cross-Compilation Options
As soon as you compile Qt libraries for your device, you must move them to appropriate directories (on your BBB).
First, I would suggest learning to cross-compile, it's much faster & more easily maintained when you want to move to new versions. There's a ton of documentation and community around doing this. Windows & Linux both of which are probably dated, but info is still relavent. I've heard it's much easier from a linux host, but that could be biased.
That being said, if you don't want to cross-compile I believe you can simply install the qt embedded libraries. This question may offer some good advice. Once you have the libraries installed, you should be able to use qmake directly to create the Makefile for your project, then you can use cmake, or g++, etc.. to do the actual compiling.
You're likely going to work in command line though, I'm not sure you can run QT Creator on the BBB directly. I could be wrong.

Which c++ compiler to use qt5 win7

trying to create a GUI for the first time.
I've decided to try QT 5.0, but it keeps giving me the error:
error: Qt Creator needs a compiler set up to build. Configure a
compiler in the kit options.
I go into kit options, and I can choose a number of different Visual Studio 11 compilers, or a MinGW compiler.
I have tried pointing the MinGW compiler to several different .exe files in the minGW bin dir, like c++.exe, gcc.exe, g++.exe, etc. I still receive the error message.
Then I read somewhere that I need to use MSVC10 to compile, however I can not find this compiler anywhere.
I just need to create a simple window with a couple labels and text boxes and a button, and I can't even get as far as creating a window.
Thanks for any help
I had to install MSVC2010, and use that compiler.
First configure a compiler in the "Compilers" tab of the "Build & Run" section in the Creator options. Then you can chose a configured compiler in a kit. Then set your project to use that kit.

Qt debug won't stop on breakpoint

I just installed qt creator sdk and the windows debug thing. When I try to debug the debugger comes with the warning:
Preferred debugger engine for debugging binaries of type 'x86-windows-msys-pe-23bit' is not available.
The debugger engine Cdb engine will be used as a fallback
Details: There is no gdb binary available for binaries in format 'x86-windows-msys-pe-32bit'
Then the program start building.
When I set breakpoints into the program the debugger won't stop at de breakpoints. I've tried a lot of things to let the debugger work properly but nothing has helped so far. If anybody has a suggestion please let me know. I think it maybe has something to do with the compiler I'm using which is something like mingw but i have no idea how to set another compiler or something like that
Since you do not know msys, most likely you do not need the msys compiler, try mingw compiler itself from here.
make sure to install gcc, and gdb.
Since you did not mention I assume it is Windows, as a side note, if gdb gave you headache on Windows please use the mingw version bundled with Code::Blocks it is probably older though (look for the one that comes with mingw bundled).
You need to get either gdb/cdb installed with Qt to be able to debug your code. Try editing the options in Tools->Options in Qt Creator and pointing to correct gdb paths. That should solve this problem. There are other options available there to configure the gdb options in the settings dialog.

What should expericenced Unix programmer to be aware of using Microsoft Tools?

I come from UNIX world, I'm quite familiar with Linux, Solaris, Cygwin
and MinGW development. Recently I ported one of my
big projects (cppcms) to support MSVC,
including building static and dynamic libraries with CMake.
And I get all the time absolutely weird issues:
I had CMake build issues because Windows programming
lacks naming convention
for import and static libraries.
Now I discovered that I should use different versions of ICU (debug/release builds) according to the
actual build I do (Debug/RelWithDebInfo -- should use Debug ICU, Release release ICU) and so I should
change actual conventions for searching libraries according to debug/release mode only under MSVC.
Otherwise application just would not start giving a error on missing DLL.
I don't have any such issues under Mingw or Cygwin with GCC, Open Solaris with Sun Studio or Linux with gcc or intel compilers.
And I still have numerous wired issues and wired bugs and very strange behavior -- even some trivial things do not work
under MSVC builds, when everything works absolutely fine under Solaris/Linux/Cygwin/Mingw using GCC from 3.4 up to 4.4,
Sun Studio and Intel compilers). But not under MSVC.
To be honest, I have no idea how to deal with Last one! Because it looks like for me more like environment issues.
I know that the question is not really well defined. I think I'm quite experienced
developer and I know how to write portable and good C++ code. But using Microsoft native
tools drives me crazy with issues I just don't know how to solve.
Question: What should experienced Unix programmer with quite good base in Win32 API should know when it
starts using Genuine Microsoft Tools?
P.S.: Can someone explain why "Release With Debug Info" requires Debug version of MSVC runtime? And why there two versions of runtime exist at all?
P.P.S.: Please note I don't have issues with Win32 API, in fact Windows GCC build works absolutely fine.
Clarifications:
I'm looking for pitfalls that programmer that come from Unix world would may fall into.
For example, when moving from Linux to Solaris: make sure you compile code with -mt or
-pthreads when using multi threaded programs, linking with -lpthread is not enough.
P.S.: Can someone explain why "Release
With Debug Info" requires Debug
version of MSVC runtime?
It doesn't.
And why there
two versions of runtime exist at all?
Because the debug version does more error checking.
And I still have numerous wired issues
and wired bugs and very strange
behavior -- even some trivial things
do not work under MSVC builds,
* What am I doing wrong?
Not telling us what "wired issues and wired bugs and very strange behavior" you get.
* Where should I start?
By telling us the specific errors and problems you encounter.
* What do I miss?
Reading the documentation and learning the tools.
If your question is "What do I read to become a good Windows programmer?" then my answer is: Everything from Jeff Richter, as a start.
There is no magic bullet which will automatically make you an experienced Windows developer. Windows is a very different land compared to Unix. There are lots of quirks, weird behavior, and stuff which is just plain different. The only way to get out with your sanity intact is to tackle the transition one small problem at a time. Concentrate on a specific problem and try to understand the problem. Don't just "get it to work", but really understand what is happening. A good book about Windows programming will help.
There are huge amounts of Windows knowledge and experience accumulated in the SO community, but the only way to access it is to ask concrete questions about specific problems.
The release and debug versions of DLL's use different ways of allocating memory, that is why it is not advisable to mix release and debug versions. If you allocate something in a debug mode DLL and pass it back to the application which was compiled in release mode you may get into trouble.
In the case of your naming issues you may want to have different directories where you place your static / dll's. You can do do this in visual studio by using the configuration manager, not sure how it is under the express version.
I think you need to try and actually understand the new toolset rather than just try and squish it into your current understanding of your existing tools. For that, the best way, IMHO, is for you to try and start to use Visual Studio as Microsoft intended and then once you can build a simple project in the IDE you can move to building it using your preferred make system but do so with an understanding of how the IDE is using its make system to set things up for that build (which WILL work).
So, for example, for part 1 of your question you want to create a simple static library project and a simple dll project and look at the linker options tabs. Jump to the 'Command line' view and you'll see that a DLL uses the /OUT linker option to set the name and location of the dll file and the /LIB linker option to set the name and location of the import library. With a static library only the /OUT option is used and it indicates the name of the static lib. It's true that if you're building a static lib and a DLL from the same source and you have both the /LIB for the dll set to MyCrossPlatformCode.lib and /OUT set to MyCrossPlatformCode.dll then you may have problems if you also build a static lib with an /OUT switch of MyCrossPlatformCode.lib... Simply don't do that; either build the static libs to a different output directory (which is what OpenSSL does), or, better (IMHO), mangle the names somewhat so that you have MyCrossPlatformCode.lib/.dll and MyCrossPlatformCode_static.lib (which is what STLPort does).
Note that you might also want to mangle in (or account for) building with different versions of the Microsoft tool chain (so you might end up with stlport_vc8_x64d_static.5.1, perhaps).
An alternative approach, if you really can't face the thought of understanding your toolset, is that you could take a look at some of the popular open source systems that build quite fine on Windows and Unix systems; OpenSSL and STLPort for a start, perhaps.

Problem installing QT on Vista

I have downloaded QT SDK LGLP (Creator + libraries) 4.6 and I am having problems compiling projects. After install I have added C:\Qt\2010.02\qt;C:\Qt\2010.02\qt\bin to PATH and added QTDIR env varaible containing C:\Qt\2010.02\qt, the I run "configure -platform win32-g++" to compile it. Everything went good.
I the tried to use QT Creator to create and compile a project.
The problem is everytime I try to compile I get the following error message:
No valid Qt version set. Set one in Tools/Options
Error while building project GUITest
When executing build step 'QMake'
Canceled build.
When I go to Tools/Options the manual version is set to v4.6.2, Location c:\qt\2010.02\qt\bin\qmake.exe. The auto detected version is set to even though I have added the dirs in Path. Is there something I am doing wrong here? Has anyone encountered this problem in Vista.
I have been working on this for 2 days, change configurations, reinstalled etc...
The QtDir value is compiled into the
qmake-binary. You can only change this
by recompiling qmake and passing on a
different value to qt-configure (I'm
not sure which setting or variable is
passed on to qmake) When using
precompiled, downloaded binaries,
you'll have to keep the QtDir at
c:\Qt\4.6.2
EDIT:
What I said was incorrect. The locations of qmake, moc,... are located in the file:
<Qt>/4.x.x/.qmake.cache
Try uninstalling/reinstalling qt creator
But i highly suspect you didnt compile qt properly as this problem seems really odd. I had alot of problems compiling so i know myself from the past mistakes.
Make sure you carefully reread install instructions for your environment, also if you have visual studio you need to follow procedure to install it in compliance with it. Same if you use another c compiler
If nothing goes right, the easiest way to install qt imo is directy from their git hub, chec installin qt from git, on their git site there is wiki that explains how to do it
its really easy and after that all you need to do is add the qt to creator
Hey, it QT emulators have lot of problems in vista, i have tried several times,it didnt work for me.. it works well with windows XP. though ill tell you in brief what you need to do
1)install latest perl
2)install carbide c++ editor
3)install Qt SDK
4)install s60 or N97 emulators
make sure that except perl all the items which are mentioned above will be in same drive,and also
make sure that folder names which you give while installation should not have spaces at all..
i.e suppose if you are going to place any of the above items in a folder whose name is having spaces it will not work.
if you have any doubts feel free to ask.

Resources