The next "undifned reference"

Your English is okay, but let me help clarify your message:

I’ve noticed many similar issue reports, but I haven’t found a solution yet.

When I add a new custom library, I struggle to make it work. I was porting my old EM4100 library from Atmega to ESP32, but I can’t even test it. I can include it, and it gets linked, but no function works: init_em4100() --> undefined reference.

So, I created a very basic library called test with only one function test(). The linker/compiler recognizes the library but always ends with an ‘undefined reference’.

What am I overlooking?

please take a look to my ide

You are mixing C with C++ code!
Rename “test.c” to “test.cpp” and it should work.

Otherwise declare your C functions extern "C"
See How to mix C and C++

1 Like

Oh man. i thank you so much.i should ask you yesterday, before this useless night happend.