Skip to main content
Associate II
June 20, 2024
Solved

Help Needed: Undefined Reference Error in SPC5 Studio

  • June 20, 2024
  • 1 reply
  • 1980 views

Hi everyone,

I've created a library and placed it in the directory /source/driver/. The library consists of the following files:

  • source/driver/VN9d30Q100.h
  • source/driver/VN9d30Q100.c

The problem I'm encountering is that when I try to use a function from this library in my main.cpp file, I get an "undefined reference" error for the function VN9D30Q100_Init().

LuciferD_0-1718884762261.png

I've ensured that the header and source files are correctly written, and I believe the issue lies in how I'm compiling and linking these files in SPC5 Studio.

Can anyone guide me on how to properly include these files in my project settings, or if there's something else I'm missing?

Any help would be greatly appreciated!

Thanks in advance,
Lucifer

Best answer by Max VIZZINI

Hi,

Have you created a proper SPC5 project, or you are just using Eclipse?

If you have a proper SPC5 project all files under /source will be automatically included by the available makefile.

MaxVIZZINI_0-1719070565909.png

Best Regards,

AutoDevKit Team

1 reply

Max VIZZINI
Max VIZZINIBest answer
Technical Moderator
June 22, 2024

Hi,

Have you created a proper SPC5 project, or you are just using Eclipse?

If you have a proper SPC5 project all files under /source will be automatically included by the available makefile.

MaxVIZZINI_0-1719070565909.png

Best Regards,

AutoDevKit Team