0
votes

I'm having a lot of trouble trying to compile a resource file (file name is resource.qrc). I'm using PyQt to make an user interface for Maya and I'm doing it in OSX 10.6.8. PyQt, Qt, Sip are working completely fine. I was originally using Windows and compiled my resource file under win7.

I managed to locate the pyrcc4 executable here

/Applications/Autodesk/maya2013/Maya.app/Contents/Frameworks/Python.framework/Versions/2.6/bin/pyrcc4

and here

/usr/local/bin/pyrcc4

but when I use this executable I get the following error

dyld: Library not loaded: libQtCore.4.dylib
Referenced from: /Applications/Autodesk/maya2013/Maya.app/Contents/Frameworks/Python.framework/Versions/2.6/bin/pyrcc4
Reason: image not found
Trace/BPT trap

Am I using the correct pyrcc4 executable? I couldn't find any documentation online about compiling .qrc files under OSX so I'm uncertain. If it is the correct pyrcc4, how can I rectify the issue mentioned above? Is there an alternative way to compile .qrc files under OSX?

I also located the executable rcc under /usr/local/Trolltech/Qt-4.7.1/bin/. Compiling with rcc compiles it in C++ successfully.

Any help would be greatly appreciated

1

1 Answers

0
votes

pyrcc4 seems not to be able to find the Qt libraries.

Try to find the directory wihch the libraries are in and set the LD_LIBRARY_PATH variable to point to it:

export LD_LIBRARY_PATH="/path/to/qt/libs"

or use it directly:

LD_LIBRARY_PATH="/path/to/qt/libs" pyrcc4 <inputs>