Я получаю следующую ошибку, когда компилирую свою программу file.cpp. Я использую Mac Os Sonoma 14.5. Я использую следующую команду для составления файла < /p>
clang++ -Wall -std=c++11 file.cpp -o file
< /code>
Как исправить следующую проблему? < /p>
Ошибка: < /p>
file.cpp:218:21: warning: variable 'i' set but not used [-Wunused-but-set-variable]
218 | int i;
| ^
file.cpp:286:21: warning: variable 'i' set but not used [-Wunused-but-set-variable]
286 | int i;
| ^
file.cpp:353:5: warning: non-void function does not return a value in all control paths [-Wreturn-type]
353 | }
| ^
3 warnings generated.
Undefined symbols for architecture x86_64:
"arma::H5check_version(unsigned int, unsigned int, unsigned int)", referenced from:
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
"arma::H5open()", referenced from:
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
"thread-local wrapper routine for arma::mt19937_64_instance", referenced from:
arma::(anonymous namespace)::mt19937_64_instance_warmup::mt19937_64_instance_warmup() in file-bba3cd.o
arma::arma_rng::set_seed(unsigned long long) in file-bba3cd.o
arma::arma_rng::randu::fill(double*, unsigned long long) in file-bba3cd.o
arma::arma_rng::randn::fill_simple(double*, unsigned long long) in file-bba3cd.o
arma::arma_rng::randi::operator int() in file-bba3cd.o
"_arma_H5Dclose", referenced from:
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
"_arma_H5Dcreate", referenced from:
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
"_arma_H5Dwrite", referenced from:
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
"_arma_H5Eget_auto", referenced from:
arma::hdf5_misc::hdf5_suspend_printing_errors::hdf5_suspend_printing_errors() in file-bba3cd.o
"_arma_H5Eset_auto", referenced from:
arma::hdf5_misc::hdf5_suspend_printing_errors::hdf5_suspend_printing_errors() in file-bba3cd.o
arma::hdf5_misc::hdf5_suspend_printing_errors::~hdf5_suspend_printing_errors() in file-bba3cd.o
"_arma_H5Fclose", referenced from:
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
"_arma_H5Fcreate", referenced from:
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
"_arma_H5Fis_hdf5", referenced from:
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
"_arma_H5Fopen", referenced from:
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
"_arma_H5Gclose", referenced from:
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
"_arma_H5Gcreate", referenced from:
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
"_arma_H5Gopen", referenced from:
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
"_arma_H5Ldelete", referenced from:
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
"_arma_H5Sclose", referenced from:
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
"_arma_H5Screate_simple", referenced from:
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
"_arma_H5T_NATIVE_DOUBLE", referenced from:
long long arma::hdf5_misc::get_hdf5_type() in file-bba3cd.o
"_arma_H5Tclose", referenced from:
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
"_arma_H5Tcopy", referenced from:
long long arma::hdf5_misc::get_hdf5_type() in file-bba3cd.o
"_wrapper2_dgemm_", referenced from:
void arma::blas::gemm(char const*, char const*, int const*, int const*, int const*, double const*, double const*, int const*, double const*, int const*, double const*, double*, int const*) in file-bba3cd.o
"_wrapper2_dgemv_", referenced from:
void arma::blas::gemv(char const*, int const*, int const*, double const*, double const*, int const*, double const*, int const*, double const*, double*, int const*) in file-bba3cd.o
ld: symbol(s) not found for architecture x86_64
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
Подробнее здесь: https://stackoverflow.com/questions/796 ... invocation
Clang ++: Ошибка: Команда линкера не удалась с кодом выхода 1 (используйте -v, чтобы увидеть вызов) ⇐ C++
Программы на C++. Форум разработчиков
1750317470
Anonymous
Я получаю следующую ошибку, когда компилирую свою программу file.cpp. Я использую Mac Os Sonoma 14.5. Я использую следующую команду для составления файла < /p>
clang++ -Wall -std=c++11 file.cpp -o file
< /code>
Как исправить следующую проблему? < /p>
Ошибка: < /p>
file.cpp:218:21: warning: variable 'i' set but not used [-Wunused-but-set-variable]
218 | int i;
| ^
file.cpp:286:21: warning: variable 'i' set but not used [-Wunused-but-set-variable]
286 | int i;
| ^
file.cpp:353:5: warning: non-void function does not return a value in all control paths [-Wreturn-type]
353 | }
| ^
3 warnings generated.
Undefined symbols for architecture x86_64:
"arma::H5check_version(unsigned int, unsigned int, unsigned int)", referenced from:
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
"arma::H5open()", referenced from:
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
"thread-local wrapper routine for arma::mt19937_64_instance", referenced from:
arma::(anonymous namespace)::mt19937_64_instance_warmup::mt19937_64_instance_warmup() in file-bba3cd.o
arma::arma_rng::set_seed(unsigned long long) in file-bba3cd.o
arma::arma_rng::randu::fill(double*, unsigned long long) in file-bba3cd.o
arma::arma_rng::randn::fill_simple(double*, unsigned long long) in file-bba3cd.o
arma::arma_rng::randi::operator int() in file-bba3cd.o
"_arma_H5Dclose", referenced from:
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
"_arma_H5Dcreate", referenced from:
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
"_arma_H5Dwrite", referenced from:
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
"_arma_H5Eget_auto", referenced from:
arma::hdf5_misc::hdf5_suspend_printing_errors::hdf5_suspend_printing_errors() in file-bba3cd.o
"_arma_H5Eset_auto", referenced from:
arma::hdf5_misc::hdf5_suspend_printing_errors::hdf5_suspend_printing_errors() in file-bba3cd.o
arma::hdf5_misc::hdf5_suspend_printing_errors::~hdf5_suspend_printing_errors() in file-bba3cd.o
"_arma_H5Fclose", referenced from:
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
"_arma_H5Fcreate", referenced from:
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
"_arma_H5Fis_hdf5", referenced from:
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
"_arma_H5Fopen", referenced from:
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
"_arma_H5Gclose", referenced from:
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
"_arma_H5Gcreate", referenced from:
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
"_arma_H5Gopen", referenced from:
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
"_arma_H5Ldelete", referenced from:
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
"_arma_H5Sclose", referenced from:
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
"_arma_H5Screate_simple", referenced from:
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
"_arma_H5T_NATIVE_DOUBLE", referenced from:
long long arma::hdf5_misc::get_hdf5_type() in file-bba3cd.o
"_arma_H5Tclose", referenced from:
bool arma::diskio::save_hdf5_binary(arma::Mat const&, arma::hdf5_name const&, std::__1::basic_string&) in file-bba3cd.o
"_arma_H5Tcopy", referenced from:
long long arma::hdf5_misc::get_hdf5_type() in file-bba3cd.o
"_wrapper2_dgemm_", referenced from:
void arma::blas::gemm(char const*, char const*, int const*, int const*, int const*, double const*, double const*, int const*, double const*, int const*, double const*, double*, int const*) in file-bba3cd.o
"_wrapper2_dgemv_", referenced from:
void arma::blas::gemv(char const*, int const*, int const*, double const*, double const*, int const*, double const*, int const*, double const*, double*, int const*) in file-bba3cd.o
ld: symbol(s) not found for architecture x86_64
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
Подробнее здесь: [url]https://stackoverflow.com/questions/79671665/clang-error-linker-command-failed-with-exit-code-1-use-v-to-see-invocation[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия