Hi Chris,
My name is Jenny and I’m a grad student in Lindsey’s lab. I am setting up Mworks on a new computer in the lab, and when trying to run the Labjack plugin project in Xcode, I’ve been coming across this error. The file exists though, in the liblabjackusb folder. Have you had this issue in the past and do you know how to resolve it?
On another note, I first tried to compile it with a newer version of Xcode (12, now using 10.2 instead) and had some separate issues. Do you expect there to be a version-dependence for running this? Just for my future reference.
Thanks in advance for your help.
Best
Jenny
Hi Jenny,
Assuming you’re building the source code from the LabJackU6_Plug-in repository, it sounds like you need to install the Exodriver package. Among other things, that will create the file /usr/local/include/labjackusb.h
, which is what Xcode needs. (The copy in liblabjackusb isn’t actually used.)
(FYI, I see that a pull request I submitted a while ago still hasn’t been merged. Without this, the plugin will fail to build against MWorks 0.10 and nightly builds from the past year or so.)
As for Xcode version, the latest (currently 12.4) is almost always the right choice. That said, if you’re trying to compile a plugin against an MWorks version that’s more than a year or two old, you may run in to issues when using the latest Xcode. If you want to send me the details of the issues your were having with Xcode 12, I can try to sort them out.
Cheers,
Chris
Hi Chris,
Thanks for your quick reply. I’ve already downloaded the exodriver package and also merged the pull request you mentioned. However, I am still running into the same issue.
After talking to people at LabJack, it seems that it’s actually some issue with Xcode finding the labjackusb.h file. Maybe something to do with folder permissions?
For example, when I originally built the U6 example program in terminal as indicated herehttps://labjack.com/support/software/installers/exodriver, it gave me the same issue, which was that it could not find the labjackusb.h file. However, when I ran it as “sudo make” instead, it was able to do it just fine. I’m wondering whether this is the same issue in Xcode, although I am not sure how to resolve it.
Thanks again.
Jenny
Hi Jenny,
when I originally built the U6 example program in terminal as indicated here, it gave me the same issue, which was that it could not find the labjackusb.h file. However, when I ran it as “sudo make” instead, it was able to do it just fine.
That does sound like a permissions issue. Try running the following commands in Terminal:
sudo chmod go+rx /usr/local /usr/local/include /usr/local/lib
sudo chmod go+r /usr/local/include/labjackusb.h
Hopefully that will resolve the problem. If not, please let me know!
Chris
Worked this time. Thanks so much!