<br><br><div class="gmail_quote">2009/5/15 Hendrik Sattler <span dir="ltr">&lt;<a href="mailto:post@hendrik-sattler.de">post@hendrik-sattler.de</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">Zitat von ankit jain &lt;<a href="mailto:ankitguddu@gmail.com" target="_blank">ankitguddu@gmail.com</a>&gt;:<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Linker error for many objects files that have created<br>
</blockquote>
<br>
So either the object file that contains the symbol is not part of your link command or you have a coding error.<br>
Since you release neither an example nor further information, you will probably not get any other answer.<br><font color="#888888">
<br>
HS<br>
</font></blockquote><div>Eg:<br><br>main<br>...Ident.c<br>....folder1<br>.......f11.c<br>.......f12.c<br>...folder2<br>......f21.c<br>......f22.c<br><br>Now if this Ident.c is there in each folder1 and folder2 then it works well.. but since it is outside folder1 and fodler2 so while linking neither f11 f12 f21 f22 will be able to link Ident.c<br>
<br>iam making library main as:<br>...CMakeLists of main folder.<br><br>foreach(fname ${folder1_srcs})<br>list(APPEND main_srcs folder1/${fname})<br>endforeach(fname)<br><br>foreach(fname ${folder2_srcs})<br>
list(APPEND main_srcs folder2/${fname})<br>
endforeach(fname)<br>
<br>list(APPEND main_srcs Ident.c)<br>add_library(main SHARED ${main_srcs})<br><br> <br></div></div>CMakelist of folder1...<br><br>set(folder1_srcs f11.c f12.c)<br>set(folder1_srcs ${folder1_srcs} PARENT_SCOPE)<br><br>CMakelist of folder2...<br>

<br>
set(folder2_srcs f21.c f22.c)<br>
set(folder2_srcs ${folder2_srcs} PARENT_SCOPE)<br>
<br>
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:<br>char *v1<br><br>where Ident .c contains..<br>
<br>char v1[]=&quot;Hello&quot;;<br><br><br>I this example give you idea what iam trying to do...<br><br>Ankit<br><br><br>