• AVR Freaks

AnsweredHow to include library project files?

Author
Rian
New Member
  • Total Posts : 11
  • Reward points : 0
  • Joined: 2018/12/10 09:47:37
  • Location: 0
  • Status: offline
2020/03/25 14:44:21 (permalink)
0

How to include library project files?

I followed the steps on this page: https://microchipdeveloper.com/mplabx:libraries, but I can't get it to work. I have also for the moment two functions, each in their own c file in the library project. The header file contains the declaration of those two functions.
 
I've added the library project build file to my current project as shown on the website above. I don't really understand why I should have an empty header file with the name of my library, but with or without that, i get the error that i use functions that are not declared somewhere else: 
warning: implicit declaration of function 'setCursorOnTerminal' is invalid in C99
#1
ric
Super Member
  • Total Posts : 26159
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: online
Re: How to include library project files? 2020/03/25 14:49:56 (permalink) ☼ Best Answerby Rian 2020/03/26 02:29:50
+2 (2)
Rian
I've added the library project build file to my current project as shown on the website above. I don't really understand why I should have an empty header file with the name of my library, but with or without that, i get the error that i use functions that are not declared somewhere else:

Where does it say the header file should be empty?
That error is BECAUSE it is empty.
 

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#2
katela
Super Member
  • Total Posts : 1647
  • Reward points : 0
  • Joined: 2013/06/11 05:25:18
  • Location: South Africa
  • Status: offline
Re: How to include library project files? 2020/03/25 14:56:11 (permalink)
+1 (1)
What you are showing is a warning not an error and I think it's self explanatory that declaration is invalid in C99.
You could try to switch to C90 or show show code and how you are using it.

Free online Microcontroller Tutorials and Projects for Hobbyists and students. From beginners to advanced. Website: www.studentcompanion.co.za
YouTube Tutorials: https://www.youtube.com/StudentCompanionSA
#3
Rian
New Member
  • Total Posts : 11
  • Reward points : 0
  • Joined: 2018/12/10 09:47:37
  • Location: 0
  • Status: offline
Re: How to include library project files? 2020/03/26 02:30:46 (permalink)
0
ric
Rian
I've added the library project build file to my current project as shown on the website above. I don't really understand why I should have an empty header file with the name of my library, but with or without that, i get the error that i use functions that are not declared somewhere else:

Where does it say the header file should be empty?
That error is BECAUSE it is empty.
 





Ok, but why do you have to write a second header file, if al the functions in the library project are defined in the header file inside the library project...?
 
#4
ric
Super Member
  • Total Posts : 26159
  • Reward points : 0
  • Joined: 2003/11/07 12:41:26
  • Location: Australia, Melbourne
  • Status: online
Re: How to include library project files? 2020/03/26 02:41:05 (permalink)
+1 (1)
Why can't you use THAT header file in your project?
 

I also post at: PicForum
Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
NEW USERS: Posting images, links and code - workaround for restrictions.
To get a useful answer, always state which PIC you are using!
#5
Jump to:
© 2020 APG vNext Commercial Version 4.5