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

推理测试 报错error: variable ‘std::ifstream pcm_file’ ‘std::ofstream file’ #12

Closed
dxLu opened this issue Mar 14, 2025 · 1 comment

Comments

@dxLu
Copy link

dxLu commented Mar 14, 2025

/home/dlu/keyword-spot/onnxruntime/kws/utils.cpp:72:32: error: variable ‘std::ifstream pcm_file’ has initializer but incomplete type
72 | std::ifstream pcm_file(file_path, std::ios::binary | std::ios::ate);
| ^~~~~~~~~
/home/dlu/keyword-spot/onnxruntime/kws/utils.cpp: In function ‘void wekws::writeVectorToFile(const std::vector<std::__cxx11::basic_string >&, const std::string&)’:
/home/dlu/keyword-spot/onnxruntime/kws/utils.cpp:113:36: error: variable ‘std::ofstream file’ has initializer but incomplete type
113 | std::ofstream file(filename);
| ^
gmake[3]: *** [kws/CMakeFiles/kws.dir/build.make:93: kws/CMakeFiles/kws.dir/utils.cpp.o] Error 1
gmake[3]: Leaving directory '/home/dlu/keyword-spot/onnxruntime/build'
gmake[2]: *** [CMakeFiles/Makefile2:268: kws/CMakeFiles/kws.dir/all] Error 2
gmake[2]: Leaving directory '/home/dlu/keyword-spot/onnxruntime/build'
gmake[1]: *** [CMakeFiles/Makefile2:302: bin/CMakeFiles/kws_main.dir/rule] Error 2
gmake[1]: Leaving directory '/home/dlu/keyword-spot/onnxruntime/build'
gmake: *** [Makefile:237: kws_main] Error 2

@dxLu
Copy link
Author

dxLu commented Mar 14, 2025

在/onnxruntime/kws/utils.cpp 加上引用就可以编译通过
#include

@dxLu dxLu closed this as completed Mar 14, 2025
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

1 participant