Jump to content
  • 0

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


LariSan

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?

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

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.

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...