2 years, 7 months ago.

Compile Error

/media/uploads/robjames_walker/draft2.h Hi,

I've written this code to control 2 stepper motors based on selection of type and direction using SPST switches and push button switches. My problem is that the code compiles with the error below. I'm sure that the solution is simple, but I'm not very good at software.

Error: Undefined symbol $Super$$main (referred from /extras/mbed_7130f322cb7e/TARGET_LPC1768/TOOLCHAIN_ARM_STD/mbed_sdk_boot.o).

Thanks in Advance

Rob

1 Answer

2 years, 7 months ago.

Isn't it simply because you put everything in a .h file instead of putting your main function in main.cpp? (Not sure if it needs to be main.cpp or just any .cpp).

Also did you write that much code without checking if it compiles in between? ;).

Just FYI, the online compiler doesn't care which .cpp main() is in as long as it's in one of them.

posted by Andy A 05 Feb 2018