Med dessa paket installerade och följande ändringar i filen WiiRemote.cpp:
Kod: Markera allt
// Compiles with g++ WiiRemote.cpp -lcwiid -o WiiRemote
// Preferably with libcwiid >= 6.0
#include "WiiRemote.h"
#include <stdlib.h> <----Min ändring
bool g_AllowReconnect = true;
bool g_AllowMouse = true;
bool g_AllowNunchuck = true;
(Leta efter <----Min ändring)
och...
Kod: Markera allt
void CWiiRemote::Initialize(CAddress Addr, int Socket)
{
m_connected = false;
m_lastKeyPressed = 0;
m_LastKey = 0;
m_buttonRepeat = false;
m_lastKeyPressedNunchuck = 0;
m_LastKeyNunchuck = 0;
m_buttonRepeatNunchuck = false;
m_useIRMouse = true;
m_rptMode = 0;
m_Socket = Socket;
m_MyAddr = Addr;
m_NumSamples = WIIREMOTE_SAMPLES;
m_MaxX = WIIREMOTE_X_MAX;
m_MaxY = WIIREMOTE_Y_MAX;
m_MinX = WIIREMOTE_X_MIN;
m_MinY = WIIREMOTE_Y_MIN;
#ifdef CWIID_OLD
m_LastMsgTime = getTicks();
#endif
//All control bits are set to false when cwiid is started
//Report Button presses
ToggleBit(m_rptMode, CWIID_RPT_BTN);
if (g_AllowNunchuck)
ToggleBit(m_rptMode, CWIID_RPT_NUNCHUK);
//If wiiremote is used as a mouse, then report the IR sources
#ifndef CWIID_OLD
if (m_useIRMouse)
#endif
ToggleBit(m_rptMode, CWIID_RPT_IR);
//Have the first and fourth LED on the Wiiremote shine when connected
ToggleBit(m_ledState, CWIID_LED1_ON);
ToggleBit(m_ledState, CWIID_LED4_ON);
//@edit by Funkyjansson
//Starts XBMC in Display 0.1
system("DISPLAY=:0.1 xbmc"); <-----Min ändring
}
(Ändringen ligger längst ned)
ger
följande svar i konsolen.
Kod: Markera allt
In file included from WiiRemote.h:47,
from WiiRemote.cpp:24:
/usr/include/cwiid.h:63:48: error: bluetooth/bluetooth.h: No such file or directory
In file included from WiiRemote.cpp:24:
WiiRemote.h:51:27: error: bluetooth/hci.h: No such file or directory
WiiRemote.h:52:31: error: bluetooth/hci_lib.h: No such file or directory
In file included from WiiRemote.h:47,
from WiiRemote.cpp:24:
/usr/include/cwiid.h:295: error: ‘bdaddr_t’ does not name a type
/usr/include/cwiid.h:311: error: ‘bdaddr_t’ was not declared in this scope
/usr/include/cwiid.h:311: error: ‘bdaddr’ was not declared in this scope
/usr/include/cwiid.h:311: error: expected primary-expression before ‘int’
/usr/include/cwiid.h:311: error: initializer expression list treated as compound expression
/usr/include/cwiid.h:345: error: ‘bdaddr_t’ was not declared in this scope
/usr/include/cwiid.h:345: error: ‘bdaddr’ was not declared in this scope
/usr/include/cwiid.h:345: error: expected primary-expression before ‘int’
/usr/include/cwiid.h:345: error: initializer expression list treated as compound expression
In file included from WiiRemote.cpp:24:
WiiRemote.h:127: error: ‘bdaddr_t’ does not name a type
WiiRemote.cpp: In member function ‘void CWiiRemote::SetBluetoothAddress(const char*)’:
WiiRemote.cpp:156: error: ‘m_btaddr’ was not declared in this scope
WiiRemote.cpp:156: error: ‘str2ba’ was not declared in this scope
WiiRemote.cpp:158: error: ‘m_btaddr’ was not declared in this scope
WiiRemote.cpp:158: error: ‘BDADDR_ANY’ was not declared in this scope
WiiRemote.cpp:158: error: ‘bacpy’ was not declared in this scope
WiiRemote.cpp: In member function ‘bool CWiiRemote::Connect()’:
WiiRemote.cpp:338: error: ‘m_btaddr’ was not declared in this scope
WiiRemote.cpp:338: error: ‘cwiid_open’ cannot be used as a function
WiiRemote.cpp: In function ‘int main(int, char**)’:
WiiRemote.cpp:738: error: ‘hci_get_route’ was not declared in this scope
micke@micke-desktop:~/Binära_program/wiiremote_server/sourcecode/XBMC/tools/EventClients/Clients/WiiRemote$
Måste jag kompilera WiiRemote.h först lr vaddå?