<?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[DLL: undefined reference... steht doch in der resource.h??]]></title><description><![CDATA[<p>Hi all,<br />
wie ich euch schon so viel zugespamt habe, mache ich gerade DLLs und stelle (oder würde halt gerne) ein Projekt auf DLLs um.</p>
<p>das ist mein Problem:</p>
<p>1.c</p>
<pre><code class="language-cpp">#include &quot;resource.h&quot;
int bla( void )
{
  blubb();
}
</code></pre>
<p>2.c</p>
<pre><code class="language-cpp">#include &quot;resource.h&quot;
int blubb( void )
{
  printf( &quot;bla&quot; );
}
</code></pre>
<p>resource.h</p>
<pre><code class="language-cpp">int bla( void );
int blubb( void );
</code></pre>
<p>jetzt mache ich</p>
<pre><code>gcc -shared -o dll/1.dll 1.c -O3 -Wall
</code></pre>
<p>und dann kommt</p>
<pre><code>undefined reference to &quot;blubb&quot;
</code></pre>
<p>why? In der header steht doch das es die Funktion gibt... wie sag ich das sie in einer anderen DLL steht, also nciht geladen werden soll?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/218635/dll-undefined-reference-steht-doch-in-der-resource-h</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Apr 2026 18:23:47 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/218635.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 23 Jul 2008 08:11:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to DLL: undefined reference... steht doch in der resource.h?? on Wed, 23 Jul 2008 08:11:33 GMT]]></title><description><![CDATA[<p>Hi all,<br />
wie ich euch schon so viel zugespamt habe, mache ich gerade DLLs und stelle (oder würde halt gerne) ein Projekt auf DLLs um.</p>
<p>das ist mein Problem:</p>
<p>1.c</p>
<pre><code class="language-cpp">#include &quot;resource.h&quot;
int bla( void )
{
  blubb();
}
</code></pre>
<p>2.c</p>
<pre><code class="language-cpp">#include &quot;resource.h&quot;
int blubb( void )
{
  printf( &quot;bla&quot; );
}
</code></pre>
<p>resource.h</p>
<pre><code class="language-cpp">int bla( void );
int blubb( void );
</code></pre>
<p>jetzt mache ich</p>
<pre><code>gcc -shared -o dll/1.dll 1.c -O3 -Wall
</code></pre>
<p>und dann kommt</p>
<pre><code>undefined reference to &quot;blubb&quot;
</code></pre>
<p>why? In der header steht doch das es die Funktion gibt... wie sag ich das sie in einer anderen DLL steht, also nciht geladen werden soll?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1552172</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1552172</guid><dc:creator><![CDATA[lippoliv]]></dc:creator><pubDate>Wed, 23 Jul 2008 08:11:33 GMT</pubDate></item><item><title><![CDATA[Reply to DLL: undefined reference... steht doch in der resource.h?? on Wed, 23 Jul 2008 08:23:01 GMT]]></title><description><![CDATA[<p><em>undefined reference to &quot;blubb&quot;</em><br />
sagt einem ja auch das die entsprechende lib o.ä. fehlt...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1552184</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1552184</guid><dc:creator><![CDATA[gosha16]]></dc:creator><pubDate>Wed, 23 Jul 2008 08:23:01 GMT</pubDate></item><item><title><![CDATA[Reply to DLL: undefined reference... steht doch in der resource.h?? on Wed, 23 Jul 2008 09:02:05 GMT]]></title><description><![CDATA[<p>Ja das ist klar... aber das soll ja auch so sein... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /><br />
Wenn ich nämlich die lib da noch mit einbinde, wird ja jede dll immer größer und ich habe 8 DLLs die sich fast alle gegenseitig nutzen...</p>
<p>Wie greife ich aus einer DLL auf die Funktion einer anderen zurück, ohne die eine DLL in die andere DLL zu compilen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
<p>[edit]ich mache in der Header aus</p>
<pre><code class="language-cpp">int bla( void );
int blubb( void );
</code></pre>
<p>euinfach</p>
<pre><code class="language-cpp">typedef int (*b)(void);
b bla;
typedef int (*bl)(void);
bl blubb;
</code></pre>
<p>dann meckert er nich... dann muss ich noch die funktionen laden udn dann sollte es gehen oder? hoffentlich xD...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1552191</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1552191</guid><dc:creator><![CDATA[lippoliv]]></dc:creator><pubDate>Wed, 23 Jul 2008 09:02:05 GMT</pubDate></item><item><title><![CDATA[Reply to DLL: undefined reference... steht doch in der resource.h?? on Wed, 23 Jul 2008 12:01:58 GMT]]></title><description><![CDATA[<p>So dass Programm compiliert, jetzt ist aber was eigenartig... Ich habe ne LRESULT CALLBACK in einer dll und die findet er nicht...</p>
<p>Können die in eine DLL geschoben werden?</p>
<p>dll</p>
<pre><code class="language-cpp">LRESULT CALLBACK _WndProc( HWND myWnd, UINT wndMsg, WPARAM wParam, LPARAM lParam )
</code></pre>
<p>header</p>
<pre><code class="language-cpp">typedef LRESULT CALLBACK (*WP)(HWND, UINT, WPARAM, LPARAM);
WP WndProc = NULL;						//LRESULT CALLBACK WndProc( HWND, UINT, WPARAM, LPARAM );
</code></pre>
<p>prog</p>
<pre><code class="language-cpp">HMODULE prog;
prog = LoadLibrary( &quot;dll/prog.dll&quot; );
//...
if( prog )
{
    //...
	printf( &quot;%d\n&quot;, GetLastError() );//0
    WndProc = (WP)GetProcAddress( prog, &quot;_WndProc&quot;);
	printf( &quot;%d\n&quot;, GetLastError() );//127 == ERROR_PROC_NOT_FOUND
    //...
}
</code></pre>
<p>Jemand ne idee?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1552340</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1552340</guid><dc:creator><![CDATA[lippoliv]]></dc:creator><pubDate>Wed, 23 Jul 2008 12:01:58 GMT</pubDate></item><item><title><![CDATA[Reply to DLL: undefined reference... steht doch in der resource.h?? on Tue, 29 Jul 2008 08:42:12 GMT]]></title><description><![CDATA[<p>Ich habe inzwischen 4 solche Funktionen die alle nicht geladen werden können, scheint also daran zu liegen das sie LRESULT CALLBACK sind...</p>
<p>Weiß da jemand eine Lösung?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1555441</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1555441</guid><dc:creator><![CDATA[lippoliv]]></dc:creator><pubDate>Tue, 29 Jul 2008 08:42:12 GMT</pubDate></item><item><title><![CDATA[Reply to DLL: undefined reference... steht doch in der resource.h?? on Tue, 29 Jul 2008 09:24:56 GMT]]></title><description><![CDATA[<p>ich versteh nicht was du willst aber ich sag mal &quot;name mangling&quot;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1555478</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1555478</guid><dc:creator><![CDATA[SocialEntrepreneur]]></dc:creator><pubDate>Tue, 29 Jul 2008 09:24:56 GMT</pubDate></item><item><title><![CDATA[Reply to DLL: undefined reference... steht doch in der resource.h?? on Tue, 29 Jul 2008 17:16:21 GMT]]></title><description><![CDATA[<p>Du musst bloss gegen die import-lib der anderen DLLs linken.<br />
Diese werden beim Übersetzen zusätzlich generiert, und sollten DllName.lib heissen.</p>
<p>Wenn du Abhängigkeits-Schleifen hast (A depends on B depends on C depends on A), dann musst du wenigstens eine der DLLs so übersetzen dass erstmal nur die import-lib generiert wird (das geht obwohl die anderen import-libs noch fehlen), und nachdem dann alle import-libs da sind übersetzt du die DLL nochmal normal.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1555824</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1555824</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Tue, 29 Jul 2008 17:16:21 GMT</pubDate></item><item><title><![CDATA[Reply to DLL: undefined reference... steht doch in der resource.h?? on Wed, 30 Jul 2008 08:23:50 GMT]]></title><description><![CDATA[<p>Gut... ich habe nichts verstanden...</p>
<p>Alle Funktionen gehen.. nur die LRESULT CALLBACK nicht...</p>
<p>War deine Antwort zu diesem Thema? Wenn ja dann bitte erklär sie nochmal.. Habe mit DLLs erst angefangen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
<p>Danke dir für die Antwort!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1556150</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1556150</guid><dc:creator><![CDATA[lippoliv]]></dc:creator><pubDate>Wed, 30 Jul 2008 08:23:50 GMT</pubDate></item></channel></rss>