Hi,
In Developer Studio 2.1.0, I wanted to create a library or a header file, just like string.h or stdlib.h, where it can be included when I wanted to create a new project.
I have been trying this but to no avail. I believe this is possible.
Basically, what I wanted to achieve is that I have a few common functions which can be used whenever I create a new project.
Like, I have a function called IsValidName.
Scenario:
test_a.c
#include "string.h"
bool IsValidName(char *name) {
...
return true;
}
void Hello(char *name) {
bool ret = IsValidName(name);
...
}
test_b.c
#include "string.h"
bool IsValidName(char *name) {
...
return true;
}
void Confirm(char *name) {
bool ret = IsValidName(name);
...
}
void Save () { }
Expected:
common.h
#ifndef __COMMON_H__
#define __COMMON_H__
bool IsValidName(char *name);
#endif /* __COMMON_H__ */
test_a.c
#include "string.h"
#include "common.h"
void Hello(char *name) {
bool ret = IsValidName(name);
...
}
test_b.c
#include "string.h"
#include "common.h"
void Confirm(char *name) {
bool ret = IsValidName(name);
}
void Save () { }
Any help is very much appreciated.
Thanks.