Skip to main content
gfxfloro
Associate III
April 7, 2022
Solved

Getting an unresolved reference for a static library

  • April 7, 2022
  • 2 replies
  • 1488 views

Hi,

I am trying to implement STemWin v5.22 for an F4 MCU. I made sure to provide a path to the static library and included all the other necessary files. However I still get this error:

../Lib\lib_STemWin522_CM4_GCC.a(GUI_Core.o): In function `GUI__Config':
GUI_Core.c:(.text.GUI__Config+0xc): undefined reference to `GUI_X_Config'
collect2.exe: error: ld returned 1 exit status

GUI_X_Config is defined in GUI.h of the STemWin library, to which there is a path provided.

I don't really understand why there is still an unresolved dependency. Are there other files necessary for this STemWin version? I only got the static library from some online repo, not the official ST website. I don't think this version of STemWin is available anymore

This topic has been closed for replies.
Best answer by waclawek.jan

> GUI_X_Config is defined in GUI.h

Is it *defined* there, or just *declared*? (ie. is there a function body, or just the header)?

I never used STemWin but isn't GUI_X_Config a function you are supposed to provide in your code? Sort of a callback or insert to GUI__Config, so that user can add some needed initialization on his side? Maybe the related documentation talks about this?

JW

2 replies

waclawek.jan
waclawek.janBest answer
Super User
April 7, 2022

> GUI_X_Config is defined in GUI.h

Is it *defined* there, or just *declared*? (ie. is there a function body, or just the header)?

I never used STemWin but isn't GUI_X_Config a function you are supposed to provide in your code? Sort of a callback or insert to GUI__Config, so that user can add some needed initialization on his side? Maybe the related documentation talks about this?

JW

gfxfloro
gfxfloroAuthor
Associate III
April 8, 2022

this was a good tip, the repo I got the library from wasn't complete it seems. I found another STemWin implementation, where GUIConf.c was provided with the full function.

Thank you!

Visitor II
April 23, 2024

Hi, please where did you find the other STemWin implementation. I am having the same issue.

Thanks in advance