cancel
Showing results for 
Search instead for 
Did you mean: 

Getting an unresolved reference for a static library

gfxfloro
Senior

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

1 ACCEPTED SOLUTION

Accepted Solutions

> 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

View solution in original post

3 REPLIES 3

> 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
Senior

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!

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

Thanks in advance