<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Problem mit headern]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich will andere c-Dateien in mein Projekt einbinden, leider wird das irgendwie nichts,</p>
<p>hier mal meine Dateien:</p>
<pre><code>#ifndef TEST_H
#define TEST_H
#include &lt;stdio.h&gt;
#include &lt;windows.h&gt;

extern int check(void);

#endif
</code></pre>
<pre><code class="language-cpp">#include &lt;stdio.h&gt;
#include &lt;windows.h&gt;
#include &lt;test.h&gt;

int  WinMain( HINSTANCE hInstance,
                                   HINSTANCE hInstance_2,
                                  LPSTR CmdLine, int Show ) 

{

check();

	return 0;
}
</code></pre>
<p>test.c<br />
[cpp]<br />
#include &lt;test.h&gt;<br />
#include &lt;windows.h&gt;<br />
#include &lt;stdio.h&gt;</p>
<p>int check (void)<br />
{<br />
int a=1;<br />
int b=0;<br />
FILE *file;</p>
<p>file=fopen(&quot;check.txt&quot;,&quot;r+&quot;);</p>
<p>if (file==NULL)<br />
{<br />
file=fopen(&quot;check.txt&quot;,&quot;w+&quot;);<br />
fprintf (file,&quot;%i&quot;,a);<br />
fclose(file);<br />
return 0;<br />
}</p>
<p>else<br />
{<br />
fscanf(file,&quot;%i&quot;, &amp;b);<br />
b=b+1;<br />
fclose(file);</p>
<p>file=fopen(&quot;check.txt&quot;,&quot;w+&quot;);<br />
fprintf(file,&quot;%i&quot;,b);<br />
fclose(file);<br />
return b;<br />
}</p>
<p>return 0;</p>
<p>}</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/171832/problem-mit-headern</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Jul 2026 03:27:05 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/171832.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 29 Jan 2007 20:04:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem mit headern on Mon, 29 Jan 2007 20:04:11 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich will andere c-Dateien in mein Projekt einbinden, leider wird das irgendwie nichts,</p>
<p>hier mal meine Dateien:</p>
<pre><code>#ifndef TEST_H
#define TEST_H
#include &lt;stdio.h&gt;
#include &lt;windows.h&gt;

extern int check(void);

#endif
</code></pre>
<pre><code class="language-cpp">#include &lt;stdio.h&gt;
#include &lt;windows.h&gt;
#include &lt;test.h&gt;

int  WinMain( HINSTANCE hInstance,
                                   HINSTANCE hInstance_2,
                                  LPSTR CmdLine, int Show ) 

{

check();

	return 0;
}
</code></pre>
<p>test.c<br />
[cpp]<br />
#include &lt;test.h&gt;<br />
#include &lt;windows.h&gt;<br />
#include &lt;stdio.h&gt;</p>
<p>int check (void)<br />
{<br />
int a=1;<br />
int b=0;<br />
FILE *file;</p>
<p>file=fopen(&quot;check.txt&quot;,&quot;r+&quot;);</p>
<p>if (file==NULL)<br />
{<br />
file=fopen(&quot;check.txt&quot;,&quot;w+&quot;);<br />
fprintf (file,&quot;%i&quot;,a);<br />
fclose(file);<br />
return 0;<br />
}</p>
<p>else<br />
{<br />
fscanf(file,&quot;%i&quot;, &amp;b);<br />
b=b+1;<br />
fclose(file);</p>
<p>file=fopen(&quot;check.txt&quot;,&quot;w+&quot;);<br />
fprintf(file,&quot;%i&quot;,b);<br />
fclose(file);<br />
return b;<br />
}</p>
<p>return 0;</p>
<p>}</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1219400</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1219400</guid><dc:creator><![CDATA[Mo89]]></dc:creator><pubDate>Mon, 29 Jan 2007 20:04:11 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit headern on Mon, 29 Jan 2007 20:19:40 GMT]]></title><description><![CDATA[<p>Mo89 schrieb:</p>
<blockquote>
<p>leider wird das irgendwie nichts</p>
</blockquote>
<p>Eigentlich schade.</p>
<p>Möglicherweise hilft es, &quot;test.h&quot; anstatt &lt;test.h&gt; einzubinden. Ansonsten wirst du nur weiterkommen, wenn du uns die Fehlermeldungen deines Compilers oder Linkers mitzuteilen geruhst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1219412</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1219412</guid><dc:creator><![CDATA[audacia]]></dc:creator><pubDate>Mon, 29 Jan 2007 20:19:40 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit headern on Mon, 29 Jan 2007 20:22:10 GMT]]></title><description><![CDATA[<p>Hallo!</p>
<p>Inzwischen habe ich folgendes probiert:</p>
<p>check auch in der c datei extern deklarieren und &quot; &quot;'s machen beim includen</p>
<p>Hier mal die Fehlermeldungen:</p>
<p>POLINK: error: Unresolved external symbol '_check'.<br />
POLINK: fatal error: 1 unresolved external(s).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1219418</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1219418</guid><dc:creator><![CDATA[Mo89]]></dc:creator><pubDate>Mon, 29 Jan 2007 20:22:10 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit headern on Mon, 29 Jan 2007 20:28:41 GMT]]></title><description><![CDATA[<p>Laß das &quot;extern&quot; in beiden Fällen einfach weg. Bei Funktionsdeklarationen wird das implizit angenommen.</p>
<p>Damit der Linker die Funktionsdefinition findet, mußt du ihm natürlich beide Objektdateien übergeben. Wie es scheint, übergibst du ihm das Modul test nicht.</p>
<p>Btw, das gehört eher ins ANSI-C-Forum.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1219422</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1219422</guid><dc:creator><![CDATA[audacia]]></dc:creator><pubDate>Mon, 29 Jan 2007 20:28:41 GMT</pubDate></item></channel></rss>