Results 1 to 9 of 9

Thread: not the architecture being linked

  1. #1

    Default not the architecture being linked

    I'm trying to compile a program - written on a pc - on a mac, but it doesn't work. I Get the following warning:

    ld: warning: in ./external/mongo/libmongoclient.a, file was built for unsupported file format which is not the architecture being linked (i386)

    and then:

    ld: symbol(s) not found
    collect2: ld returned 1 exit status
    make: *** [sökväg_till_programmet] Error 1
    make: Leaving directory `sökväg_till_programmet'
    Exited with code 2.
    Error while building project Programmet
    When executing build step 'Make'

    Anyone have an idea of what it can be and what to do?
    Last edited by skizzik; 13th October 2010 at 15:45.

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: not the architecture being linked

    Remove the Makefile file, clean the project completely (remove all generated files and object files), then rerun qmake and build the program.

  3. #3

    Default Re: not the architecture being linked

    Now I have tested it, but with the same result.

  4. #4
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: not the architecture being linked

    Then you obviously have something platform specific in either your code or your .pro file.

    Post your .pro file please.

  5. #5

    Default Re: not the architecture being linked

    QT += network sql
    TEMPLATE = app
    CONFIG += x86
    SOURCES=...
    HEADERS=...
    FORM=...
    LIBS += -L"./map" -L"/opt/local/lib"
    INCLUDEPATH += "./map" "/opt/local/include"
    LIBS += -lmongoclient

  6. #6
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: not the architecture being linked

    libmongoclient.a, is that a library you made?
    Is it runable on your mac?

  7. #7

    Default Re: not the architecture being linked

    it comes from a open source db, mongodb, which should run on mac

  8. #8
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: not the architecture being linked

    Did you compile it yourself? On the mac?
    Or did you copy if from somewhere else?

  9. #9

    Default Re: not the architecture being linked

    I think I got mongodb to work, but still have problems with a few others: libboost_thread-mt.dylib
    and some more files from macport. Macport were installed when I came to this computer. The files have x86_64 arch and I don't know how to get them to i386.

Similar Threads

  1. How can we use dynamically linked lib in QT?
    By learning_qt in forum Qt Programming
    Replies: 3
    Last Post: 16th December 2008, 14:04
  2. Deploy app under many Mac OS and architecture
    By mourad in forum Installation and Deployment
    Replies: 2
    Last Post: 8th April 2008, 11:31
  3. Plugin Architecture
    By jtaylor108 in forum Newbie
    Replies: 2
    Last Post: 8th April 2008, 07:32
  4. Linked List
    By merry in forum Qt Programming
    Replies: 10
    Last Post: 14th March 2007, 08:07
  5. Qt Cryptographic Architecture
    By vermarajeev in forum Qt Programming
    Replies: 6
    Last Post: 9th February 2007, 14:15

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.