View unanswered posts | View active topics It is currently Fri Sep 19, 2014 10:39 am

Reply to topic  [ 3 posts ] 
Including .h files 
Author Message

Joined: Wed Mar 19, 2014 10:39 am
Posts: 7
Post Including .h files
I need access to some of the .h libraries for programs I've been writing. Whenever I try to run my programs, I get this error:
Couldn't open '#include' file

I've tried saving my programs in several different locations so they'll be on the same path (ex: I saved several directly in the 'ROBOTC Development Environment' folder), but I still get this message.

I've tried this #include header (the way it was in the sample program):
#include "drivers/hitechnic-compass.h"

As well as this:
#include "C:\Program Files (x86)\Robomatter Inc\ROBOTC Development Environment\drivers\hitechnic-compass.h"

Where should I save the files or how should I write #include statements so I can use .h libraries?

Wed Mar 19, 2014 1:29 pm
User avatar

Joined: Sat Aug 31, 2013 9:15 am
Posts: 104
Post Re: Including .h files
This can actually be solved by telling ROBOTC where to look for certain #include files (such as the third party drivers). Navigate in the menus to View->Preferences->Detailed Preferences->Compiler. Under "Directory for User Include Files (Common)" click the first browse button. Navigate to Program Files (or Program Files x86)/Robomatter Inc/ROBOTC Development Environment/Sample Programs/NXT/3rd Party Sensor Drivers/drivers and select it. Voila! You should be all set.

Burning Lights Programming
FTC Team 6100 Chariots of Fire - Programmer (2012-2013)
FTC Team 7468 Blue Chariots of Fire - Programmer (2013-2014)
Check out our team website at

Wed Mar 19, 2014 2:01 pm

Joined: Wed Mar 19, 2014 10:39 am
Posts: 7
Post Re: Including .h files
Thank you, this worked great!
As a band aide, I also found .h files can be copied and pasted into file folders outside of the Robomatter folder. If the robotc files are written there as well, this works for me by default.

Thu Apr 10, 2014 11:54 pm
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.