Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP-SKAINET not building in C++. (AIS-1370) #116

Closed
nikhil-robinson opened this issue Sep 30, 2023 · 1 comment
Closed

ESP-SKAINET not building in C++. (AIS-1370) #116

nikhil-robinson opened this issue Sep 30, 2023 · 1 comment

Comments

@nikhil-robinson
Copy link

I was testing the esp-skainet example en_speech_commands_recognition on the esp32s3eye board the example builds fine but when i change the man.c to main.cpp i am getting some undefined reference warnings.

/home/nikhi/idf5/.espressif/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin/../lib/gcc/xtensa-esp32s3-elf/12.2.0/../../../../xtensa-esp32s3-elf/bin/ld: esp-idf/main/libmain.a(main.cpp.obj):(.literal._Z11detect_TaskPv+0x48): undefined reference to `_Z18esp_srmodel_filterP14srmodel_list_tPKcS2_'
/home/nikhi/idf5/.espressif/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin/../lib/gcc/xtensa-esp32s3-elf/12.2.0/../../../../xtensa-esp32s3-elf/bin/ld: esp-idf/main/libmain.a(main.cpp.obj):(.literal._Z11detect_TaskPv+0x4c): undefined reference to `_Z23esp_mn_handle_from_namePc'
/home/nikhi/idf5/.espressif/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin/../lib/gcc/xtensa-esp32s3-elf/12.2.0/../../../../xtensa-esp32s3-elf/bin/ld: esp-idf/main/libmain.a(main.cpp.obj):(.literal._Z11detect_TaskPv+0x50): undefined reference to `_Z37esp_mn_commands_update_from_sdkconfigPK14esp_mn_iface_tP18model_iface_data_t'
/home/nikhi/idf5/.espressif/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin/../lib/gcc/xtensa-esp32s3-elf/12.2.0/../../../../xtensa-esp32s3-elf/bin/ld: esp-idf/main/libmain.a(main.cpp.obj):(.literal.app_main+0x2c): undefined reference to `_Z16esp_srmodel_initPKc'
/home/nikhi/idf5/.espressif/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin/../lib/gcc/xtensa-esp32s3-elf/12.2.0/../../../../xtensa-esp32s3-elf/bin/ld: esp-idf/main/libmain.a(main.cpp.obj): in function `_Z11detect_TaskPv':
/home/nikhi/disk/esp-skainet/examples/en_speech_commands_recognition/main/main.cpp:73: undefined reference to `_Z18esp_srmodel_filterP14srmodel_list_tPKcS2_'
/home/nikhi/idf5/.espressif/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin/../lib/gcc/xtensa-esp32s3-elf/12.2.0/../../../../xtensa-esp32s3-elf/bin/ld: /home/nikhi/disk/esp-skainet/examples/en_speech_commands_recognition/main/main.cpp:74: undefined reference to `_Z23esp_mn_handle_from_namePc'
/home/nikhi/idf5/.espressif/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin/../lib/gcc/xtensa-esp32s3-elf/12.2.0/../../../../xtensa-esp32s3-elf/bin/ld: /home/nikhi/disk/esp-skainet/examples/en_speech_commands_recognition/main/main.cpp:78: undefined reference to `_Z37esp_mn_commands_update_from_sdkconfigPK14esp_mn_iface_tP18model_iface_data_t'
/home/nikhi/idf5/.espressif/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin/../lib/gcc/xtensa-esp32s3-elf/12.2.0/../../../../xtensa-esp32s3-elf/bin/ld: esp-idf/main/libmain.a(main.cpp.obj): in function `app_main':
/home/nikhi/disk/esp-skainet/examples/en_speech_commands_recognition/main/main.cpp:129: undefined reference to `_Z16esp_srmodel_initPKc'
/home/nikhi/idf5/.espressif/tools/xtensa-esp32s3-elf/esp-12.2.0_20230208/xtensa-esp32s3-elf/bin/../lib/gcc/xtensa-esp32s3-elf/12.2.0/../../../../xtensa-esp32s3-elf/bin/ld: /home/nikhi/disk/esp-skainet/examples/en_speech_commands_recognition/main/main.cpp:145: undefined reference to `_Z18esp_srmodel_filterP14srmodel_list_tPKcS2_'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Is it not posible to compile in c++ ?

Idf version : ESP-IDF v5.1.1-dirty
SOC: esp32s3
sdkconfig : the default one from the example

@github-actions github-actions bot changed the title ESP-SKAINET not building in C++. ESP-SKAINET not building in C++. (AIS-1370) Sep 30, 2023
@feizi feizi added the bug label Oct 8, 2023
@nikhil-robinson
Copy link
Author

@feizi this issue is solved when manually changing the the esp-sr to the latest commit. Missing some.

#ifdef __cplusplus
extern "C" {
#endif


#ifdef __cplusplus
}
#endif

in the header files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants