<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">ankit jain</b> <span dir="ltr">&lt;<a href="mailto:ankitguddu@gmail.com">ankitguddu@gmail.com</a>&gt;</span><br>
Date: 2009/5/15<br>Subject: Re: [CMake] unable to include a source file for all sub directories<br>To: Hendrik Sattler &lt;<a href="mailto:post@hendrik-sattler.de">post@hendrik-sattler.de</a>&gt;<br><br><br><br><br><div class="gmail_quote">
<div class="im">2009/5/15 Hendrik Sattler <span dir="ltr">&lt;<a href="mailto:post@hendrik-sattler.de" target="_blank">post@hendrik-sattler.de</a>&gt;</span><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div>Zitat von ankit jain &lt;<a href="mailto:ankitguddu@gmail.com" target="_blank">ankitguddu@gmail.com</a>&gt;:<br>
</div><div><div></div><div class="h5"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Now all files iam getting from folder1 and folder2 and objects of all files<div><br>
including Ident.c is created... But while linking f11.obj f12.obj f21.obj<br>
f22.obj all show error undefined symbol:<br>
char *v1<br>
<br>
where Ident .c contains..<br>
<br>
char v1[]=&quot;Hello&quot;;<br>
</div></blockquote>
<br>
If you want a pointer, declare a pointer, not an array!<br>
If you would use a common header file that is also used in Indent.c(!), you would get something like (I don&#39;t have MSVC at hand but it&#39;s also a C++ compiler):<br>
$ cat a.c<br>
extern char *v1;<br>
char v1[] = &quot;Hallo&quot;;<br>
<br>
$ g++ -c -o a.o a.c<br>
a.c:3: error: conflicting types for `char v1[]&#39;<br>
a.c:1: error: previous declaration as `char*v1&#39;<br>
<br>
while:<br>
$ cat a.c<br>
extern char *v1;<br>
char *v1 = &quot;Hallo&quot;;<br>
<br>
$ g++ -c -o a.o a.c<br>
&lt;no errors&gt;<br><font color="#888888">
<br>
HS<br>
<br>
</font></div></div></blockquote><div>But if it is a pointer problem only then why ity works if i include the same file in the subfolders which need that file. <br>Also i have tried this thing it doesnot make any difference in building with VC++. <br>

</div></div><br>
</div><br>