Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [Solved] Compiling on Ubuntu Linux target
Forum Updated to NodeBB v4.3 + New Features

[Solved] Compiling on Ubuntu Linux target

Scheduled Pinned Locked Moved Mobile and Embedded
2 Posts 2 Posters 5.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Endless
    wrote on last edited by
    #1

    I started developing my application on a Windows 7 system. When the target was ready, I ported it over to the real target system, a Linux Ubuntu box. The app compiles and runs fine in the Windows environment, but when I take the same app and try to compile it in the target, I get the following build issues:

    main.o: Relocations in generic ELF (EM: 3)
    main.o: Relocations in generic ELF (EM: 3)
    could not read symbols: File in wrong format
    collect2: Id returned 1 exit status

    Does anyone have any idea what's going on?

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tobias.hunger
      wrote on last edited by
      #2

      What most likely is happening here is that you build the program on windows and then copied the whole thing over to the ubuntu machine. Alternatively you used a network volume to house the sources. Am I correct?

      Please clean out all the object files and then rebuild. You are still having some of the windows files around and the build system is trying to build those into a linux executable.

      I would also suggest using shadow building as that greatly mitigates this problem by not littering the sources directory with files generated during the build.

      PS: Try out a version control system! Then you can copy your sources to a new machine by simply doing a checkout. Version control systems are great, no project with more than 20 lines of code should do without one! They are a real timesaver, document the history of your code and provide a safety net for your development. Qt Creator does support quite a few different ones:-)

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved