Miss Marple
Miss Marple

Reputation: 149

app-file not running on different mac

I have created an app-file with Qt. It contains openGL, Qt and c++ code.

My pro file looks like this:

TEMPLATE = app
TARGET = 
DEPENDPATH += .
INCLUDEPATH += .


# Input
HEADERS += openglscene.h \
glwidget.h 

QT += opengl

OTHER_FILES +=

RESOURCES += \
    images.qrc

mac: LIBS += -framework GLUT
else:unix|win32: LIBS += -lGLUT

FORMS +=

I get the following error message, when trying to run the app-file on a different mac:

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000

Application Specific Information:
dyld: launch, loading dependent libraries

Dyld Error Message:
Library not loaded:    /Developer/QtSDK/Desktop/Qt/473/gcc/lib/QtOpenGL.framework/Versions/Current/QtOpenGL
  Referenced from: /Users/USER/Desktop/*/model.app/Contents/MacOS/model
  Reason: image not found

The other macs dont have Qt installed. As it seems I somehow need to include an openGL-framework. How is it possible to do so that other users of my app would be able use it?

Upvotes: 0

Views: 151

Answers (1)

Frank Osterfeld
Frank Osterfeld

Reputation: 25165

You need to include all your application's dependencies including Qt in the app bundle. qmake doesn't take care of this by itself. Qt comes with a little tool, macdeployqt, which might do what you need. A more sophisticated solution is using CMake and DeployQt4.cmake

Upvotes: 1

Related Questions