Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic include Standard Libs in .h didnt work (Read 3880 times)
zulu
Newbies
*
Offline


Posts: 3
Joined: Jul 15th, 2014
include Standard Libs in .h didnt work
Jul 15th, 2014 at 11:39am
Print Post  
Hi,

im try to include standard lib"bridge.h" in a header file for my own lib.

Code (C++)
Select All
#ifndef MYCLASS
#define MYCLASS

#include "Bridge.h" // did not find lib
#include <Bridge.h> // same

#endif
 



if i include bridge.h in .INO it works.

Greetings Zulu
« Last Edit: Jul 15th, 2014 at 11:40am by zulu »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: include Standard Libs in .h didnt work
Reply #1 - Jul 15th, 2014 at 11:53am
Print Post  
Hi,

Your report is correct so I will assume you are new to Arduino and will give this info.

1) Libraries MUST be imported into the master .ino code
2) C++ files with library #includes will only work if 1) above

Yes, this is how Arduino works.

I am sorry if I have misunderstood
  
Back to top
IP Logged
 
zulu
Newbies
*
Offline


Posts: 3
Joined: Jul 15th, 2014
Re: include Standard Libs in .h didnt work
Reply #2 - Jul 15th, 2014 at 12:11pm
Print Post  
So if my Lib need some Standard-Libs, i must say pls include this and that, so that my component get to work ?
Any other solution ?

Greets Zulu
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: include Standard Libs in .h didnt work
Reply #3 - Jul 15th, 2014 at 12:16pm
Print Post  
Hello,

I am not sure I understand but this might help

With Arduino if your library uses other libraries then all the other libraries must also be included in the [sketch.ino]

-----------------------

The questions you have are the same questions you would have if you used the Arduino IDE for your development.

This forum is to help people with the Arduino plugin. The plugin is 100% Arduino compatible and works the same way that the Arduino IDE works.

This means that you can use the forum at arduino.cc for Arduino questions. At Arduino.cc they have many good experts that will help you.

Thanks
  
Back to top
IP Logged
 
zulu
Newbies
*
Offline


Posts: 3
Joined: Jul 15th, 2014
Re: include Standard Libs in .h didnt work
Reply #4 - Jul 15th, 2014 at 12:18pm
Print Post  
ok thx
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint