J
J
j642015-11-17 12:01:24
Qt
j64, 2015-11-17 12:01:24

Cross-platform c++ -> Qt\c++, c++\CLI?

I write in c++. I studied Qt and .NET, and then I thought, Qt is only for KDE (linux), and on windows it's a pure .NET program. To do this, I decided to make my classes cross-platform so that the same code produces either pure .NET (that is, all classes are managed) code or pure Qt \ C ++ code, that is, almost completely abandon the standard library. But the fee for cross-platform is high, sometimes you don’t even know how the code will behave. You have to carefully consider a lot of little things.
Question: does it make sense in .NET (C++ \ CLI) to make classes managed, or just make managed wrappers for ordinary unmanaged classes (program model)? But in this case, the compiler will produce managed and unmanaged code. Where calls between them will be slow, and in general, the purity of the code will deteriorate. There will also be external dependencies that are different from .NET dll's.
Let's consider two programs: one will use some of its own library for calculations, and the other will have little of its own code, but there will be many calls to the .NET framework. Where is it more profitable to use pure .NET and where is it mixed? Can .NET and Qt be used purely for the interface, and do the logic itself on the crosses? But then you have to drag all sorts of libraries like boost and the like, and the size of the program will increase.
Regarding Qt for windows and linux: in the second everything is fine, but in the first one you have to drag Qt libraries with you for several meters, and in general, why reject a tool created specifically for the OS - .NET?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
V
Vyacheslav Zolotov, 2015-11-17
@SZolotov

Most importantly, do not express such thoughts at work. Not verbally, not in writing, not in any way. In the middle of the first sentence, the manager will fire you, if you're lucky, then on the second. Toward the end, it can even come to assault.

A
Adamos, 2015-11-17
@Adamos

Have you looked at the weight of .NET libraries? And their support in the terribly outdated, but still common in real life XP?
The question sounds like you yourself don't understand what you need. To interfere with a cross-platform library with dotNet means to lose the dignity of both. And most importantly - WHY?!

V
Vitaly, 2015-11-17
@vt4a2h

Qt is a cross platform library. Why do something of your own if everything has already been done for you? Imagine suddenly wanting to port your application to Mac as well... Will you make your classes cross-platform again, or just write once in Qt and it will work everywhere and the same 95% of the time? The choice is yours in general.

O
Oleg Tsilyurik, 2015-11-17
@Olej

Some kind of utter stupidity: to shove in something that is not shove :-(
... mix cross-platform Qt with some obscene .NET ... you should at least mark the topic with the Windows tag, otherwise C ++ ... what does C ++ have to do with it?

I
iv_k, 2015-11-17
@iv_k

cool. Be sure to also write your compiler and your OS.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question