Has somebody installed OBD-II simulator on mac? I tried downloading it from this site - http://icculus.org/obdgpslogger/obdsim.html for OS-X.
After installation and opening ObdGPSLogger, I can see GPS logger window and different parameter gauges. However, after selecting Logfile, and device there is nothing happening.
In the Raw output, below is the error displayed under StdErr:
Dyld: Library not loaded: /Users/chunky/gpsd//lib/libgps.18.dylib
Referenced from: /Applications/OBD GPS Logger.app/Contents/Resources/bin/obdgpslogger
Reason: image not found
Let me know if you guys know the cause
I had the same issue here, but I got it working on a Mac downloading the obdgpslogger-0.16.tar.gz version (in the Tarball section) from this link.
You need to navigate to the downloaded folder and then run the commands:
mkdir build
cd build
cmake ..
make
make install # optional
Related
I'm new to MAC and Xcode since I'm a Windows user and I'm really lost. I finally managed to port my game from Windows to MAC and it works in simulator and all but when I launch the executable I get the next error.
dyld: Library not loaded: /opt/local/lib/libSOIL.dylib
Referenced from: /Users/myUser/Documents/Cotc/CourierOfTheCrypts/DerivedData/CourierOfTheCrypts/Build/Products/Release/CourierOfTheCrypts
Reason: image not found
Trace/BPT trap: 5
logout
I've read a lot of topics about the error but I still don't have a clue about it and how to solve it. All the libraries are copied to the executable folder.
If you need more information please let me know, every bit of help is more than welcome!
EDIT: It turns out /opt/... folder does't exist at all...
The solution to my problem is, to execute the following script for each library:
install_name_tool -id #executable_path/libSOIL.dylib "$CONFIGURATION_BUILD_DIR/libSOIL.dylib"
You enter the script in TARGET settings -> RunScript
I have an Mac OS X app working fine on XULRunner ver 18.0.
Now I am upgrading the XULRunner version from 18.0 to 30.0. Have followed the steps below:
Downloaded the XULRunner 30.0 Runtime
Remove the content from XULRunner.Framework directory
Copied the latest files downloaded in XULRunner 30.0 Runtime
Now while launching the application, I am getting this error:
Dyld Error Message:
Library not loaded: #executable_path/libmozglue.dylib
Referenced from: /Users/USER/Desktop/*/MyApp.app/Contents/MacOS/xulrunner
Reason: image not found
Unfortunately XULRunner is not well supported, but I was able to get around most of the errors and get it working, except for one issue which I will get to later.
Basically, all the instructions I can find for how to structure the bundle are outdated. Mozilla had to restructure the binaries due to changes in the Mac code signing layout requirements. From this bug report and some trial and error I was able to determine the layout requirements.
The first error we can see when running the Contents/MacOS/xulrunner binary from the command line.
Error 1:
dyld: Library not loaded: #executable_path/libmozglue.dylib
The entirety of the XUL.framework contents must be placed into the App's Contents/MacOS/ directory. So to fix this error, copy everything from XUL.framework/Versions/Current into your app's MacOS directory.
Ok, now the binary will run. However, that brings us to the next error which can also be seen from the command line.
Error 2:
Couldn't load XPCOM.
This error is anything but descriptive, but to solve it you simple need to copy the dependentlibs.list file (now in your MacOS directory) to your Contents/Resources/ directory.
Error 3:
Now when you run by the command line, you will get something like the following.
Mozilla XULRunner 36.0.4
Usage: xulrunner [OPTIONS]
xulrunner APP-FILE [APP-OPTIONS...]
OPTIONS
--app specify APP-FILE (optional)
-h, --help show this message
-v, --version show version
--gre-version print the GRE version string on stdout
APP-FILE
Application initialization file.
APP-OPTIONS
Application specific options.
Unfortunately, xulrunner is not automatically finding the application.ini file in Contents/Resources. For testing, we can force it through the command line. Something like the following will do the trick:
./MyApp.app/Contents/MacOS/xulrunner MyApp.app/Contents/Resources/application.ini
At the moment, the only possible solution to this last issue I can offer at the moment is to make a stud loaded, either a shell script or compiled binary that executes the necessary command to run application.ini in xulrunner.
I have a project with a dynamic library and an executable that links against it. I can successfully start it with Xcode, but when I try to run it from the command line, dyld complains about the library not being in the install path:
$ /Users/USER/Library/Developer/Xcode/DerivedData/PROJECT/Build/Products/Debug/EXECUTABLE
dyld: Library not loaded: /usr/local/lib/libMyLib.dylib
Referenced from: /Users/USER/Library/Developer/Xcode/DerivedData/PROJECT/Build/Products/Debug/EXECUTABLE
Reason: image not found
Trace/BPT trap: 5
The problem is quite clear: the library isn't in its advertised install path. However, I don't really want to deploy it there, and besides, Xcode still manages to start my program.
How can I run my program without installing the library in /usr/local/lib?
If you're relying on a dylib, then it needs to be installed in the appropriate location.
Using a framework might help, as you can package it in your application, using #executable_path...
But then, of course, you won't be able to share it across different applications.
So basically, you need to tell Xcode to install your dynamic library.
This can be done in your build settings, in the Deployment section.
Mainly, Deployment location, Installation directory, Skip install, etc...
Note that you can also do this for frameworks, installing them into /Library/Frameworks/
I made project with ImageMagick included. I installed it through macPorts, linked libraries and headers to my project. Everything worked. But when I try to launch my builded app on other computer, where ImageMagick is not installed, it doesn't even opens my app. Says that Os X version is incompatible. If I install ImageMagick to that computer, then app works OK. What should I do to make it working on computers where users does't have ImageMagick? I guess I have somehow to include headers and libraries to my project bundle. But how to do it in correct way to get working? I tried to copy headers and libraries to my project's bundle but then when I try to build it it says that Magick++.h is not found. Can somebody help me?
I added ImageMagick files from where macports installed it (/opt/local/lib/ and /opt/local/include) to my created folder named ImageMagick, then moved that folder to my project and added ImageMagick/** to Library Search Paths and Header Search Paths. Then removed ImageMagick through macports. Project builds successfully, but doesn't runs. It shows error in console:
dyld: Library not loaded: /opt/local/lib/libMagick++.5.dylib
Referenced from: /Users/development/Library/Developer/Xcode/DerivedData/OGL-cahltqazoqxhrthkxztsqyvvodge/Build/Products/Debug/OGL.app/Contents/MacOS/OGL
Reason: image not found
(lldb)
Libs added to Linked Frameworks and Libraries list is in my app's folder and added to my project. Why it searches for it in /opt/local/lib?
I have a problem deploying Qt frameworks with my Mac app, and I hope some will have a clue why I get this error, when I run the app on clean Mac, i.e. not a developer Mac.
OS: 10.7 .2 and using XCode
Error msg:
Library not loaded: #loader_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
Referenced from:/Users/someUser/Downloads/MainApp.app/Contents/Resources/Lib/Library.bundle/Contents/MacOS/../Frameworks/../Frameworks/QtXml.framework/Versions/4/QtXml
Clearly something is wrong since the QtXml is referenced from /../Frameworks/../Frameworks, which doesn’t exists.
This is the set up: I have a dylib that uses QtCore and QtXml (not by my choosing, but for now I need those two frameworks), the dylib is used in a NSBundle, which is loaded by the main app, the bundle is located in the resource folder. The dylib is moved by Copy Files Build Phase to the folder Contents/Frameworks and with otool the install_name is set to (as stated by http://doc.qt.digia.com/4.3/deployment-mac.html):
#loader_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
#loader_path/../Frameworks/QtXml.framework/Versions/4/QtXml
then the Qt frameworks are moved to Contents/Frameworks and the install_name of the is set to:
#executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
and for the QtXml
#executable_path/../Frameworks/QtXml.framework/Versions/4/QtXml
with reference to QtCore:
#executable_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
Now when I run the app on the developer mac it clearly works since Qt is installed, but when moved to a clean mac I get the error msg, readable in the Console app.
I’ve tried to change the executable_path to loader_path, but this didn’t work.
I have no idea what I’m doing wrong or why it won't for, and have not been able to find anything on Google, of course I could be looking at the wrong places. Any ideas how to fix this problem?
This is the entire error message:
MainApp: Error Domain=NSCocoaErrorDomain Code=3587 "The bundle
“Library” couldn’t be loaded because it is damaged or missing
necessary resources."
(dlopen_preflight(/Users/someUser/Downloads/MainApp.app/Contents/Resources/Lib/Library.bundle/
Contents/MacOS/Library): Library not loaded:
#loader_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
Referenced from: /Users/ someUser /Downloads/
MainApp.app/Contents/Resources/Lib/Library.bundle/Contents/MacOS/../Frameworks/../Frameworks/QtXml.framework/Versions/4/QtXml
Reason: image not found) UserInfo=0x107c5d5d0
{NSLocalizedFailureReason=The bundle is damaged or missing necessary
resources., NSLocalizedRecoverySuggestion=Try reinstalling the
bundle.,
NSFilePath=/Users/someUser/Downloads/MainApp.app/Contents/Resources/Lib/Library.bundle/Contents/MacOS/Library,
NSDebugDescription=dlopen_preflight(/Users/someUser
/Downloads/MainApp.app/Contents/Resources/Lib/Library.bundle/Contents/MacOS/Library):
Library not loaded:
#loader_path/../Frameworks/QtCore.framework/Versions/4.0/QtCore
Referenced from:
/Users/someUser/Downloads/MainApp.app/Contents/Resources/Lib/Library.bundle/Contents/MacOS/../Frameworks/../Frameworks/QtXml.framework/Versions/4/QtXml
Reason: image not found,
NSBundlePath=/Users/someUser/Downloads/MainApp.app/Contents/Resources/Lib/Library.bundle,
NSLocalizedDescription=The bundle “Library” couldn’t be loaded because
it is damaged or missing necessary resources.}
On the development mac everything works because the Qt libraries are installed. On any mac you ship the app to, though, this likely won't be the case. The Qt suite comes with a tool called macdeployqt to fix this. So in a terminal, after you've compiled your application, do something like:
# cd my-cool-app-Desktop
# macdeployqt my-cool-app.app
Note that it can also be used to create a .dmg file for shipping everything together:
# cd my-cool-app-Desktop
# macdeployqt my-cool-app.app -dmg
Once you've done that, the .app directory or .dmg file can be given to someone else without Qt installed to use and run as they normally would.
The one caveat is that the next time you try to run it on your developer machine, it may complain about multiple shared libraries installed. So once you've copied it else where in order to distribute it, remove the entire .app directory and let qtcreator (or whatever) rebuild it.
UPDATE
As stated compiling QT to static libs is the way to go. With the release of Mavericks (10.9) we need to codesign frameworks as well (http://furbo.org/2013/10/17/code-signing-and-mavericks/), and with QT4.8.5 there are some issues (https://bugreports.qt-project.org/browse/QTBUG-32896). Even with suggested fixes I still had some issues when running the app on a clean machine. Therefore, I ended up with compiling Qt5.2 to staticlibs, link them in the app, and codesign them.
OLD
Problem sovled, I moved the Qt-frameworks into the app bundle in Contents/Frameworks and with otool set the path to #executable_path/../Frameworks, i.e. moved it out of my library bundle. Yes the solution is simple, but I'm still not sure why the library executable couldn't find the frameworks when using #loader_path.
The best solution would probably be to use a static library and not wrap it in a bundle...you learn everyday ;)