0

I'm to this whole modularity thing. We were asked to do our own libraries .h and .c files and to call them in main. The main objective of the program is to compare bubble and select sort. So far, I have all the libraries along with their respective .c files. However, I am having problems linking them. I have already placed it into a project file (I'm using Dev-C++) but it wont accept them. Am I doing something wrong??

Any suggestions??

4
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by Sci@phy
0

You need to give us more information. Can you post the link errors that you get ?

Make sure that you have the correct prototypes in the .h files and that you are including the correct .h files in main and your .c files.

0

Please list down the errors you got so that we can help to analyze which parts go wrong.

0

I can't tell you much without any more info.

But just like this:
1. Your .h and .c file need to have the same name
2. In your main function you only include .h file
3. And you have to write:

#include "yourname.h"
//and NOT:
// #include <yourname.h>
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.