Solved

Compiling Qt libraries cross platform

Posted on 2014-02-20
3
288 Views
Last Modified: 2014-02-24
HI Experts,

I'm curious to know what's the best regarded way to write code for cross platform when using Qt?  Do most people choose Visual Studio for Windows and most use gcc on linux, all with the same source, but with different projects?  Or do these projects all compile from makefiles that are recognized by most major compilers?  It doesn't seem like you write once, build anywhere...  Seems more like write once, write again, fix up tweak, tweak some more...  Am I missing something?

I'd love to hear some of your tricks of the trade.  Even if you don't think they're the best -cuz they're probably better than you think...

Thanks,
Mike
0
Comment
Question by:thready
  • 2
3 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 39875867
Well, using QT Creator, you won't even face these problems, since it transparently let's you select the toolchain you want to use. Apartrt from that, Makefiles work on all platforms.
0
 
LVL 1

Author Comment

by:thready
ID: 39884539
That's what I'm using.  I downloaded the qca project, opened up Qt Creator from the .pro file.  I hit build - the only thing available to build with on my machine is MinGW, so I chose that one.  The build seems to compile for a while and then I hit compile errors.  I thought maybe they didn't test with building with MinGW and maybe there are differences in compiler errors.  Now I'm trying with Visual Studio Express and I get the same issues.  I guess I'm making my life difficult in using this library, or I'm configuring something wrong.  Not sure what to think.  I'll hit up some youtube videos to get more acquainted with Qt.
0
 
LVL 1

Author Closing Comment

by:thready
ID: 39884562
The qca project depends on Qt 4.2 and I'm on 5.2.1.  Go figure.  :)
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now