Sysprogs forums › Forums › VisualGDB › ESP32 Arduino Core error with included library
Tagged: Arduino Core, Compile Error, esp32
- This topic has 9 replies, 2 voices, and was last updated 4 years, 7 months ago by support.
-
AuthorPosts
-
May 19, 2020 at 21:08 #28154jkallusParticipant
I’m trying to use https://github.com/pixelmatix/SmartMatrix/tree/teensylc with ESP32 to control RGB LED Matrixes. This library and its examples compile using the Arduino IDE version 1.8.12 with no errors. When I try to compile using VisualGDB it has this error:
C:\Users\Josh\source\repos\ArduinoProject1\ArduinoProject1\Output\ESP32_Dev_Module\Debug\sketch\ArduinoProject1.ino.cpp.o(0): error : undefined reference to `vtable for SM_Layer'
collect2.exe: error: ld returned 1 exit statusThis is something related to virtual functions probably but I think the issue lies not with this library but with something being done by VisualGDB. This could be a bug or perhaps I’m just using it wrong somehow. I’m using VisualGDB 5.4R12 build 3309 and the ESP32 toolchain version 8.2.0/8.1.0/r3.
May 19, 2020 at 21:10 #28155supportKeymasterHi,
Please try building the same project with the Arduino IDE. If the problem persists, the issue is with a specific library. If not, we can help you configure VisualGDB to match the behavior of the Arduino IDE.
May 19, 2020 at 21:16 #28156jkallusParticipantI opened the project made by VisualGDB in the Arduino IDE and it compiled fine there.
May 19, 2020 at 21:32 #28158supportKeymasterThanks for confirming this. To narrow the problem further, please follow the steps below:
- Dump the build command line used by VisualGDB to a batch file as shown here. Make sure the build fails when running the batch file.
- Try modifying the batch file to use the arduino-builder.exe from the Arduino IDE directory instead of the VisualGDB’s one. Does it solve the problem?
- If not, please check the ESP32 Arduino core version used by the Arduino IDE and VisualGDB. If they are not the same, please try updating the core used by VisualGDB via Tools->VisualGDB->Manage VisualGDB Packages.
May 19, 2020 at 21:48 #28159jkallusParticipantI tried following the troubleshooting tutorial but I don’t have the same window options as it. There is no VisualGDB build window available. The error I posted initially is from the Output window. There is no option to right click and dump to batch file there. I am running Visual Studio Community 2019 16.4.5
- This reply was modified 4 years, 7 months ago by jkallus.
May 19, 2020 at 21:50 #28160supportKeymasterPlease make sure you install the latest VisualGDB 5.5 Preview 5.
May 19, 2020 at 21:54 #28162jkallusParticipantI’ll do that now
May 19, 2020 at 22:34 #28163jkallusParticipantAfter updating to VisualGDB 5.5 Preview 5 I was able to dump to .bat file. I tried to replace the path to arduino-builder.exe with the Arduino installation path but when I ran the batch file it did’t run and displayed the usage of the executable suggesting the flags were not valid. Also the version of ESP32 Arduino Core is 1.04 for both VisualGDB and Arduino IDE.
May 20, 2020 at 03:33 #28164jkallusParticipantI resolved this by turning on verbose build and unchecking “Debug build disables optimization for: Arduino Sketch”. Perhaps there is some sort of bug involving the optimizations being used.
May 20, 2020 at 18:32 #28167supportKeymasterGood to know it works. BTW, we have a detailed tutorial showing how to compare build command lines between VisualGDB and the Arduino IDE here: https://visualgdb.com/tutorials/arduino/diagnosing/
-
AuthorPosts
- You must be logged in to reply to this topic.