Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Developer
sagenth
Posts: 10
Registered: ‎11-03-2011
My Device: Q10
Accepted Solution

Compile Issues - undefined references

[ Edited ]

So I got my hands on the source code for a simple dice rolling program that I had found on the BlackBerry App World. I have already fixed a few compile issues, but at this point I think my best bet is to come to you guys here on the forums; I am at your mercy.

 

From my research into things the references which are undefined should be located inside of headers I have included.

 

Here is the compiler output:

make all
make -j 1 -Carm -fMakefile all
make[1]: Entering directory `C:/src/2014/BB10/DicePrO/arm'
make -j 1 -Co.le-v7-g -fMakefile all
make[2]: Entering directory `C:/src/2014/BB10/DicePrO/arm/o.le-v7-g'
C:/bbndk/host_10_2_0_15/win32/x86/usr/bin/qcc -Vgcc_ntoarmv7 -c -Wc,-Wall -fstack-protector-strong -D_FORTIFY_SOURCE=2 -I. -IC:/src/2014/BB10/DicePrO/arm/le.v7 -IC:/src/2014/BB10/DicePrO/arm/o.le-v7-g -IC:/src/2014/BB10/DicePrO/arm -IC:/src/2014/BB10/DicePrO -IC:/bbndk/target_10_2_0_1155/qnx6/usr/include/freetype2 -IC:/bbndk/target_10_2_0_1155/qnx6/../target-override/usr/include -IC:/bbndk/target_10_2_0_1155/qnx6/usr/include -EL -g -DVARIANT_le -DVARIANT_v7 -DVARIANT_g -DBUILDENV_qss C:/src/2014/BB10/DicePrO/main.c
In file included from C:/src/2014/BB10/DicePrO/main.c:17:0:
C:/src/2014/BB10/DicePrO/bbutil.h:36:27: warning: extra tokens at end of #include directive [enabled by default]
C:/bbndk/host_10_2_0_15/win32/x86/usr/bin/rm -f C:/src/2014/BB10/DicePrO/arm/o.le-v7-g/DicePrO
C:/bbndk/host_10_2_0_15/win32/x86/usr/bin/qcc -Vgcc_ntoarmv7 -Wl,--no-keep-memory -Wl,-z,relro -Wl,-z,now -o C:/src/2014/BB10/DicePrO/arm/o.le-v7-g/DicePrO bbutil.o main.o -L . -L C:/bbndk/target_10_2_0_1155/qnx6/../target-override/armle-v7/lib -L C:/bbndk/target_10_2_0_1155/qnx6/../target-override/armle-v7/usr/lib -L C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/lib -L C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib -Wl,--rpath-link . -Wl,--rpath-link C:/bbndk/target_10_2_0_1155/qnx6/../target-override/armle-v7/lib -Wl,--rpath-link C:/bbndk/target_10_2_0_1155/qnx6/../target-override/armle-v7/usr/lib -Wl,--rpath-link C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/lib -Wl,--rpath-link C:/bbndk/target_10_2_0_1155/qnx6/armle-v7/usr/lib -EL -g
bbutil.o: In function `bbutil_egl_perror':
C:/src/2014/BB10/DicePrO/bbutil.c:93: undefined reference to `eglGetError'
bbutil.o: In function `bbutil_init_egl':
C:/src/2014/BB10/DicePrO/bbutil.c:130: undefined reference to `eglGetDisplay'
C:/src/2014/BB10/DicePrO/bbutil.c:137: undefined reference to `eglInitialize'
C:/src/2014/BB10/DicePrO/bbutil.c:144: undefined reference to `eglBindAPI'
C:/src/2014/BB10/DicePrO/bbutil.c:152: undefined reference to `eglChooseConfig'
C:/src/2014/BB10/DicePrO/bbutil.c:160: undefined reference to `eglCreateContext'
C:/src/2014/BB10/DicePrO/bbutil.c:169: undefined reference to `screen_create_window'
C:/src/2014/BB10/DicePrO/bbutil.c:176: undefined reference to `screen_set_window_property_iv'
C:/src/2014/BB10/DicePrO/bbutil.c:183: undefined reference to `screen_set_window_property_iv'
C:/src/2014/BB10/DicePrO/bbutil.c:190: undefined reference to `screen_get_window_property_pv'
C:/src/2014/BB10/DicePrO/bbutil.c:199: undefined reference to `screen_get_display_property_iv'
C:/src/2014/BB10/DicePrO/bbutil.c:209: undefined reference to `screen_get_display_property_pv'
C:/src/2014/BB10/DicePrO/bbutil.c:217: undefined reference to `screen_get_window_property_iv'
C:/src/2014/BB10/DicePrO/bbutil.c:244: undefined reference to `screen_set_window_property_iv'
C:/src/2014/BB10/DicePrO/bbutil.c:251: undefined reference to `screen_set_window_property_iv'
C:/src/2014/BB10/DicePrO/bbutil.c:258: undefined reference to `screen_create_window_buffers'
C:/src/2014/BB10/DicePrO/bbutil.c:265: undefined reference to `eglCreateWindowSurface'
C:/src/2014/BB10/DicePrO/bbutil.c:272: undefined reference to `eglMakeCurrent'
C:/src/2014/BB10/DicePrO/bbutil.c:279: undefined reference to `eglSwapInterval'
bbutil.o: In function `bbutil_terminate':
C:/src/2014/BB10/DicePrO/bbutil.c:295: undefined reference to `eglMakeCurrent'
C:/src/2014/BB10/DicePrO/bbutil.c:297: undefined reference to `eglDestroySurface'
C:/src/2014/BB10/DicePrO/bbutil.c:301: undefined reference to `eglDestroyContext'
C:/src/2014/BB10/DicePrO/bbutil.c:305: undefined reference to `screen_destroy_window'
C:/src/2014/BB10/DicePrO/bbutil.c:308: undefined reference to `eglTerminate'
C:/src/2014/BB10/DicePrO/bbutil.c:311: undefined reference to `eglReleaseThread'
bbutil.o: In function `bbutil_swap':
C:/src/2014/BB10/DicePrO/bbutil.c:318: undefined reference to `eglSwapBuffers'
bbutil.o: In function `bbutil_load_font':
C:/src/2014/BB10/DicePrO/bbutil.c:350: undefined reference to `FT_Init_FreeType'
C:/src/2014/BB10/DicePrO/bbutil.c:354: undefined reference to `FT_New_Face'
C:/src/2014/BB10/DicePrO/bbutil.c:359: undefined reference to `FT_Set_Char_Size'
C:/src/2014/BB10/DicePrO/bbutil.c:374: undefined reference to `glGenTextures'
C:/src/2014/BB10/DicePrO/bbutil.c:387: undefined reference to `FT_Load_Char'
C:/src/2014/BB10/DicePrO/bbutil.c:423: undefined reference to `FT_Load_Char'
C:/src/2014/BB10/DicePrO/bbutil.c:459: undefined reference to `glBindTexture'
C:/src/2014/BB10/DicePrO/bbutil.c:460: undefined reference to `glTexParameteri'
C:/src/2014/BB10/DicePrO/bbutil.c:461: undefined reference to `glTexParameteri'
C:/src/2014/BB10/DicePrO/bbutil.c:463: undefined reference to `glTexImage2D'
C:/src/2014/BB10/DicePrO/bbutil.c:467: undefined reference to `FT_Done_Face'
C:/src/2014/BB10/DicePrO/bbutil.c:468: undefined reference to `FT_Done_FreeType'
bbutil.o: In function `bbutil_render_text':
C:/src/2014/BB10/DicePrO/bbutil.c:535: undefined reference to `glEnable'
C:/src/2014/BB10/DicePrO/bbutil.c:536: undefined reference to `glEnable'
C:/src/2014/BB10/DicePrO/bbutil.c:538: undefined reference to `glBlendFunc'
C:/src/2014/BB10/DicePrO/bbutil.c:540: undefined reference to `glEnableClientState'
C:/src/2014/BB10/DicePrO/bbutil.c:541: undefined reference to `glEnableClientState'
C:/src/2014/BB10/DicePrO/bbutil.c:543: undefined reference to `glColor4f'
C:/src/2014/BB10/DicePrO/bbutil.c:545: undefined reference to `glVertexPointer'
C:/src/2014/BB10/DicePrO/bbutil.c:546: undefined reference to `glTexCoordPointer'
C:/src/2014/BB10/DicePrO/bbutil.c:547: undefined reference to `glBindTexture'
C:/src/2014/BB10/DicePrO/bbutil.c:549: undefined reference to `glDrawElements'
C:/src/2014/BB10/DicePrO/bbutil.c:551: undefined reference to `glDisableClientState'
C:/src/2014/BB10/DicePrO/bbutil.c:552: undefined reference to `glDisableClientState'
C:/src/2014/BB10/DicePrO/bbutil.c:553: undefined reference to `glDisable'
C:/src/2014/BB10/DicePrO/bbutil.c:554: undefined reference to `glDisable'
bbutil.o: In function `bbutil_destroy_font':
C:/src/2014/BB10/DicePrO/bbutil.c:720: undefined reference to `glDeleteTextures'
bbutil.o: In function `bbutil_load_texture':
C:/src/2014/BB10/DicePrO/bbutil.c:778: undefined reference to `png16_png_sig_cmp'
C:/src/2014/BB10/DicePrO/bbutil.c:785: undefined reference to `png16_png_create_read_struct'
C:/src/2014/BB10/DicePrO/bbutil.c:792: undefined reference to `png16_png_create_info_struct'
C:/src/2014/BB10/DicePrO/bbutil.c:794: undefined reference to `png16_png_destroy_read_struct'
C:/src/2014/BB10/DicePrO/bbutil.c:800: undefined reference to `png16_png_create_info_struct'
C:/src/2014/BB10/DicePrO/bbutil.c:802: undefined reference to `png16_png_destroy_read_struct'
C:/src/2014/BB10/DicePrO/bbutil.c:808: undefined reference to `png16_png_set_longjmp_fn'
C:/src/2014/BB10/DicePrO/bbutil.c:808: undefined reference to `png16_png_set_longjmp_fn'
C:/src/2014/BB10/DicePrO/bbutil.c:809: undefined reference to `png16_png_destroy_read_struct'
C:/src/2014/BB10/DicePrO/bbutil.c:815: undefined reference to `png16_png_init_io'
C:/src/2014/BB10/DicePrO/bbutil.c:818: undefined reference to `png16_png_set_sig_bytes'
C:/src/2014/BB10/DicePrO/bbutil.c:821: undefined reference to `png16_png_read_info'
C:/src/2014/BB10/DicePrO/bbutil.c:828: undefined reference to `png16_png_get_IHDR'
C:/src/2014/BB10/DicePrO/bbutil.c:841: undefined reference to `png16_png_destroy_read_struct'
C:/src/2014/BB10/DicePrO/bbutil.c:846: undefined reference to `png16_png_read_update_info'
C:/src/2014/BB10/DicePrO/bbutil.c:849: undefined reference to `png16_png_get_rowbytes'
C:/src/2014/BB10/DicePrO/bbutil.c:856: undefined reference to `png16_png_destroy_read_struct'
C:/src/2014/BB10/DicePrO/bbutil.c:865: undefined reference to `png16_png_destroy_read_struct'
C:/src/2014/BB10/DicePrO/bbutil.c:877: undefined reference to `png16_png_read_image'
C:/src/2014/BB10/DicePrO/bbutil.c:884: undefined reference to `glGenTextures'
C:/src/2014/BB10/DicePrO/bbutil.c:885: undefined reference to `glBindTexture'
C:/src/2014/BB10/DicePrO/bbutil.c:886: undefined reference to `glTexParameteri'
C:/src/2014/BB10/DicePrO/bbutil.c:887: undefined reference to `glTexParameteri'
C:/src/2014/BB10/DicePrO/bbutil.c:888: undefined reference to `glTexParameteri'
C:/src/2014/BB10/DicePrO/bbutil.c:889: undefined reference to `glTexParameteri'
C:/src/2014/BB10/DicePrO/bbutil.c:891: undefined reference to `glPixelStorei'
C:/src/2014/BB10/DicePrO/bbutil.c:894: undefined reference to `glTexImage2D'
C:/src/2014/BB10/DicePrO/bbutil.c:895: undefined reference to `glTexSubImage2D'
C:/src/2014/BB10/DicePrO/bbutil.c:897: undefined reference to `glTexImage2D'
C:/src/2014/BB10/DicePrO/bbutil.c:900: undefined reference to `glGetError'
C:/src/2014/BB10/DicePrO/bbutil.c:903: undefined reference to `png16_png_destroy_read_struct'
bbutil.o: In function `bbutil_calculate_dpi':
C:/src/2014/BB10/DicePrO/bbutil.c:934: undefined reference to `screen_get_display_property_iv'
C:/src/2014/BB10/DicePrO/bbutil.c:946: undefined reference to `screen_get_display_property_iv'
C:/src/2014/BB10/DicePrO/bbutil.c:952: undefined reference to `sqrt'
C:/src/2014/BB10/DicePrO/bbutil.c:953: undefined reference to `sqrt'
bbutil.o: In function `bbutil_rotate_screen_surface':
C:/src/2014/BB10/DicePrO/bbutil.c:969: undefined reference to `screen_get_window_property_iv'
C:/src/2014/BB10/DicePrO/bbutil.c:975: undefined reference to `screen_get_window_property_iv'
C:/src/2014/BB10/DicePrO/bbutil.c:994: undefined reference to `eglMakeCurrent'
C:/src/2014/BB10/DicePrO/bbutil.c:1000: undefined reference to `eglDestroySurface'
C:/src/2014/BB10/DicePrO/bbutil.c:1006: undefined reference to `screen_set_window_property_iv'
C:/src/2014/BB10/DicePrO/bbutil.c:1012: undefined reference to `screen_set_window_property_iv'
C:/src/2014/BB10/DicePrO/bbutil.c:1017: undefined reference to `eglCreateWindowSurface'
C:/src/2014/BB10/DicePrO/bbutil.c:1023: undefined reference to `eglMakeCurrent'
C:/src/2014/BB10/DicePrO/bbutil.c:1029: undefined reference to `eglSwapInterval'
C:/src/2014/BB10/DicePrO/bbutil.c:1036: undefined reference to `screen_set_window_property_iv'
main.o: In function `handleScreenEvent':
C:/src/2014/BB10/DicePrO/main.c:174: undefined reference to `screen_event_get_event'
C:/src/2014/BB10/DicePrO/main.c:177: undefined reference to `screen_get_event_property_iv'
C:/src/2014/BB10/DicePrO/main.c:179: undefined reference to `screen_get_event_property_iv'
C:/src/2014/BB10/DicePrO/main.c:189: undefined reference to `screen_get_event_property_iv'
main.o: In function `handleNavigatorEvent':
C:/src/2014/BB10/DicePrO/main.c:206: undefined reference to `bps_event_get_code'
C:/src/2014/BB10/DicePrO/main.c:209: undefined reference to `navigator_orientation_check_response'
C:/src/2014/BB10/DicePrO/main.c:234: undefined reference to `sensor_stop_events'
C:/src/2014/BB10/DicePrO/main.c:237: undefined reference to `bps_get_event'
C:/src/2014/BB10/DicePrO/main.c:242: undefined reference to `bps_event_get_domain'
C:/src/2014/BB10/DicePrO/main.c:242: undefined reference to `navigator_get_domain'
C:/src/2014/BB10/DicePrO/main.c:243: undefined reference to `bps_event_get_code'
C:/src/2014/BB10/DicePrO/main.c:248: undefined reference to `sensor_request_events'
main.o: In function `handle_events':
C:/src/2014/BB10/DicePrO/main.c:262: undefined reference to `bps_get_event'
C:/src/2014/BB10/DicePrO/main.c:268: undefined reference to `bps_event_get_domain'
C:/src/2014/BB10/DicePrO/main.c:270: undefined reference to `screen_get_domain'
C:/src/2014/BB10/DicePrO/main.c:272: undefined reference to `navigator_get_domain'
C:/src/2014/BB10/DicePrO/main.c:274: undefined reference to `sensor_get_domain'
C:/src/2014/BB10/DicePrO/main.c:275: undefined reference to `bps_event_get_code'
C:/src/2014/BB10/DicePrO/main.c:280: undefined reference to `sensor_event_get_xyz'
main.o: In function `resize':
C:/src/2014/BB10/DicePrO/main.c:304: undefined reference to `navigator_event_get_orientation_angle'
C:/src/2014/BB10/DicePrO/main.c:313: undefined reference to `eglQuerySurface'
C:/src/2014/BB10/DicePrO/main.c:314: undefined reference to `eglQuerySurface'
C:/src/2014/BB10/DicePrO/main.c:316: undefined reference to `eglGetError'
C:/src/2014/BB10/DicePrO/main.c:349: undefined reference to `navigator_done_orientation'
main.o: In function `initialize':
C:/src/2014/BB10/DicePrO/main.c:453: undefined reference to `eglQuerySurface'
C:/src/2014/BB10/DicePrO/main.c:454: undefined reference to `eglQuerySurface'
C:/src/2014/BB10/DicePrO/main.c:456: undefined reference to `eglGetError'
C:/src/2014/BB10/DicePrO/main.c:585: undefined reference to `glShadeModel'
C:/src/2014/BB10/DicePrO/main.c:586: undefined reference to `glClearColor'
C:/src/2014/BB10/DicePrO/main.c:588: undefined reference to `glLightfv'
C:/src/2014/BB10/DicePrO/main.c:589: undefined reference to `glLightfv'
C:/src/2014/BB10/DicePrO/main.c:590: undefined reference to `glLightfv'
C:/src/2014/BB10/DicePrO/main.c:591: undefined reference to `glLightfv'
C:/src/2014/BB10/DicePrO/main.c:593: undefined reference to `glEnable'
main.o: In function `enable_2d':
C:/src/2014/BB10/DicePrO/main.c:601: undefined reference to `glViewport'
C:/src/2014/BB10/DicePrO/main.c:603: undefined reference to `glMatrixMode'
C:/src/2014/BB10/DicePrO/main.c:604: undefined reference to `glLoadIdentity'
C:/src/2014/BB10/DicePrO/main.c:606: undefined reference to `glOrthof'
C:/src/2014/BB10/DicePrO/main.c:608: undefined reference to `glMatrixMode'
C:/src/2014/BB10/DicePrO/main.c:609: undefined reference to `glLoadIdentity'
C:/src/2014/BB10/DicePrO/main.c:610: undefined reference to `glScalef'
main.o: In function `enable_3d':
C:/src/2014/BB10/DicePrO/main.c:614: undefined reference to `glViewport'
C:/src/2014/BB10/DicePrO/main.c:622: undefined reference to `tan'
C:/src/2014/BB10/DicePrO/main.c:625: undefined reference to `glMatrixMode'
C:/src/2014/BB10/DicePrO/main.c:626: undefined reference to `glLoadIdentity'
C:/src/2014/BB10/DicePrO/main.c:628: undefined reference to `glFrustumf'
C:/src/2014/BB10/DicePrO/main.c:631: undefined reference to `glMatrixMode'
C:/src/2014/BB10/DicePrO/main.c:632: undefined reference to `glLoadIdentity'
main.o: In function `update':
C:/src/2014/BB10/DicePrO/main.c:648: undefined reference to `fmod'
C:/src/2014/BB10/DicePrO/main.c:649: undefined reference to `fmod'
C:/src/2014/BB10/DicePrO/main.c:650: undefined reference to `fmod'
C:/src/2014/BB10/DicePrO/main.c:690: undefined reference to `fmod'
C:/src/2014/BB10/DicePrO/main.c:691: undefined reference to `fmod'
main.o:C:/src/2014/BB10/DicePrO/main.c:692: more undefined references to `fmod' follow
main.o: In function `render':
C:/src/2014/BB10/DicePrO/main.c:745: undefined reference to `glClear'
C:/src/2014/BB10/DicePrO/main.c:750: undefined reference to `glEnable'
C:/src/2014/BB10/DicePrO/main.c:751: undefined reference to `glEnableClientState'
C:/src/2014/BB10/DicePrO/main.c:752: undefined reference to `glEnableClientState'
C:/src/2014/BB10/DicePrO/main.c:754: undefined reference to `glEnable'
C:/src/2014/BB10/DicePrO/main.c:755: undefined reference to `glBlendFunc'
C:/src/2014/BB10/DicePrO/main.c:757: undefined reference to `glColor4f'
C:/src/2014/BB10/DicePrO/main.c:759: undefined reference to `glVertexPointer'
C:/src/2014/BB10/DicePrO/main.c:760: undefined reference to `glTexCoordPointer'
C:/src/2014/BB10/DicePrO/main.c:761: undefined reference to `glBindTexture'
C:/src/2014/BB10/DicePrO/main.c:763: undefined reference to `glDrawArrays'
C:/src/2014/BB10/DicePrO/main.c:766: undefined reference to `glTranslatef'
C:/src/2014/BB10/DicePrO/main.c:770: undefined reference to `glVertexPointer'
C:/src/2014/BB10/DicePrO/main.c:771: undefined reference to `glTexCoordPointer'
C:/src/2014/BB10/DicePrO/main.c:772: undefined reference to `glBindTexture'
C:/src/2014/BB10/DicePrO/main.c:774: undefined reference to `glVertexPointer'
C:/src/2014/BB10/DicePrO/main.c:775: undefined reference to `glTexCoordPointer'
C:/src/2014/BB10/DicePrO/main.c:777: undefined reference to `glBindTexture'
C:/src/2014/BB10/DicePrO/main.c:780: undefined reference to `glColor4f'
C:/src/2014/BB10/DicePrO/main.c:781: undefined reference to `glDrawArrays'
C:/src/2014/BB10/DicePrO/main.c:782: undefined reference to `glTranslatef'
C:/src/2014/BB10/DicePrO/main.c:794: undefined reference to `glDisableClientState'
C:/src/2014/BB10/DicePrO/main.c:795: undefined reference to `glDisableClientState'
C:/src/2014/BB10/DicePrO/main.c:796: undefined reference to `glDisable'
C:/src/2014/BB10/DicePrO/main.c:800: undefined reference to `glEnable'
C:/src/2014/BB10/DicePrO/main.c:801: undefined reference to `glEnable'
C:/src/2014/BB10/DicePrO/main.c:802: undefined reference to `glEnable'
C:/src/2014/BB10/DicePrO/main.c:803: undefined reference to `glEnable'
C:/src/2014/BB10/DicePrO/main.c:805: undefined reference to `glTranslatef'
C:/src/2014/BB10/DicePrO/main.c:807: undefined reference to `glRotatef'
C:/src/2014/BB10/DicePrO/main.c:808: undefined reference to `glRotatef'
C:/src/2014/BB10/DicePrO/main.c:809: undefined reference to `glRotatef'
C:/src/2014/BB10/DicePrO/main.c:811: undefined reference to `glColor4f'
C:/src/2014/BB10/DicePrO/main.c:813: undefined reference to `glEnableClientState'
C:/src/2014/BB10/DicePrO/main.c:814: undefined reference to `glEnableClientState'
C:/src/2014/BB10/DicePrO/main.c:815: undefined reference to `glEnableClientState'
C:/src/2014/BB10/DicePrO/main.c:816: undefined reference to `glEnable'
C:/src/2014/BB10/DicePrO/main.c:818: undefined reference to `glVertexPointer'
C:/src/2014/BB10/DicePrO/main.c:819: undefined reference to `glNormalPointer'
C:/src/2014/BB10/DicePrO/main.c:820: undefined reference to `glTexCoordPointer'
C:/src/2014/BB10/DicePrO/main.c:823: undefined reference to `glBindTexture'
C:/src/2014/BB10/DicePrO/main.c:824: undefined reference to `glDrawArrays'
C:/src/2014/BB10/DicePrO/main.c:825: undefined reference to `glBindTexture'
C:/src/2014/BB10/DicePrO/main.c:826: undefined reference to `glDrawArrays'
C:/src/2014/BB10/DicePrO/main.c:827: undefined reference to `glBindTexture'
C:/src/2014/BB10/DicePrO/main.c:828: undefined reference to `glDrawArrays'
C:/src/2014/BB10/DicePrO/main.c:829: undefined reference to `glBindTexture'
C:/src/2014/BB10/DicePrO/main.c:830: undefined reference to `glDrawArrays'
C:/src/2014/BB10/DicePrO/main.c:831: undefined reference to `glBindTexture'
C:/src/2014/BB10/DicePrO/main.c:832: undefined reference to `glDrawArrays'
C:/src/2014/BB10/DicePrO/main.c:833: undefined reference to `glBindTexture'
C:/src/2014/BB10/DicePrO/main.c:834: undefined reference to `glDrawArrays'
C:/src/2014/BB10/DicePrO/main.c:836: undefined reference to `glDisableClientState'
C:/src/2014/BB10/DicePrO/main.c:837: undefined reference to `glDisableClientState'
C:/src/2014/BB10/DicePrO/main.c:838: undefined reference to `glDisableClientState'
C:/src/2014/BB10/DicePrO/main.c:839: undefined reference to `glDisable'
C:/src/2014/BB10/DicePrO/main.c:840: undefined reference to `glDisable'
C:/src/2014/BB10/DicePrO/main.c:841: undefined reference to `glDisable'
C:/src/2014/BB10/DicePrO/main.c:842: undefined reference to `glDisable'
C:/src/2014/BB10/DicePrO/main.c:843: undefined reference to `glDisable'
main.o: In function `main':
C:/src/2014/BB10/DicePrO/main.c:910: undefined reference to `screen_create_context'
C:/src/2014/BB10/DicePrO/main.c:913: undefined reference to `bps_initialize'
C:/src/2014/BB10/DicePrO/main.c:919: undefined reference to `screen_destroy_context'
C:/src/2014/BB10/DicePrO/main.c:927: undefined reference to `screen_destroy_context'
C:/src/2014/BB10/DicePrO/main.c:932: undefined reference to `screen_request_events'
C:/src/2014/BB10/DicePrO/main.c:935: undefined reference to `screen_destroy_context'
C:/src/2014/BB10/DicePrO/main.c:939: undefined reference to `navigator_request_events'
C:/src/2014/BB10/DicePrO/main.c:942: undefined reference to `screen_destroy_context'
C:/src/2014/BB10/DicePrO/main.c:949: undefined reference to `sensor_is_supported'
C:/src/2014/BB10/DicePrO/main.c:952: undefined reference to `screen_destroy_context'
C:/src/2014/BB10/DicePrO/main.c:953: undefined reference to `bps_shutdown'
C:/src/2014/BB10/DicePrO/main.c:961: undefined reference to `sensor_set_rate'
C:/src/2014/BB10/DicePrO/main.c:962: undefined reference to `sensor_set_skip_duplicates'
C:/src/2014/BB10/DicePrO/main.c:963: undefined reference to `sensor_request_events'
C:/src/2014/BB10/DicePrO/main.c:975: undefined reference to `screen_stop_events'
C:/src/2014/BB10/DicePrO/main.c:981: undefined reference to `bps_shutdown'
C:/src/2014/BB10/DicePrO/main.c:984: undefined reference to `screen_destroy_context'
cc: C:/bbndk/host_10_2_0_15/win32/x86/usr/bin/ntoarm-ld caught signal 1
make[2]: *** [C:/src/2014/BB10/DicePrO/arm/o.le-v7-g/DicePrO] Error 1
make[2]: Leaving directory `C:/src/2014/BB10/DicePrO/arm/o.le-v7-g'
make[1]: *** [all] Error 2
make[1]: Leaving directory `C:/src/2014/BB10/DicePrO/arm'
make: *** [all] Error 2

 

I will provide the included headers now.

 

main.c:

#include "bbutil.h"

 

 

bbutil.h:

#include <sys/platform.h>
#include <bps/navigator.h>
#include <bps/screen.h>
#include <bps/sensor.h>
#include <bps/bps.h>
#include <bps/event.h>


#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <math.h>
#include <GLES/egl.h>
#ifndef USING_GL11
#define USING_GL11
#include <glview/glview.h>1
#endif


#ifdef USING_GL11
#include <GLES/gl.h>
#include <GLES/glext.h>
#elif defined(USING_GL20)
#include <GLES2/gl2.h>
#else
#error bbutil must be compiled with either USING_GL11 or USING_GL20 flags
#endif

 

bbutil.c:

#include <ctype.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/keycodes.h>
#include <time.h>
#include <stdbool.h>
#include <math.h>

#include "bbutil.h"

 

#include <ft2build.h>
#include FT_FREETYPE_H

#include "png.h"

 

Please take a look and, if you are capable of doing so, tell me what is wrong causing those errors in this code.

Developer
chevpower394
Posts: 78
Registered: ‎02-10-2014
My Device: Q10SQN100-1

Re: Compile Issues - undefined references

If you think everything should be working correctly. Try creating a new hello world project and seeing if that compiles fine. I have noticed on my pc that momentics get pretty wonky if the pc gets low on memory. If it won't compile anything I have to restart, close all background services and run only momentics. This is mainly because my machine is not quite enough to do it all.

New Developer
sagenth
Posts: 10
Registered: ‎11-03-2011
My Device: Q10

Re: Compile Issues - undefined references

[ Edited ]

Thanks for the suggestions. It gives me something to try out I suppose, but am sure my computer isn't using up 16GB.

The only thing I can really think of which I haven't tried is creating a managed project; I assumed since the project had a makefile it needed to use it. So I should either read up on makefiles or go try that.

Might as well try, if it fixes it I will mark this as answered.

 

Edit: After much thought I am pretty sure I know what stupid thing I didn't even consider.. I haven't linked any of the library files..

 

It was in fact the lack of linked libraries.