espressif / esp-who

Face detection and recognition framework
Other
1.65k stars 459 forks source link

undefined reference to "dl_matrix3du_free" #94

Closed fricoepolenta closed 4 years ago

fricoepolenta commented 4 years ago

Hi, I'm new to esp32. I want to try recognition_solution on my esp-eye.

When I launch "idf.py build" (on both systems) first I get error during esp-face building (resolved by commenting out "target_link_libraries" in "CMakeLists.txt".

After that, when I relaunch "idf.py build" i get several errors like this: fr_forward.c:235: undefined reference to dl_matrix3d_free' fr_forward.c:235: undefined reference todl_matrix3d_free' fr_flash.c:90: undefined reference to `dl_matrix3d_alloc' And other things related to dl_matrix_3d.

I also tried with adding #include "dl_lib_matrix3d.h" and #include "dl_lib_matrix3dq.h" in .c files of "face_recognition" (also adding "../lib/include" in component.mk) but still gets same errors (clean build directory every time).

fricoepolenta commented 4 years ago

Resolved by myself, posting here if can be useful for other nwebies. In file "esp-who\components\esp-face\CMakeLists.txt" and "esp-who\components\recorder_engine\CMakeLists.txt" you had better to comment out lines with target_link_libraries(esp-face "-L ${CMAKE_CURRENT_SOURCE_DIR}/lib") and target_link_libraries(recorder_engine "-L ${CMAKE_CURRENT_SOURCE_DIR}")

then add absolute path (use / intead of \ on windows) to libraries eg: target_link_libraries(esp-face C:/Users/MyUser/esp/esp-who/components/esp-face/lib/libdl_lib.a C:/Users/MyUser/esp/esp-who/components/esp-face/lib/libfd.a C:/Users/MyUser/esp/esp-who/components/esp-face/lib/libfr.a )

and

target_link_libraries(recorder_engine C:/Users/MyUser/esp/esp-who/components/recorder_engine/libesp_wakenet.a C:/Users/MyUser/esp/esp-who/components/recorder_engine/libnn_model.a )

Now, if I run "idf.py build" it ended successfully. Maybe would be a good idea changing these files in repo?