<?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[Cross-Compiling - &amp;quot;undefined reference&amp;quot; - Winsock]]></title><description><![CDATA[<pre><code>/tmp/ccq5qNqZ.o:main.cpp:(.text+0xa1e): undefined reference to `_WSAStartup@8'
/tmp/ccq5qNqZ.o:main.cpp:(.text+0xa5f): undefined reference to `_WSACleanup@0'
/tmp/ccq5qNqZ.o:main.cpp:(.text+0x298e): undefined reference to `_closesocket@4'
/tmp/ccq5qNqZ.o:main.cpp:(.text+0x2ae4): undefined reference to `_closesocket@4'
/tmp/ccq5qNqZ.o:main.cpp:(.text+0x2ef1): undefined reference to `_inet_addr@4'
/tmp/ccq5qNqZ.o:main.cpp:(.text+0x2f2b): undefined reference to `_gethostbyname@4'
/tmp/ccq5qNqZ.o:main.cpp:(.text+0x2f82): undefined reference to `_htons@4'
/tmp/ccq5qNqZ.o:main.cpp:(.text+0x2fb0): undefined reference to `_socket@12'
/tmp/ccq5qNqZ.o:main.cpp:(.text+0x302a): undefined reference to `_connect@12'
/tmp/ccq5qNqZ.o:main.cpp:(.text+0x306e): undefined reference to `_closesocket@4'
/tmp/ccq5qNqZ.o:main.cpp:(.text+0x332d): undefined reference to `_send@16'
/tmp/ccq5qNqZ.o:main.cpp:(.text+0x3672): undefined reference to `_recv@16'
/tmp/ccq5qNqZ.o:main.cpp:(.text+0x3ba0): undefined reference to `_recv@16'
collect2: ld returned 1 exit status
</code></pre>
<p>Auf Wunsch eines Bekannten versuche ich derzeit zwei selbstgeschriebene Tools von Linux auf Windows zu portieren. Nachdem nun alle Compilerfehler des Cross-Compilers &quot;i586-mingw32msvc-c++&quot; ausgemerzt sind, erscheint obige - für mich ominöse - Fehlermeldung.<br />
Wenn man von den Funktionsnamen ausgehen kann, scheint etwas mit der &quot;winsock.h&quot; , respektive allgemein der Netzwerkprogrammierung mit den Winsocks nicht zu stimmen, was auch der Grund ist, dass ich den Thread hier im WinAPI Unterforum erstelle. Wenn es hier unpassend ist, möge man den Thread doch bitte verschieben. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
<p>Kennt jemand unter euch vielleicht eine Lösung für mein Problem?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/112969/cross-compiling-quot-undefined-reference-quot-winsock</link><generator>RSS for Node</generator><lastBuildDate>Wed, 01 Jul 2026 13:38:07 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/112969.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 17 Jun 2005 23:32:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Cross-Compiling - &amp;quot;undefined reference&amp;quot; - Winsock on Fri, 17 Jun 2005 23:32:30 GMT]]></title><description><![CDATA[<pre><code>/tmp/ccq5qNqZ.o:main.cpp:(.text+0xa1e): undefined reference to `_WSAStartup@8'
/tmp/ccq5qNqZ.o:main.cpp:(.text+0xa5f): undefined reference to `_WSACleanup@0'
/tmp/ccq5qNqZ.o:main.cpp:(.text+0x298e): undefined reference to `_closesocket@4'
/tmp/ccq5qNqZ.o:main.cpp:(.text+0x2ae4): undefined reference to `_closesocket@4'
/tmp/ccq5qNqZ.o:main.cpp:(.text+0x2ef1): undefined reference to `_inet_addr@4'
/tmp/ccq5qNqZ.o:main.cpp:(.text+0x2f2b): undefined reference to `_gethostbyname@4'
/tmp/ccq5qNqZ.o:main.cpp:(.text+0x2f82): undefined reference to `_htons@4'
/tmp/ccq5qNqZ.o:main.cpp:(.text+0x2fb0): undefined reference to `_socket@12'
/tmp/ccq5qNqZ.o:main.cpp:(.text+0x302a): undefined reference to `_connect@12'
/tmp/ccq5qNqZ.o:main.cpp:(.text+0x306e): undefined reference to `_closesocket@4'
/tmp/ccq5qNqZ.o:main.cpp:(.text+0x332d): undefined reference to `_send@16'
/tmp/ccq5qNqZ.o:main.cpp:(.text+0x3672): undefined reference to `_recv@16'
/tmp/ccq5qNqZ.o:main.cpp:(.text+0x3ba0): undefined reference to `_recv@16'
collect2: ld returned 1 exit status
</code></pre>
<p>Auf Wunsch eines Bekannten versuche ich derzeit zwei selbstgeschriebene Tools von Linux auf Windows zu portieren. Nachdem nun alle Compilerfehler des Cross-Compilers &quot;i586-mingw32msvc-c++&quot; ausgemerzt sind, erscheint obige - für mich ominöse - Fehlermeldung.<br />
Wenn man von den Funktionsnamen ausgehen kann, scheint etwas mit der &quot;winsock.h&quot; , respektive allgemein der Netzwerkprogrammierung mit den Winsocks nicht zu stimmen, was auch der Grund ist, dass ich den Thread hier im WinAPI Unterforum erstelle. Wenn es hier unpassend ist, möge man den Thread doch bitte verschieben. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
<p>Kennt jemand unter euch vielleicht eine Lösung für mein Problem?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/811581</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/811581</guid><dc:creator><![CDATA[guesst]]></dc:creator><pubDate>Fri, 17 Jun 2005 23:32:30 GMT</pubDate></item><item><title><![CDATA[Reply to Cross-Compiling - &amp;quot;undefined reference&amp;quot; - Winsock on Fri, 17 Jun 2005 23:41:05 GMT]]></title><description><![CDATA[<p>Ich hab's nun doch selbst gefunden:<br />
Ich Depp hab vergessen die Winsock-Lib mitzulinken:</p>
<pre><code>... -lwsock32 ...
</code></pre>
<p>mfg Mark</p>
]]></description><link>https://www.c-plusplus.net/forum/post/811582</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/811582</guid><dc:creator><![CDATA[guesst]]></dc:creator><pubDate>Fri, 17 Jun 2005 23:41:05 GMT</pubDate></item></channel></rss>