Hi,
please help. I am again abusing c. so i get this error :
stra.c:54:29: error: ‘PS_index’ undeclared (first use in this function)
and the function is
PS_Index = function(PS_index, indexData);
so what i am trying to do is :
first file:
Code:
#include <stdio.h>
#include <stdlib.h>
#include "stra.h"
int main (){
char name[] = "index.pif";
uint32_t i = 0;
i= funcIndex (name);
return 0;
}
second file
Code:
#include "stra.h"
struct StraIndex *PS_Index = NULL;
funcIndex(char * name){
PS_Index = func(PS_index, indexData);
}
and header file:
Code:
typedef struct StraIndex{
uint32_t s;
uint32_t *i;
uint32_t *t;
}StraIndex;
so first i would like to create my stra.o so i compile it as :
gcc -c stra.c -o stra.o
and then i get the above error. What would be the proper way to get a global structure inside my object. is that possible or did i misunderstood something.
thnx