Opened 12 years ago
Closed 12 years ago
#35349 closed defect (invalid)
FreeImage @3.15.3 Library not found
Reported by: | juliuspetraska@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.1.2 |
Keywords: | Cc: | ||
Port: |
Description
Installed FreeImage through MacPorts. Everything looked to be OK, but when I builded my app and tried to launch on other computer where is no MacPorts and no FreeImage installed it says
dyld: Library not loaded: /opt/local/lib/libfreeimage.3.dylib Referenced from: /Users/development/Library/Developer/Xcode/DerivedData/freeimage-dxsornyaxqlkyubqwsrlkgszvxhy/Build/Products/Debug/freeimage.app/Contents/MacOS/freeimage Reason: image not found
Shouldn't it copy library files together with my project? I added them to my project's build phases "Copy files" list. They are being copied to my app's bundle. But when I try to link them, I get same error. I don't know why but app is still looking for library in /opt/local/lib. How can I fix it so that I could use FreeImage at my project and run it at any computer?
Change History (1)
comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → invalid |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
This is not a MacPorts problem so you'll have to ask elsewhere for help.
You'll either need to link with a static library, or if you want to link with a dynamic library, then you'll have to copy the dynamic library into your application bundle and use install_name_tool to change its install_name so that it works from its new location, for example by using @executable_path so that it uses a relative path instead of an absolute one.