cancel
Showing results for 
Search instead for 
Did you mean: 

Undefined Reference To Error, but Open Declaration finds it and it's in the include path

KMew
Senior III

Hello,

I am using the STM32CubeIDE to write software to test the STSAFE (Nucleo-F401RE + Nucleo-SAFEA1). I am trying to get a basic software working and trying to use one of the STSAFE functions, but I am running into a strange error when I try to compile it. Based on all the searches I've done, this is typically a linker issue. However, I verified that the file that declares this function.

I think I'm getting tunnel visioned, but I cannot see what part I haven't linked properly. Does anyone know where else to look?


_legacyfs_online_stmicro_images_0693W00000bibLqQAI.png 

Open Declaration:


_legacyfs_online_stmicro_images_0693W00000bibMAQAY.png
_legacyfs_online_stmicro_images_0693W00000bibM5QAI.png
_legacyfs_online_stmicro_images_0693W00000bibMFQAY.png
_legacyfs_online_stmicro_images_0693W00000bibLIQAY.png
_legacyfs_online_stmicro_images_0693W00000bibMPQAY.png

1 ACCEPTED SOLUTION

Accepted Solutions

Include files define the interface expectations.

You still need the actual CODE that makes the functions work, which either comes from the linker pulling a precompiled library with that code, or the code file (.C / .CPP) for the library needs to be part of the project

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

4 REPLIES 4

Include files define the interface expectations.

You still need the actual CODE that makes the functions work, which either comes from the linker pulling a precompiled library with that code, or the code file (.C / .CPP) for the library needs to be part of the project

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Hello Tesla,

Thank you for the reply! This was exactly the problem. The previous projects I did had software packages that automatically included those, so I never looked at them before.

Doing this manually made me realize how many little linker issues there are!

Thank you very much :)

Hi, 

Can you please elaborate this? I am facing the same issue.

@Lionking 

If you have some C file in C++ source folder, then the headers (for C-files) shoulde be also additionally called in main.h file and include this "main.h" in C & C++ source.