armadsen / ORSSerialPort

Serial port library for Objective-C and Swift macOS apps
MIT License
753 stars 183 forks source link

Using ORSSerialPort in a command line tool #113

Closed ladislas closed 7 years ago

ladislas commented 8 years ago

Hi there!

Based on your command line example, I've made a command line tool to test different arduino programs.

I installed the ORSSerialPort as a Xcode subproject following the wiki. When building inside of Xcode, everything works fine, but if I try to run the binaries from the command line, it fails saying it can't find the libraries.

This issue on stackoverflow seems to say there is no solutions.

But i was wondering if you had any advice.

Btw, doing it like you do in your examples works fine (adding the files by hand).

armadsen commented 7 years ago

Sorry it took so long to reply to this. The most upvoted answer in that Stack Overflow question is correct. You would have to put ORSSerial.framework in one of the standard system framework directories. You're probably better off including ORSSerialPort as source. Alternatively, you could do what the other answer mentions, which is to build a static library for ORSSerialPort instead of a dynamic framework, then link the static library into your command line program.