Zitat von ankit jain <ankitgu...@gmail.com>:
Now all files iam getting from folder1 and folder2 and objects of all files
including Ident.c is created... But while linking f11.obj f12.obj f21.obj
f22.obj all show error undefined symbol:
char *v1

where Ident .c contains..

char v1[]="Hello";

If you want a pointer, declare a pointer, not an array!
If you would use a common header file that is also used in Indent.c(!), you would get something like (I don't have MSVC at hand but it's also a C++ compiler):
$ cat a.c
extern char *v1;
char v1[] = "Hallo";

$ g++ -c -o a.o a.c
a.c:3: error: conflicting types for `char v1[]'
a.c:1: error: previous declaration as `char*v1'

while:
$ cat a.c
extern char *v1;
char *v1 = "Hallo";

$ g++ -c -o a.o a.c
<no errors>

HS


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to