<?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[Fehler bei Socket]]></title><description><![CDATA[<p>hi,</p>
<p>immer wenn ich folgenden code compilieren bzw. dann erstellen will:</p>
<pre><code>#include &lt;windows.h&gt;
#include &lt;winsock.h&gt;
#include &lt;stdio.h&gt;

void WSAInit(void)
 {
  WORD wVersionReg = MAKEWORD(1,8);
  WSADATA wsaData;
  if (int err = WSAStartup(wVersionReg, &amp;wsaData) != 0)
   {
    puts(&quot;Fehler: Initialisieren - WinSock.dll!&quot;);
   }
 }

int main(void)
 {
  SOCKET sock = INVALID_SOCKET;

  WSAInit();

  if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET)
   {
    puts(&quot;Fehler beim Erstellen des Socket!\n&quot;);
   }

  closesocket(sock);

  WSACleanup();

  return 0;
 }
</code></pre>
<p>bekomme ich folgende aussage:</p>
<p>Linker-Vorgang läuft...<br />
Cpp1.obj : error LNK2001: Nichtaufgeloestes externes Symbol _WSAStartup@8<br />
Cpp1.obj : error LNK2001: Nichtaufgeloestes externes Symbol _WSACleanup@0<br />
Cpp1.obj : error LNK2001: Nichtaufgeloestes externes Symbol _closesocket@4<br />
Cpp1.obj : error LNK2001: Nichtaufgeloestes externes Symbol _socket@12<br />
Debug/Cpp1.exe : fatal error LNK1120: 4 unaufgeloeste externe Verweise<br />
Fehler beim Ausführen von link.exe.</p>
<p>was hat das zu bedeuten?</p>
<p>cu</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/81283/fehler-bei-socket</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Apr 2026 23:10:24 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/81283.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 29 Jul 2004 21:32:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Fehler bei Socket on Thu, 29 Jul 2004 21:32:00 GMT]]></title><description><![CDATA[<p>hi,</p>
<p>immer wenn ich folgenden code compilieren bzw. dann erstellen will:</p>
<pre><code>#include &lt;windows.h&gt;
#include &lt;winsock.h&gt;
#include &lt;stdio.h&gt;

void WSAInit(void)
 {
  WORD wVersionReg = MAKEWORD(1,8);
  WSADATA wsaData;
  if (int err = WSAStartup(wVersionReg, &amp;wsaData) != 0)
   {
    puts(&quot;Fehler: Initialisieren - WinSock.dll!&quot;);
   }
 }

int main(void)
 {
  SOCKET sock = INVALID_SOCKET;

  WSAInit();

  if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET)
   {
    puts(&quot;Fehler beim Erstellen des Socket!\n&quot;);
   }

  closesocket(sock);

  WSACleanup();

  return 0;
 }
</code></pre>
<p>bekomme ich folgende aussage:</p>
<p>Linker-Vorgang läuft...<br />
Cpp1.obj : error LNK2001: Nichtaufgeloestes externes Symbol _WSAStartup@8<br />
Cpp1.obj : error LNK2001: Nichtaufgeloestes externes Symbol _WSACleanup@0<br />
Cpp1.obj : error LNK2001: Nichtaufgeloestes externes Symbol _closesocket@4<br />
Cpp1.obj : error LNK2001: Nichtaufgeloestes externes Symbol _socket@12<br />
Debug/Cpp1.exe : fatal error LNK1120: 4 unaufgeloeste externe Verweise<br />
Fehler beim Ausführen von link.exe.</p>
<p>was hat das zu bedeuten?</p>
<p>cu</p>
]]></description><link>https://www.c-plusplus.net/forum/post/571256</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/571256</guid><dc:creator><![CDATA[CyberFalk]]></dc:creator><pubDate>Thu, 29 Jul 2004 21:32:00 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler bei Socket on Thu, 29 Jul 2004 22:05:08 GMT]]></title><description><![CDATA[<p>Passende Library dazulinken...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/571269</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/571269</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Thu, 29 Jul 2004 22:05:08 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler bei Socket on Thu, 29 Jul 2004 22:17:14 GMT]]></title><description><![CDATA[<p>und wie linke ich diese dazu?<br />
unter linux ist das alles einfacher.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/571275</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/571275</guid><dc:creator><![CDATA[CyberFalk]]></dc:creator><pubDate>Thu, 29 Jul 2004 22:17:14 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler bei Socket on Thu, 29 Jul 2004 22:21:34 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>welchen Kompiler und/oder IDE benutzt du denn? Unter VC++ erstell einfach ein Windowsprojekt.</p>
<p>Außerdem:<br />
Falsches Forum:<br />
- überhaupt kein C++, schon gar kein Standard<br />
- plattformabhängig, da der Standard (welcher auch immer) keine Sockets kennt</p>
]]></description><link>https://www.c-plusplus.net/forum/post/571280</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/571280</guid><dc:creator><![CDATA[CarstenJ]]></dc:creator><pubDate>Thu, 29 Jul 2004 22:21:34 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler bei Socket on Thu, 29 Jul 2004 22:28:20 GMT]]></title><description><![CDATA[<p>ja ich benutze VC++. ist es egal was für ein projekt?<br />
eigentlich wollte ich es so haben das ich es via konsole öffnen kann.</p>
<p>sry für das falsche forum.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/571282</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/571282</guid><dc:creator><![CDATA[CyberFalk]]></dc:creator><pubDate>Thu, 29 Jul 2004 22:28:20 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler bei Socket on Thu, 29 Jul 2004 22:30:12 GMT]]></title><description><![CDATA[<p>die lib heisst 'ws2_32.lib'<br />
einfügen z.b. mit mingw auf kommandozeile: -lws2_32<br />
ansonsten ws2_32.lib über die linkereinstellungen der ide mit einbinden</p>
]]></description><link>https://www.c-plusplus.net/forum/post/571284</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/571284</guid><dc:creator><![CDATA[net 0]]></dc:creator><pubDate>Thu, 29 Jul 2004 22:30:12 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler bei Socket on Fri, 30 Jul 2004 10:38:13 GMT]]></title><description><![CDATA[<p>für VC++</p>
<p>in den projekteinstellungen oder so:</p>
<pre><code class="language-cpp">#pragma comment( lib, &quot;ws2_32.lib&quot; )
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/571543</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/571543</guid><dc:creator><![CDATA[dot]]></dc:creator><pubDate>Fri, 30 Jul 2004 10:38:13 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler bei Socket on Fri, 30 Jul 2004 10:40:41 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile.php?mode=viewprofile&amp;u=403" rel="nofollow">HumeSikkins</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=15" rel="nofollow">C++</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=1" rel="nofollow">MFC mit dem Visual C++</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39405" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/571548</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/571548</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Fri, 30 Jul 2004 10:40:41 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler bei Socket on Fri, 30 Jul 2004 11:11:53 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/6496">@dot</a></p>
<p>danke schön, du hast mir echt weitergeholfen.<br />
auch an die anderen ein danke schön.</p>
<p>cu</p>
]]></description><link>https://www.c-plusplus.net/forum/post/571568</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/571568</guid><dc:creator><![CDATA[CyberFalk]]></dc:creator><pubDate>Fri, 30 Jul 2004 11:11:53 GMT</pubDate></item></channel></rss>