May 19, 2020 at 21:08 #28154
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 status
This 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 #28155
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 #28156
I opened the project made by VisualGDB in the Arduino IDE and it compiled fine there.May 19, 2020 at 21:32 #28158
Thanks for confirming this. To narrow the problem further, please follow the steps below:
May 19, 2020 at 21:48 #28159
- 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.
I 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
May 19, 2020 at 21:50 #28160
- This reply was modified 2 years, 8 months ago by jkallus.
Please make sure you install the latest VisualGDB 5.5 Preview 5.May 19, 2020 at 21:54 #28162
I’ll do that nowMay 19, 2020 at 22:34 #28163
After 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 #28164
I 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 #28167
Good 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/
You must be logged in to reply to this topic.