Solved

Compiling Qt libraries cross platform

Posted on 2014-02-20
3
302 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Unresolved External Symbols 3 101
Problem to start Neon 20 119
add some character at the end of line in vi 7 91
Where does legacy ASP.NET initialize language? 2 19
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
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…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

790 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