0

I'm here today, because I'd like to ask you a question about porting application built with Qt5 to linux. I have been asked to port this application to linux, I don't yet have the source code, but I have Windows binaries, so what I can tell you at this very moment is that: - it's dynamically linked - it depends on (as far as I know): Qt5 libraries [Core, Gui, Sql, Network, OpenGL, Widgets] and libstdc++6.dll, libgcc_s_dw2-1.dll, libwinpthread-1.dll

I did initial research (I'm not C++ developer after all, I just happen to work in linux environment and a friend asked me if it can be ported without much work) and as far as I know:

  • libstdc++6 can be installed on linux
  • libgcc_s_dw2-1 is part of SFML library (GCC 6.1.0 MinGW 32-bit version to be specific) and is also available on linux
  • pthread is Qt5Core dependency and is also available for linux in libpthread library

So it seems like it could be easily ported, but like I said above, I'm not a C++ developer and thus I'm not sure what steps (roughly) should be taken to succeed. Should these three dependencies be linked statically?

@EDIT Just to make it clear - the ultimate goal is to recompile the application, so I should have stated it more clearly - what steps should be taken in order to recompile this application? Are any of these dependencies windows-only that would make it impossible?

  • Almost guaranteed you won't be able to execute the Windows native binaries on Linux without using Wine or a virtual machine. Windows native binaries use the PE file format that Linux simply doesn't support. You could recompile to get Linux binaries, but you obviously need the source code in order to do that. – Matthew Apr 21 '17 at 14:36
  • @Matthew Yes, well, I think I should put that in more clear way - the goal is to recompile the application to work natively on Linux (thus my question about static linking). Once I know if that can be done and how this can be done I will get the source code to recompile it. – pzaj Apr 21 '17 at 14:39
  • @Matthew and don't get me wrong, I know how to compile things on Linux (well, most of the time), but I mainly work with .NET Core and have never really worked on any C++ project on Linux, that's why I'm not sure how to port what I have to Linux. Should it take any additional steps I'd like to know, rather than spend hours trying to figure out what I have missed – pzaj Apr 21 '17 at 14:46
1

Can't answer definitely - but the libraries you list should be okay in Linux. So far, the only library I couldn't compile with on Linux was QtWebEngine which is Chromium based.

Other than that - Qt deals pretty well with adapting to the two OSes.

  • Right, thank you. What about these non-Qt libraries? I'm not sure if I identified the "libgcc_s_dw2-1.dll" well. Any idea what that is (if it's not SFML) and whether it's available for linux? – pzaj Apr 21 '17 at 15:42
  • Not sure about that library... Seems it's part of the compiler... Personally, I'd just try and compile your application source on Linux and then resolve issues if they come up – HorusKol Apr 21 '17 at 15:51
  • alright then, I did more research and it seems like a part of a compiler indeed, so it should be fine too! Thank you :) I will mark your answer as correct then – pzaj Apr 21 '17 at 15:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.