Sysprogs forums › Forums › VisualGDB › U8G2 graphics library/component linking error
Tagged: u8g2
- This topic has 3 replies, 2 voices, and was last updated 5 years, 9 months ago by support.
-
AuthorPosts
-
February 5, 2019 at 22:35 #23706erzykParticipant
Hi,
I’m trying to include an OLED display into my ESP32 IDF projects. I found that there is a nice port of the u8g2 monochrome display library for ESP32 IDF.
The u8g2 library can be found here and the port files from N.Kolban are here
There is also a quite detailed instruction written by Luca which is here, he also uploaded a short clip to YouTube about it.I followed everything that was written in the links above but I simply can’t get this to compile. There must be some trivial mistake that I can not find. I get errors like this:
main/libmain.a(main.c.obj)(0): error : undefined reference to `u8g2_cb_r0' main/libmain.a(main.c.obj)(0): error : undefined reference to `u8g2_font_timR14_tf' main/libmain.a(main.c.obj)(0): error : undefined reference to `u8g2_Setup_ssd1306_128x64_noname_f' main/libmain.a(main.c.obj)(0): error : undefined reference to `u8x8_InitDisplay' main/libmain.a(main.c.obj)(0): error : undefined reference to `u8x8_SetPowerSave' main/libmain.a(main.c.obj)(0): error : undefined reference to `u8g2_SetFont' main/libmain.a(main.c.obj)(0): error : undefined reference to `u8g2_DrawStr' main/libmain.a(main.c.obj)(0): error : undefined reference to `u8g2_SendBuffer' main/libmain.a(main.c.obj): In function `app_main':
There is some linking error and I hardly can’t find where.
My project includign the u8g2 library and everything other can be found here.Can you help me put with this problem?
February 5, 2019 at 22:53 #23709supportKeymasterHi,
Sorry, we cannot provide much help troubleshooting 3rd-party libraries and components as a part of our product support. Our best advice would be to try searching the codebase for the definitions of the missing symbol and ensuring that the corresponding source or library file (.a) is included in the project. You may also find this tutorial useful – it explains the difference between C++ declarations and definitions and shows some tricks for finding symbol definitions in object files.
February 5, 2019 at 23:35 #23710erzykParticipantThe thing is, that there are no C++ files involved and if I compile it on the bare ESP32 IDF using command line tools I can get it to work…
The problem is only using Visual GBD in Visual Studio
February 5, 2019 at 23:48 #23711supportKeymasterHi,
If the project builds successfully from command line, please try importing it into VisualGDB using the import wizard and then compare the manual build command line against the command line issued by VisualGDB (you can find it in the View -> Output -> Build Output window). Once you identify the part of the command line that breaks the build, we can help you configure VisualGDB to ensure it uses the correct command line as well.
-
AuthorPosts
- You must be logged in to reply to this topic.