[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Compiling Qt libraries cross platform

Posted on 2014-02-20
3
Medium Priority
?
335 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 2000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

872 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