Important: Please read the Qt Code of Conduct -

Segmentation Fault - Port from Windows to Linux

  • Hello

    I am trying to solve this problem for two days now and I really dont know what to do anymore.
    The application works on windows 7 with this configuration:

    Qt 5.10.0 (i386-little_endian-ilp32 shared (dynamic) release build; by MSVC 2015) on "windows"
    OS: Windows 7 SP 1 (6.1) [winnt version 6.1.7601]
    Architecture: x86_64; features: SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX
    Qt Creator 4.6.0-beta1 (4.5.82)

    and I want to port it to my raspberry pi with debian stretch:

    QT 5.7.1
    OS: Raspbian GNU/Linux 9 (stretch)
    QT Creator 4.2.0

    Compiler on linux is GCC-6 and on windows: MinGW 4.9.2

    My problem is:

    the app crashes when I call Qapplication with Segmentation Fault .



    i tried open a new project on linux and copy the single files to it from the old project but that did not help. I tried to rebuild everything and run qmake but nothing helps.
    Help would really be appreciated!!

  • I've usually found that this is because of a missing shared library. Run ldd on your application and see if anything is missing.

  • I found the fault , it was one line of code which was completely annoying!

    could somebody explain to me please why this worked in windows but not on linux..very strange: I just deleted the marked line on the first picture below...maybe because the same name ("socket") was used in the header and the source file? I dont know but the windows compiler didnt have any problems with it..

    2_1522195955708_fault1.JPG 1_1522195955708_fault2.JPG 0_1522195955705_fault3.JPG

Log in to reply