Vizible’s Blog

Install wiiuse on Ubuntu 9.04

Posted in Logs by wearetherock on July 16, 2009

Download wiiuse_v0.12_src.tar.gz from http://sourceforge.net/projects/wiiuse/files/

# make
make[1]: Entering directory `/dos/library/Wiiuse/wiiuse_v0.12/src’
gcc -Wall -pipe -fPIC -funroll-loops -O2 -I. -c classic.c -o release-i486-linux-gnu/classic.o
In file included from classic.c:43:
wiiuse_internal.h:49:34: error: bluetooth/bluetooth.h: No such file or directory
In file included from wiiuse_internal.h:210,
from classic.c:43:
wiiuse.h:536: error: expected specifier-qualifier-list before ‘bdaddr_t’
classic.c: In function ‘classic_ctrl_handshake’:
classic.c:113: error: ‘struct wiimote_t’ has no member named ‘exp’
classic.c: In function ‘classic_ctrl_disconnected’:
classic.c:129: warning: implicit declaration of function ‘memset’
classic.c:129: warning: incompatible implicit declaration of built-in function ‘memset’
make[1]: *** [release-i486-linux-gnu/classic.o] Error 1
make[1]: Leaving directory `/dos/library/Wiiuse/wiiuse_v0.12/src’
make: *** [all] Error 2

Problem, not found “bluetooth/bluetooth.h”.
How to solve this problem? install it!

Advertisements

3 Responses

Subscribe to comments with RSS.

  1. wearetherock said, on July 16, 2009 at 5:44 pm

    install blutooth dev tool and try again.
    # apt-get install libbluetooth-dev

    Many output here.

    # make
    make[1]: Entering directory `/dos/library/Wiiuse/wiiuse_v0.12/src’
    gcc -Wall -pipe -fPIC -funroll-loops -O2 -I. -c classic.c -o release-i486-linux-gnu/classic.o
    gcc -Wall -pipe -fPIC -funroll-loops -O2 -I. -c dynamics.c -o release-i486-linux-gnu/dynamics.o
    gcc -Wall -pipe -fPIC -funroll-loops -O2 -I. -c events.c -o release-i486-linux-gnu/events.o
    gcc -Wall -pipe -fPIC -funroll-loops -O2 -I. -c io.c -o release-i486-linux-gnu/io.o
    gcc -Wall -pipe -fPIC -funroll-loops -O2 -I. -c io_nix.c -o release-i486-linux-gnu/io_nix.o
    gcc -Wall -pipe -fPIC -funroll-loops -O2 -I. -c ir.c -o release-i486-linux-gnu/ir.o
    ir.c: In function ‘interpret_ir_data’:
    ir.c:628: warning: array subscript is above array bounds
    ir.c:628: warning: array subscript is above array bounds
    ir.c:628: warning: array subscript is above array bounds
    ir.c:628: warning: array subscript is above array bounds
    gcc -Wall -pipe -fPIC -funroll-loops -O2 -I. -c nunchuk.c -o release-i486-linux-gnu/nunchuk.o
    gcc -Wall -pipe -fPIC -funroll-loops -O2 -I. -c guitar_hero_3.c -o release-i486-linux-gnu/guitar_hero_3.o
    gcc -Wall -pipe -fPIC -funroll-loops -O2 -I. -c wiiuse.c -o release-i486-linux-gnu/wiiuse.o
    gcc -Wall -pipe -fPIC -funroll-loops -O2 -shared -lm -lbluetooth release-i486-linux-gnu/classic.o release-i486-linux-gnu/dynamics.o release-i486-linux-gnu/events.o release-i486-linux-gnu/io.o release-i486-linux-gnu/io_nix.o release-i486-linux-gnu/ir.o release-i486-linux-gnu/nunchuk.o release-i486-linux-gnu/guitar_hero_3.o release-i486-linux-gnu/wiiuse.o -o ./release-i486-linux-gnu/libwiiuse.so
    make[1]: Leaving directory `/dos/library/Wiiuse/wiiuse_v0.12/src’
    make[1]: Entering directory `/dos/library/Wiiuse/wiiuse_v0.12/example’
    gcc -Wall -pipe -fPIC -funroll-loops -O2 -I../src/ -c example.c -o release-i486-linux-gnu/example.o
    gcc -Wall -pipe -fPIC -funroll-loops -O2 -L../src/release-i486-linux-gnu -lm -lwiiuse release-i486-linux-gnu/example.o -o ./release-i486-linux-gnu/wiiuse-example
    make[1]: Leaving directory `/dos/library/Wiiuse/wiiuse_v0.12/example’
    make[1]: Entering directory `/dos/library/Wiiuse/wiiuse_v0.12/example-sdl’
    gcc -Wall -pipe -fPIC -funroll-loops -O2 -I../src/ -I/usr/include/SDL -c sdl.c -o release-i486-linux-gnu/sdl.o
    sdl.c:35:19: error: GL/gl.h: No such file or directory
    sdl.c:36:20: error: GL/glu.h: No such file or directory
    sdl.c:37:21: error: GL/glut.h: No such file or directory
    sdl.c:38:17: error: SDL.h: No such file or directory
    sdl.c:48: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘width’
    sdl.c:49: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘backColor’
    sdl.c:73: error: expected specifier-qualifier-list before ‘GLfloat’
    sdl.c:83: error: extra brace group at end of initializer
    sdl.c:83: error: (near initialization for ‘light’)
    sdl.c:83: warning: excess elements in struct initializer
    sdl.c:83: warning: (near initialization for ‘light’)
    sdl.c:84: error: extra brace group at end of initializer
    sdl.c:84: error: (near initialization for ‘light’)
    sdl.c:84: warning: excess elements in struct initializer
    sdl.c:84: warning: (near initialization for ‘light’)
    sdl.c:85: error: extra brace group at end of initializer
    sdl.c:85: error: (near initialization for ‘light’)
    sdl.c:85: warning: excess elements in struct initializer
    sdl.c:85: warning: (near initialization for ‘light’)
    sdl.c:86: error: extra brace group at end of initializer
    sdl.c:86: error: (near initialization for ‘light’)
    sdl.c:86: warning: excess elements in struct initializer
    sdl.c:86: warning: (near initialization for ‘light’)
    sdl.c:87: error: extra brace group at end of initializer
    sdl.c:87: error: (near initialization for ‘light’)
    sdl.c:87: warning: excess elements in struct initializer
    sdl.c:87: warning: (near initialization for ‘light’)
    sdl.c:88: warning: excess elements in struct initializer
    sdl.c:88: warning: (near initialization for ‘light’)
    sdl.c:88: warning: excess elements in struct initializer
    sdl.c:88: warning: (near initialization for ‘light’)
    sdl.c:89: error: extra brace group at end of initializer
    sdl.c:89: error: (near initialization for ‘light’)
    sdl.c:89: warning: excess elements in struct initializer
    sdl.c:89: warning: (near initialization for ‘light’)
    sdl.c:94: error: expected specifier-qualifier-list before ‘GLfloat’
    sdl.c:101: error: extra brace group at end of initializer
    sdl.c:101: error: (near initialization for ‘red_plastic’)
    sdl.c:101: warning: excess elements in struct initializer
    sdl.c:101: warning: (near initialization for ‘red_plastic’)
    sdl.c:102: error: extra brace group at end of initializer
    sdl.c:102: error: (near initialization for ‘red_plastic’)
    sdl.c:102: warning: excess elements in struct initializer
    sdl.c:102: warning: (near initialization for ‘red_plastic’)
    sdl.c:103: error: extra brace group at end of initializer
    sdl.c:103: error: (near initialization for ‘red_plastic’)
    sdl.c:103: warning: excess elements in struct initializer
    sdl.c:103: warning: (near initialization for ‘red_plastic’)
    sdl.c:104: error: extra brace group at end of initializer
    sdl.c:104: error: (near initialization for ‘red_plastic’)
    sdl.c:104: warning: excess elements in struct initializer
    sdl.c:104: warning: (near initialization for ‘red_plastic’)
    sdl.c:106: warning: excess elements in struct initializer
    sdl.c:106: warning: (near initialization for ‘red_plastic’)
    sdl.c:111: error: expected ‘)’ before ‘l’
    sdl.c:113: error: expected ‘)’ before ‘new_width’
    sdl.c: In function ‘display’:
    sdl.c:206: warning: implicit declaration of function ‘glClear’
    sdl.c:206: error: ‘GL_COLOR_BUFFER_BIT’ undeclared (first use in this function)
    sdl.c:206: error: (Each undeclared identifier is reported only once
    sdl.c:206: error: for each function it appears in.)
    sdl.c:206: error: ‘GL_DEPTH_BUFFER_BIT’ undeclared (first use in this function)
    sdl.c:207: warning: implicit declaration of function ‘glMatrixMode’
    sdl.c:207: error: ‘GL_MODELVIEW’ undeclared (first use in this function)
    sdl.c:208: warning: implicit declaration of function ‘glLoadIdentity’
    sdl.c:213: warning: implicit declaration of function ‘glDisable’
    sdl.c:213: error: ‘GL_LIGHTING’ undeclared (first use in this function)
    sdl.c:215: warning: implicit declaration of function ‘glBegin’
    sdl.c:215: error: ‘GL_TRIANGLES’ undeclared (first use in this function)
    sdl.c:217: warning: implicit declaration of function ‘glColor3f’
    sdl.c:218: warning: implicit declaration of function ‘glVertex3f’
    sdl.c:218: error: ‘width’ undeclared (first use in this function)
    sdl.c:218: error: ‘height’ undeclared (first use in this function)
    sdl.c:219: warning: implicit declaration of function ‘glEnd’
    sdl.c:244: warning: implicit declaration of function ‘gluLookAt’
    sdl.c:248: warning: implicit declaration of function ‘glEnable’
    sdl.c:249: error: ‘GL_LIGHT0’ undeclared (first use in this function)
    sdl.c:250: warning: implicit declaration of function ‘update_light’
    sdl.c:253: warning: implicit declaration of function ‘glRotatef’
    sdl.c:257: warning: implicit declaration of function ‘glutSolidTeapot’
    sdl.c:260: warning: implicit declaration of function ‘SDL_GL_SwapBuffers’
    sdl.c: At top level:
    sdl.c:264: error: expected ‘)’ before ‘l’
    sdl.c: In function ‘set_material’:
    sdl.c:279: warning: implicit declaration of function ‘glMaterialfv’
    sdl.c:279: error: ‘GL_FRONT_AND_BACK’ undeclared (first use in this function)
    sdl.c:279: error: ‘GL_AMBIENT’ undeclared (first use in this function)
    sdl.c:279: error: ‘struct material_t’ has no member named ‘ambient’
    sdl.c:280: error: ‘GL_DIFFUSE’ undeclared (first use in this function)
    sdl.c:280: error: ‘struct material_t’ has no member named ‘diffuse’
    sdl.c:281: error: ‘GL_SPECULAR’ undeclared (first use in this function)
    sdl.c:281: error: ‘struct material_t’ has no member named ‘specular’
    sdl.c:282: warning: implicit declaration of function ‘glMaterialf’
    sdl.c:282: error: ‘GL_SHININESS’ undeclared (first use in this function)
    sdl.c:282: error: ‘struct material_t’ has no member named ‘shininess’
    sdl.c:283: error: ‘GL_EMISSION’ undeclared (first use in this function)
    sdl.c:283: error: ‘struct material_t’ has no member named ‘emission’
    sdl.c: At top level:
    sdl.c:287: error: expected ‘)’ before ‘new_width’
    sdl.c: In function ‘main’:
    sdl.c:357: warning: implicit declaration of function ‘SDL_Init’
    sdl.c:357: error: ‘SDL_INIT_VIDEO’ undeclared (first use in this function)
    sdl.c:358: warning: implicit declaration of function ‘SDL_GetError’
    sdl.c:358: warning: format ‘%s’ expects type ‘char *’, but argument 2 has type ‘int’
    sdl.c:362: warning: implicit declaration of function ‘SDL_WM_SetCaption’
    sdl.c:364: warning: implicit declaration of function ‘SDL_GL_SetAttribute’
    sdl.c:364: error: ‘SDL_GL_DOUBLEBUFFER’ undeclared (first use in this function)
    sdl.c:365: error: ‘SDL_GL_DEPTH_SIZE’ undeclared (first use in this function)
    sdl.c:368: error: ‘width’ undeclared (first use in this function)
    sdl.c:369: error: ‘height’ undeclared (first use in this function)
    sdl.c:370: warning: implicit declaration of function ‘SDL_SetVideoMode’
    sdl.c:370: error: ‘SDL_RESIZABLE’ undeclared (first use in this function)
    sdl.c:370: error: ‘SDL_OPENGL’ undeclared (first use in this function)
    sdl.c:376: error: ‘GL_DEPTH_TEST’ undeclared (first use in this function)
    sdl.c:377: error: ‘GL_LIGHTING’ undeclared (first use in this function)
    sdl.c:378: error: ‘GL_NORMALIZE’ undeclared (first use in this function)
    sdl.c:379: error: ‘GL_BLEND’ undeclared (first use in this function)
    sdl.c:381: warning: implicit declaration of function ‘glBlendFunc’
    sdl.c:381: error: ‘GL_SRC_ALPHA’ undeclared (first use in this function)
    sdl.c:381: error: ‘GL_ONE_MINUS_SRC_ALPHA’ undeclared (first use in this function)
    sdl.c:382: warning: implicit declaration of function ‘glDepthFunc’
    sdl.c:382: error: ‘GL_LEQUAL’ undeclared (first use in this function)
    sdl.c:383: warning: implicit declaration of function ‘glClearColor’
    sdl.c:386: warning: implicit declaration of function ‘resize_window’
    sdl.c:395: error: ‘SDL_Event’ undeclared (first use in this function)
    sdl.c:395: error: expected ‘;’ before ‘event’
    sdl.c:397: warning: implicit declaration of function ‘SDL_PollEvent’
    sdl.c:397: error: ‘event’ undeclared (first use in this function)
    sdl.c:399: error: ‘SDL_VIDEORESIZE’ undeclared (first use in this function)
    sdl.c:405: error: ‘SDL_QUIT’ undeclared (first use in this function)
    sdl.c:408: warning: implicit declaration of function ‘SDL_Quit’
    make[1]: *** [release-i486-linux-gnu/sdl.o] Error 1
    make[1]: Leaving directory `/dos/library/Wiiuse/wiiuse_v0.12/example-sdl’
    make: *** [all] Error 2

  2. wearetherock said, on July 16, 2009 at 5:53 pm

    # sudo apt-get install libgl-dev libsdl-dev

  3. wearetherock said, on July 16, 2009 at 7:13 pm

    Above command is not neccessary.(no need to compile SDL example)
    just specify wiiuse as build target

    # make wiiuse
    make[1]: Entering directory `/dos/library/Wiiuse/wiiuse_v0.12/src’
    gcc -Wall -pipe -fPIC -funroll-loops -O2 -shared -lm -lbluetooth release-i486-linux-gnu/classic.o release-i486-linux-gnu/dynamics.o release-i486-linux-gnu/events.o release-i486-linux-gnu/io.o release-i486-linux-gnu/io_nix.o release-i486-linux-gnu/ir.o release-i486-linux-gnu/nunchuk.o release-i486-linux-gnu/guitar_hero_3.o release-i486-linux-gnu/wiiuse.o -o ./release-i486-linux-gnu/libwiiuse.so
    make[1]: Leaving directory `/dos/library/Wiiuse/wiiuse_v0.12/src’

    Why not I read README first? 😦


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: