View unanswered posts | View active topics It is currently Fri Oct 30, 2020 7:13 am






Reply to topic  [ 9 posts ] 
Unable to include header files in robotc 4.25 
Author Message
Rookie

Joined: Sat Aug 30, 2014 10:06 am
Posts: 4
Post Unable to include header files in robotc 4.25
Hey everybody!
Our FTC team recently upgraded to 4.25, and now we can't get any header files to be included properly.

Here is the code that gives us the error:
Code:
#pragma config(Sensor, S4,     ,               sensorI2CCustom)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

#include "libs/smux utils.h"
#include "libs/display.h"

task main()
{

   while(true)
   {

   }
}


Here is the header file we are attempting to include:
Code:
#ifndef SMUX
#define SMUX
// mostly from Xander at botbench
#define SMUX_CMD_HALT 0x00
#define SMUX_CMD_AUTODETECT 0x01
#define SMUX_CMD_RUN 0x02

void smuxSendCmd(tSensors smux, char command)
{
   char sendMsg[4];

   sendMsg[0] = 3;               //size of i2c message
   sendMsg[1] = 0x10;         //address of smux
   sendMsg[2] = 0x20;         //command register
   sendMsg[3] = command;      //Command to send

   sendI2CMsg(smux, sendMsg, 0);
   if(command == SMUX_CMD_AUTODETECT)
      wait1Msec(500);
   if(command == SMUX_CMD_HALT)
      wait1Msec(50);
}

#endif

If anyone has some advice, that would be awesome!


Sat Aug 30, 2014 10:40 am
Profile
Site Admin
Site Admin
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3654
Location: Rotterdam, The Netherlands
Post Re: Unable to include header files in robotc 4.25
What error are you seeing?

= Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Sat Aug 30, 2014 11:45 am
Profile WWW
Site Admin
Site Admin
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3654
Location: Rotterdam, The Netherlands
Post Re: Unable to include header files in robotc 4.25
I can compile this just fine. It is very possible that your include file paths were reset during the upgrade. You may have to set those again.

Image

= Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Sat Aug 30, 2014 11:49 am
Profile WWW
Rookie

Joined: Sat Aug 30, 2014 10:06 am
Posts: 4
Post Re: Unable to include header files in robotc 4.25
The error it gets is this
Code:
**Severe*:Couldn't open '#include' file


It works just fine when the two files are in the same folder, so that's cool. It would be a bit nicer for it to work in sub-folders, so we can have it set up with our main programs in one folder, and have a sub-folder with the headers. I got the include path set up pointing to our main programs folder, so is there a way to include from the "libs" sub-folder?


Sun Aug 31, 2014 5:49 pm
Profile
Site Admin
Site Admin
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3654
Location: Rotterdam, The Netherlands
Post Re: Unable to include header files in robotc 4.25
Can you generate a screenshot of what this part of your preferences looks like?

Image

= Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Mon Sep 01, 2014 12:45 am
Profile WWW
Rookie

Joined: Sat Aug 30, 2014 10:06 am
Posts: 4
Post Re: Unable to include header files in robotc 4.25
This is what it's set up as, is that right?


Attachments:
Capture.JPG
Capture.JPG [ 64.01 KiB | Viewed 9317 times ]
Mon Sep 01, 2014 9:59 am
Profile
Site Admin
Site Admin
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3654
Location: Rotterdam, The Netherlands
Post Re: Unable to include header files in robotc 4.25
If that is where your header files are, then yes :)

= Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Mon Sep 01, 2014 11:31 am
Profile WWW
Rookie

Joined: Sat Aug 30, 2014 10:06 am
Posts: 4
Post Re: Unable to include header files in robotc 4.25
Alright! I fixed the problem by also including 2014-2015 season programs\libs. It works now! Thanks for all your help! :)


Mon Sep 01, 2014 11:38 am
Profile
Site Admin
Site Admin
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3654
Location: Rotterdam, The Netherlands
Post Re: Unable to include header files in robotc 4.25
Awesome!



= Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Mon Sep 01, 2014 11:40 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 9 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.