• 0
Sign in to follow this  
LariSan

Mac Osx - Mpide "fatal Error Sys\attribs.h: No Such File Or Directory...

Question

Using the PmodOLED and the chipKIT Cmod--
I was able to make the file work on my work-Windows PC

I downloaded the newest file from the webpage (thanks to previous post:) and got the library into my sketchbook folder.

However, when I tried to compile on my home MacBook, I kept getting this error: 
 

:26: fatal error: sysattribs.h: No such file or directory compilation terminated.

 
Uninstall, reinstall MPIDE. 
Delete all libraries. 
Reinstall it again.
 
Then, went to the MPIDE Icon, held down Control+ click and went to "Show Package Contents" 

Which then I navigated to Contents->MacOSX>Resources>Java>Hardware>pic32>compiler>pic32-tools>include>sys
 
 15773301533_699ae73284_b.jpgScreen Shot 2015-01-28 at 9.39.48 PM by laraswanland, on Flickr
 
... and verified that the file was there.

16205698758_69e17e5f91_c.jpgScreen Shot 2015-01-28 at 9.41.55 PM by laraswanland, on Flickr

...

I reopened MPIDE
Opened the OLED Demo Example
Hit Verify...

Same irritating error.

So I grabbed the sysattribs.h:
and put it into my search bar.

and came up with the file OLEDDriver.cpp
that had it directly referenced.

16205900430_9832ef50db_c.jpgScreen Shot 2015-01-28 at 9.34.08 PM by laraswanland, on Flickr
...

Opened the file up +
found sysattribs.h and it was oddly the only include with a directory slash...
<sysattribs.h>

16205900530_4acf06346c_c.jpgScreen Shot 2015-01-28 at 9.32.36 PM by laraswanland, on Flickr

Tried a few things, but it turns out if you switch the direction of the slash... and hit save...
the file will compile.

<sys/attribs.h>

 

16391561041_47302b5437_c.jpgScreen Shot 2015-01-28 at 9.33.12 PM by laraswanland, on Flickr

16393301675_82f29bdb2a_c.jpgScreen Shot 2015-01-28 at 9.32.49 PM by laraswanland, on Flickr
 

 

So change the <sysattribs.h> to 

<sys/attribs.h>

 

 

 

My thoughts is that there may be a weird syntax that Windows uses that can use the forward-slash, but Mac (and maybe Linux) can't use it?

Is this something other people have noticed?

Edited by Josh
Added Tags

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Yes, Unix (mac, linux) uses / and windows uses . I noticed that in some other older libraries as well. Some software tolerates the difference better than others, MPIDE does not seem to handle it very well. I haven't tried it yet but I'm interested to see if you changed the code to forward slashes and tried compiling it on windows and see if you get the same error.

Share this post


Link to post
Share on other sites
  • 0

Another fix that you could probably do is just get rid of the sys/ from the #include entirely, so that you only have the line

#include <attribs.h>

 

There only is one "attribs.h" file in all of MPIDE that I can find on my windows computer, and the OLED demo compiled just fine without the sys/, so I'm curious as to why the sys/ (or sys) was there in the first place. 

Share this post


Link to post
Share on other sites
  • 0

I did try that but then it wouldn't find the file without the sys (funny because it is an #include)

Changing the direction was the only thing that worked on my Mac.

Linux users tbd...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this