I have a c codes which can be compiled in Linux using gcc. But when I try to compile it using microsoft visual studio c++ 2008 express edition, using the ide, it shows the error
vec.obj : error LNK2005: _INIT_SETA already defined in a.obj
fatal error LNK1169: one or more multiply defined symbols found
I checked the header files, and all of them have the preprocessor guard to prevent the header to be included multiple times, e.g.
#ifndef _vec_h_
#define _vec_h_
Then I tried compiling it in visual studio command prompt,
cl main.c
It can be compiled. What is the problem?