I'm getting the following errors when I try to compile this code [not relevant]

asked 2014-03-30 11:59:15 +0200

baiduno1 gravatar image

updated 2014-03-31 10:35:08 +0200

This is a simple program demonstrating how to use OpenGL ES 2.0 .the code by wayland official It will output two gears, which can be moved around on the screen I'm getting the following errors when I try to compile this code here code http://cgit.freedesktop.org/wayland/weston/tree/clients/gears.c Source packages http://cgit.freedesktop.org/wayland/weston/snapshot/weston-1.1.0.zip The following is a compilation process

pastebin error code http://pastebin.com/57kbDZs6

[SB2 sdk-build SailfishOS-i486-x86] I have no name!@SailfishSDK clients $ gcc -o gerac gears.c -I /srv/mer/targets/SailfishOS-i486-x86/usr/include/ -I /srv/mer/targets/SailfishOS-i486-x86/usr/include/cairo -L /srv/mer/targets/SailfishOS-i486-x86/usr/lib -lm -lwayland-client -lEGL -lGL -lcairo

/tmp/ccyuHaj3.o: In function `frame_callback': gears.c:(.text+0x1371): undefined reference to `window_schedule_redraw'
/tmp/ccyuHaj3.o: In function `button_handler':
gears.c:(.text+0x1538): undefined reference to `input_get_position'
/tmp/ccyuHaj3.o: In function `redraw_handler':
gears.c:(.text+0x1568): undefined reference to `widget_get_allocation'
gears.c:(.text+0x157c): undefined reference to `window_get_allocation'
gears.c:(.text+0x159d): undefined reference to `display_acquire_window_surface'
gears.c:(.text+0x17fc): undefined reference to `display_release_window_surface'
gears.c:(.text+0x1809): undefined reference to `window_get_wl_surface'
/tmp/ccyuHaj3.o: In function `resize_handler':
gears.c:(.text+0x1896): undefined reference to `widget_set_size'
/tmp/ccyuHaj3.o: In function `keyboard_focus_handler':
gears.c:(.text+0x18a9): undefined reference to `window_schedule_redraw'
/tmp/ccyuHaj3.o: In function `fullscreen_handler':
gears.c:(.text+0x18dd): undefined reference to `window_set_fullscreen'
/tmp/ccyuHaj3.o: In function `gears_create':
gears.c:(.text+0x1917): undefined reference to `window_create'
gears.c:(.text+0x1930): undefined reference to `window_frame_create'
gears.c:(.text+0x194b): undefined reference to `window_set_title'
gears.c:(.text+0x1959): undefined reference to `display_get_egl_display'
gears.c:(.text+0x198f): undefined reference to `display_get_argb_egl_config'
gears.c:(.text+0x1c31): undefined reference to `window_set_user_data'
gears.c:(.text+0x1c47): undefined reference to `widget_set_resize_handler'
gears.c:(.text+0x1c5d): undefined reference to `widget_set_redraw_handler'
gears.c:(.text+0x1c73): undefined reference to `widget_set_button_handler'
gears.c:(.text+0x1c89): undefined reference to `widget_set_motion_handler'
gears.c:(.text+0x1c9e): undefined reference to `window_set_keyboard_focus_handler'
gears.c:(.text+0x1cb3): undefined reference to `window_set_fullscreen_handler'
gears.c:(.text+0x1cce): undefined reference to `window_schedule_resize'
/tmp/ccyuHaj3.o: In function `main':
gears.c:(.text+0x1cf2): undefined reference to `display_create'
gears.c:(.text+0x1d32): undefined reference to `display_run'
collect2: ld returned 1 exit status
[SB2 sdk-build SailfishOS-i486-x86] I have no name!@SailfishSDK clients $
edit retag flag offensive reopen delete

The question has been closed for the following reason "question is not relevant or outdated" by r0kk3rz
close date 2015-07-01 16:13:38.576542

Comments

It seems to me that this code is made for Weston, which is a window manager, thus having method like "window_set_fullscreen" or "window_set_title". These won't do for Sailfish. Only the OpenGL ES part of gears.c can be compiled, and then some UI code should be specifically written for Sailfish.

I remember that compiling an OpenGL ES code was discussed on the devel mailing list. Thomas Perl provided an example. I can't find the thread though. It's a bit related to this one : https://www.mail-archive.com/devel@lists.sailfishos.org/msg03025.html

Damien Caliste ( 2014-03-31 10:32:26 +0200 )edit

All header files included but also can‘t compiled It seems to me that this code is made for Weston

baiduno1 ( 2014-04-04 15:19:33 +0200 )edit