Jump to content

Problem Compiling Demos on Raspberry Pi


Andy Fraser

Recommended Posts

Followed the instructions here: https://wiki.ugfx.io/index.php/Raspberry_Pi and was able to build and run the basic demo.

However, when I try changing  GFXDEMO to applications/combo, I get the following linker errors.

Quote

Compiling ../resources/ugfx/demos/applications/combo/main.c
Compiling ../resources/ugfx/demos/applications/combo/mandelbrot.c
Compiling ../resources/ugfx/demos/applications/combo/bounce.c
Linking .build/hello-world
/usr/bin/ld: /tmp/cc2ezqga.ltrans0.ltrans.o: in function `setbtntext':
<artificial>:(.text+0x2950): undefined reference to `gdispGetStringWidth'
/usr/bin/ld: /tmp/cc2ezqga.ltrans0.ltrans.o: in function `createWidgets':
<artificial>:(.text+0x2a44): undefined reference to `gwinWidgetClearInit'
/usr/bin/ld: <artificial>:(.text+0x2b18): undefined reference to `gwinGTabsetCreate'
/usr/bin/ld: <artificial>:(.text+0x2b3c): undefined reference to `gwinTabsetAddTab'
/usr/bin/ld: <artificial>:(.text+0x2b60): undefined reference to `gwinTabsetAddTab'
/usr/bin/ld: <artificial>:(.text+0x2b84): undefined reference to `gwinTabsetAddTab'
/usr/bin/ld: <artificial>:(.text+0x2ba8): undefined reference to `gwinTabsetAddTab'
/usr/bin/ld: <artificial>:(.text+0x2bcc): undefined reference to `gwinTabsetAddTab'
/usr/bin/ld: /tmp/cc2ezqga.ltrans0.ltrans.o:<artificial>:(.text+0x2bf0): more undefined references to `gwinTabsetAddTab' follow
/usr/bin/ld: /tmp/cc2ezqga.ltrans0.ltrans.o: in function `createWidgets':
 

If I change to another example such as applications/notepad I get far fewer errors but still linker errors. I can't seem to get any other examples to work either.

Quote

Linker Options........
gcc -pthread -march=armv6zk -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -Wl,--gc-sections -lrt -lrt .build/obj/fakefile.o -o .build/hello-world
.
Linking .build/hello-world
/usr/bin/ld: /tmp/cc3jP23j.ltrans0.ltrans.o: in function `drawScreen':
<artificial>:(.text+0x28d8): undefined reference to `gdispOpenFont'
/usr/bin/ld: <artificial>:(.text+0x28e4): undefined reference to `gdispOpenFont'
/usr/bin/ld: <artificial>:(.text+0x2928): undefined reference to `gdispGetStringWidth'
/usr/bin/ld: <artificial>:(.text+0x2964): undefined reference to `gdispGDrawString'
/usr/bin/ld: <artificial>:(.text+0x2a9c): undefined reference to `gdispGFillStringBox'
/usr/bin/ld: <artificial>:(.text+0x2ae4): undefined reference to `gdispGFillStringBox'
/usr/bin/ld: <artificial>:(.text+0x2b2c): undefined reference to `gdispGFillStringBox'
/usr/bin/ld: <artificial>:(.text+0x2b74): undefined reference to `gdispGFillStringBox'
/usr/bin/ld: <artificial>:(.text+0x2bbc): undefined reference to `gdispGFillStringBox'
/usr/bin/ld: <artificial>:(.text+0x2bc4): undefined reference to `gdispCloseFont'
/usr/bin/ld: <artificial>:(.text+0x2bcc): undefined reference to `gdispCloseFont'
/usr/bin/ld: /tmp/cc3jP23j.ltrans0.ltrans.o: in function `main':
<artificial>:(.text+0x2c20): undefined reference to `ginputGetMouse'
/usr/bin/ld: <artificial>:(.text+0x2c30): undefined reference to `ginputGetMouseStatus'
/usr/bin/ld: <artificial>:(.text+0x2f2c): undefined reference to `gdispGFillCircle'
collect2: error: ld returned 1 exit status
make: *** [../resources/ugfx/tools/gmake_scripts/compiler_gcc.mk:304: .build/hello-world] Error 1
 

Can anyone point out what I am doing wrong?

Andy

Link to comment
Share on other sites

Hello & welcome to the µGFX community!

Regarding your first compilation output: It seems like the corresponding features are not enabled in the configuration file (gfxconf.h). Most notably it seems like GDISP_NEED_TEXT and GWIN_NEED_TABSET.
Did you use the configuration file that ships with the demo? If they are not enabled in there we certainly need to update that demo.

The same seems to be the case with your second compilation output. It seems like some features such as text, circles and GINPUT are not enabled.

Useful resources:

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...