<?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 beim kompilieren mit Wiimote-lib]]></title><description><![CDATA[<p>Hallo,<br />
ich möchte erstmal einfach die x,y und z Werte der Wiimote auslesen. Ich habe die lib &quot;libcwiimote&quot; (0.4) heruntergeldaden und installiert. Nur bekomme ich nun beim kompilieren folgende Ausgabe:</p>
<pre><code>Linking CXX executable wiimote
CMakeFiles/wiimote.dir/main.cpp.o: In function `main':
main.cpp:(.text+0x2b): undefined reference to `wiimote_connect'
main.cpp:(.text+0x45): undefined reference to `wiimote_update'
main.cpp:(.text+0x5d): undefined reference to `wiimote_disconnect'
collect2: ld returned 1 exit status
make[2]: *** [wiimote] Fehler 1
make[1]: *** [CMakeFiles/wiimote.dir/all] Fehler 2
make: *** [all] Fehler 2
</code></pre>
<p>Der Code ist folgender:</p>
<pre><code class="language-cpp">#include &lt;stdio.h&gt;
#include &lt;libcwiimote/wiimote_api.h&gt;

int main()  
{
   wiimote_t wi;
   wiimote_connect(&amp;wi, &quot;00:1F:32:8F:E7:71&quot;);
   wi.mode.acc = 1;             // enable accelerometer
   while (wiimote_is_open(&amp;wi)) {
     wiimote_update(&amp;wi);       // synchronize with wiimote
     if (wi.keys.home) {        // check if home key is pressed
       wiimote_disconnect(&amp;wi);
     }
     printf(&quot;x=%d y=%d z=%d\n&quot;, wi.axis.x, wi.axis.y, wi.axis.z);
   }
 }
</code></pre>
<p>Mein Betriebssystem ist Ubuntu 9.10 karmic koala.</p>
<p>Ich hoffe ihr könnt mir helfen,<br />
C_Classic</p>
<p>PS: Ich weiß nicht, ob es am Code liegt. Wisst ihr vielleicht, ob und wenn ja, wo es eine Liste mit Abhängigkeiten für &quot;libcwiimote&quot; gibt. Ich konnte leider keine finden.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/256148/fehler-beim-kompilieren-mit-wiimote-lib</link><generator>RSS for Node</generator><lastBuildDate>Fri, 11 Sep 2026 16:25:01 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/256148.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 08 Dec 2009 19:08:40 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Fehler beim kompilieren mit Wiimote-lib on Tue, 08 Dec 2009 19:08:40 GMT]]></title><description><![CDATA[<p>Hallo,<br />
ich möchte erstmal einfach die x,y und z Werte der Wiimote auslesen. Ich habe die lib &quot;libcwiimote&quot; (0.4) heruntergeldaden und installiert. Nur bekomme ich nun beim kompilieren folgende Ausgabe:</p>
<pre><code>Linking CXX executable wiimote
CMakeFiles/wiimote.dir/main.cpp.o: In function `main':
main.cpp:(.text+0x2b): undefined reference to `wiimote_connect'
main.cpp:(.text+0x45): undefined reference to `wiimote_update'
main.cpp:(.text+0x5d): undefined reference to `wiimote_disconnect'
collect2: ld returned 1 exit status
make[2]: *** [wiimote] Fehler 1
make[1]: *** [CMakeFiles/wiimote.dir/all] Fehler 2
make: *** [all] Fehler 2
</code></pre>
<p>Der Code ist folgender:</p>
<pre><code class="language-cpp">#include &lt;stdio.h&gt;
#include &lt;libcwiimote/wiimote_api.h&gt;

int main()  
{
   wiimote_t wi;
   wiimote_connect(&amp;wi, &quot;00:1F:32:8F:E7:71&quot;);
   wi.mode.acc = 1;             // enable accelerometer
   while (wiimote_is_open(&amp;wi)) {
     wiimote_update(&amp;wi);       // synchronize with wiimote
     if (wi.keys.home) {        // check if home key is pressed
       wiimote_disconnect(&amp;wi);
     }
     printf(&quot;x=%d y=%d z=%d\n&quot;, wi.axis.x, wi.axis.y, wi.axis.z);
   }
 }
</code></pre>
<p>Mein Betriebssystem ist Ubuntu 9.10 karmic koala.</p>
<p>Ich hoffe ihr könnt mir helfen,<br />
C_Classic</p>
<p>PS: Ich weiß nicht, ob es am Code liegt. Wisst ihr vielleicht, ob und wenn ja, wo es eine Liste mit Abhängigkeiten für &quot;libcwiimote&quot; gibt. Ich konnte leider keine finden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1819774</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1819774</guid><dc:creator><![CDATA[C_Classic]]></dc:creator><pubDate>Tue, 08 Dec 2009 19:08:40 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler beim kompilieren mit Wiimote-lib on Tue, 08 Dec 2009 19:11:39 GMT]]></title><description><![CDATA[<p>Das sieht aus, als hättest du vergessen die Bibliothek beim Linken anzugeben. Mit welchem Befehl hast du denn kompiliert?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1819776</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1819776</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Tue, 08 Dec 2009 19:11:39 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler beim kompilieren mit Wiimote-lib on Tue, 08 Dec 2009 19:22:19 GMT]]></title><description><![CDATA[<p>Nein, ich hab keine Lib angegeben. Ich bin noch recht neu was c++ angeht, deshalb: Wie gebe ich denn die lib an?</p>
<pre><code>gcc -o wiimote &quot;main.o&quot;
</code></pre>
<p>Ich kompiliere/linke eigentlich immer aus &quot;KDevelop&quot; raus.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1819783</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1819783</guid><dc:creator><![CDATA[C_Classic]]></dc:creator><pubDate>Tue, 08 Dec 2009 19:22:19 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler beim kompilieren mit Wiimote-lib on Wed, 09 Dec 2009 13:48:05 GMT]]></title><description><![CDATA[<p>Habs jetzt mal mit folgendem Probiert:</p>
<pre><code>gcc -o wiimote -lcwiimote &quot;main.o&quot;
</code></pre>
<p>jedoch bekomm ich jetzt folgenden Fehler:</p>
<pre><code>main.o:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/libcwiimote.so: undefined reference to `hci_close_dev'
/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/libcwiimote.so: undefined reference to `hci_devba'
/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/libcwiimote.so: undefined reference to `hci_inquiry'
/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/libcwiimote.so: undefined reference to `asin'
/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/libcwiimote.so: undefined reference to `hci_get_route'
/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/libcwiimote.so: undefined reference to `hci_read_remote_name'
/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/libcwiimote.so: undefined reference to `str2ba'
/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/libcwiimote.so: undefined reference to `ba2str'
/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/libcwiimote.so: undefined reference to `hci_open_dev'
collect2: ld returned 1 exit status
</code></pre>
<p>jetzt muss ich wahrscheinlich die libhci oder so hinzufügen...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1820093</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1820093</guid><dc:creator><![CDATA[C_Classic]]></dc:creator><pubDate>Wed, 09 Dec 2009 13:48:05 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler beim kompilieren mit Wiimote-lib on Wed, 09 Dec 2009 13:56:59 GMT]]></title><description><![CDATA[<p>Konnte es jetzt mit folgendem Befehl kompilieren:</p>
<pre><code>g++ -o wiimote -lcwiimote -lbluetooth &quot;main.o&quot;
</code></pre>
<p>Doch jetzt erhalte ich nach dem Programmstart folgenden Fehler:</p>
<pre><code>~/projects/wiimote$ ./wiimote
wiimote_connect(): devba: No such device
</code></pre>
<p>Hat jemand eine Idee woran das liegt.<br />
Danke für deine bisherige Hilfe, SeppJ!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1820101</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1820101</guid><dc:creator><![CDATA[C_Classic]]></dc:creator><pubDate>Wed, 09 Dec 2009 13:56:59 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler beim kompilieren mit Wiimote-lib on Wed, 09 Dec 2009 14:08:31 GMT]]></title><description><![CDATA[<p>Ok, deine Schwierigkeiten beim Compilieren hast du ja nun gelöst (hast du denn auch verstanden, warum deine vorhergehenden Versuche nicht funktioniert haben?).</p>
<p>Dein neues Problem ist spezifisch für die Verwendung der wiimote Bibliothek. Da müsstest du mal in einem wiimote Entwicklerforum fragen. Ich kann nur raten:</p>
<ol>
<li>&quot;00:1F:32:8F:E7:71&quot; fällt vom Himmel. Ist das sicher richtig?</li>
<li>Gehört zu der wiimote-Bibliothek noch mehr? Vielleicht irgendwas falsch installiert?</li>
</ol>
<p>Kompetente Hilfe kann dir da nur ein anderer wiimote Entwickler geben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1820107</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1820107</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Wed, 09 Dec 2009 14:08:31 GMT</pubDate></item><item><title><![CDATA[Reply to Fehler beim kompilieren mit Wiimote-lib on Wed, 09 Dec 2009 15:08:01 GMT]]></title><description><![CDATA[<p>Ja, ich habe meine Fehler verstanden. Das eine war doch schlichtweg der falsche Compiler (C anstatt c++). Der andere war, dass ich nicht wusste, dass man die libs manuell übergeben muss.<br />
&quot;00:1F:32:8F:E7:71&quot; ist die Bluetooth-Adresse meiner Wiimote.</p>
<p>Habe auch noch was gefunden: Das ist ein Problem, dass es mit der wiiote-lib 0.4 gibt. Mit der 0.2 soll es funktionieren. Deshalb hab ich auch noch die 0.2 installiert und kompiliere nun auch mit dieser.<br />
Nur leider klappt dies wieder nicht. Diesmal folgender Fehler:</p>
<pre><code>g++ -o wiimote -lcwiimote2 -lbluetooth &quot;main.o&quot;
/usr/lib/gcc/i486-linux-gnu/4.4.1/../../../../lib/libcwiimote2.so: undefined reference to `hci_remote_name'
collect2: ld returned 1 exit status
</code></pre>
<p>Wieder ein bisschen danach gesucht und wies ausseiht leigt es daran, dass die Bluetooth-lib zu neu ist.</p>
<p>Mal sehen, was sich machen lässt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1820149</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1820149</guid><dc:creator><![CDATA[C_Classic]]></dc:creator><pubDate>Wed, 09 Dec 2009 15:08:01 GMT</pubDate></item></channel></rss>