Hi,
I've a problem, could you help me, please?
error LNK2001: unresolved external symbol _myvar
Thanks in advance.
Davinia.
//mimain.cpp
#include <stdlib.h>
extern "C"{
#include "mv_example.h"
}
int main()
{
if (myvar == NULL)
myfunction(myvar);
return 1;
}
//m_example.c
#include "mv_example.h"
int myfunction(MY_STRUCT *var)
{
int a;
a=2;
return a;
}
//m_example.h
#ifndef M_EXAMPLE_H
#define M_EXAMPLE_H
typedef struct my_struct
{
int a;
int b;
} MY_STRUCT;
#endif
//mv_example.h
#include "m_example.h"
#ifdef M_MODULE_EXAMPLE
MY_STRUCT *myvar = NULL;
int myfunction(MY_STRUCT *myvar);
#else
extern MY_STRUCT *myvar;
extern int myfunction(MY_STRUCT *myvar);
#endif
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---