Title
build backend error: fatal error: common/config.hpp: No such file or directory
Environment
- OS: Ununtu(latest)
- python 3.12
- cmake: 3.28
to Reproduce
cd backend ; mkdir build ; cd build
cmake ..
make -j4
All error messages
(1) root@iZrj99fdfx8aaj9yk0hos0Z:~/QuantMuse/backend/build# mkae -j4
Command 'mkae' not found, did you mean:
command 'make' from deb make (4.3-4.1build1)
command 'make' from deb make-guile (4.3-4.1build1)
Try: apt install <deb name>
(1) root@iZrj99fdfx8aaj9yk0hos0Z:~/QuantMuse/backend/build# make -j4
[ 8%] Building CXX object Logger/CMakeFiles/UtilsLogger.dir/src/FileLogPolicy.cpp.o
[ 25%] Building CXX object Logger/CMakeFiles/UtilsLogger.dir/src/ConsoleLogPolicy.cpp.o
[ 25%] Building CXX object Logger/CMakeFiles/UtilsLogger.dir/src/Logger.cpp.o
[ 33%] Linking CXX static library ../bin/libUtilsLogger.a
[ 33%] Built target UtilsLogger
[ 50%] Building CXX object CMakeFiles/trading_engine.dir/src/data_loader.cpp.o
[ 50%] Building CXX object CMakeFiles/trading_engine.dir/src/main.cpp.o
[ 58%] Building CXX object CMakeFiles/trading_engine.dir/src/order_executor.cpp.o
[ 66%] Building CXX object Logger/CMakeFiles/Log_Test_Output.dir/test/Test_Output.cpp.o
/root/QuantMuse/backend/src/main.cpp:6:10: fatal error: common/config.hpp: No such file or directory
6 | #include "common/config.hpp"
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/trading_engine.dir/build.make:90: CMakeFiles/trading_engine.dir/src/main.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 75%] Linking CXX executable ../bin/Log_Test_Output
[ 75%] Built target Log_Test_Output
In file included from /root/QuantMuse/backend/src/data_loader.cpp:1:
/root/QuantMuse/backend/include/data_loader.hpp:9:17: error: ‘Utils’ has not been declared
9 | using namespace Utils::Logger;
| ^~~~~
/root/QuantMuse/backend/include/data_loader.hpp:9:24: error: ‘Logger’ is not a namespace-name
9 | using namespace Utils::Logger;
| ^~~~~~
/root/QuantMuse/backend/include/data_loader.hpp:34:5: error: ‘py’ does not name a type
34 | py::module data_service_; // Python模块
| ^~
/root/QuantMuse/backend/include/data_loader.hpp:35:5: error: ‘py’ does not name a type
35 | py::object fetcher_; // Python数据获取器实例
| ^~
/root/QuantMuse/backend/src/data_loader.cpp:12:24: error: qualified name does not name a class before ‘{’ token
12 | class DataLoader::Impl {
| ^
/root/QuantMuse/backend/src/data_loader.cpp: In constructor ‘trading::DataLoader::DataLoader()’:
/root/QuantMuse/backend/src/data_loader.cpp:108:28: error: class ‘trading::DataLoader’ does not have any field named ‘pimpl_’
108 | DataLoader::DataLoader() : pimpl_(std::make_unique<Impl>()) {}
| ^~~~~~
/root/QuantMuse/backend/src/data_loader.cpp:108:52: error: ‘Impl’ was not declared in this scope
108 | DataLoader::DataLoader() : pimpl_(std::make_unique<Impl>()) {}
| ^~~~
/root/QuantMuse/backend/src/data_loader.cpp:108:57: error: no matching function for call to ‘make_unique<<expression error> >()’
108 | DataLoader::DataLoader() : pimpl_(std::make_unique<Impl>()) {}
| ~~~~~~~~~~~~~~~~~~~~~~^~
In file included from /usr/include/c++/13/memory:78,
from /root/QuantMuse/backend/include/data_loader.hpp:3:
/usr/include/c++/13/bits/unique_ptr.h:1069:5: note: candidate: ‘template<class _Tp, class ... _Args> std::__detail::__unique_ptr_t<_Tp> std::make_unique(_Args&& ...)’
1069 | make_unique(_Args&&... __args)
| ^~~~~~~~~~~
/usr/include/c++/13/bits/unique_ptr.h:1069:5: note: template argument deduction/substitution failed:
/root/QuantMuse/backend/src/data_loader.cpp:108:57: error: template argument 1 is invalid
108 | DataLoader::DataLoader() : pimpl_(std::make_unique<Impl>()) {}
| ~~~~~~~~~~~~~~~~~~~~~~^~
/usr/include/c++/13/bits/unique_ptr.h:1084:5: note: candidate: ‘template<class _Tp> std::__detail::__unique_ptr_array_t<_Tp> std::make_unique(size_t)’
1084 | make_unique(size_t __num)
| ^~~~~~~~~~~
/usr/include/c++/13/bits/unique_ptr.h:1084:5: note: candidate expects 1 argument, 0 provided
/usr/include/c++/13/bits/unique_ptr.h:1094:5: note: candidate: ‘template<class _Tp, class ... _Args> std::__detail::__invalid_make_unique_t<_Tp> std::make_unique(_Args&& ...)’ (deleted)
1094 | make_unique(_Args&&...) = delete;
| ^~~~~~~~~~~
/usr/include/c++/13/bits/unique_ptr.h:1094:5: note: template argument deduction/substitution failed:
/root/QuantMuse/backend/src/data_loader.cpp:108:57: error: template argument 1 is invalid
108 | DataLoader::DataLoader() : pimpl_(std::make_unique<Impl>()) {}
| ~~~~~~~~~~~~~~~~~~~~~~^~
/root/QuantMuse/backend/src/data_loader.cpp: In member function ‘trading::MarketData trading::DataLoader::loadMarketData(const std::string&)’:
/root/QuantMuse/backend/src/data_loader.cpp:112:12: error: ‘pimpl_’ was not declared in this scope
112 | return pimpl_->loadMarketData(symbol);
| ^~~~~~
/root/QuantMuse/backend/src/data_loader.cpp: In member function ‘std::vector<trading::MarketData> trading::DataLoader::loadHistoricalData(const std::string&, const trading::Timestamp&, const trading::Timestamp&)’:
/root/QuantMuse/backend/src/data_loader.cpp:120:12: error: ‘pimpl_’ was not declared in this scope
120 | return pimpl_->loadHistoricalData(symbol, start, end);
| ^~~~~~
/root/QuantMuse/backend/src/data_loader.cpp: In member function ‘void trading::DataLoader::subscribeToRealTimeData(const std::string&, std::function<void(const trading::MarketData&)>)’:
/root/QuantMuse/backend/src/data_loader.cpp:127:5: error: ‘pimpl_’ was not declared in this scope
127 | pimpl_->subscribeToRealTimeData(symbol, callback);
| ^~~~~~
make[2]: *** [CMakeFiles/trading_engine.dir/build.make:76: CMakeFiles/trading_engine.dir/src/data_loader.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:102: CMakeFiles/trading_engine.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
(1) root@iZrj99fdfx8aaj9yk0hos0Z:~/QuantMuse/backend/build# cmake -version
cmake version 3.28.3
CMake suite maintained and supported by Kitware (kitware.com/cmake).
Additional Notes
There are still many missing files in the backend folder. I couldn't find them in the source code. I added some myself. I don't know if there are still some codes that haven't been uploaded. Besides, I feel that the code is very poor. It seems that too much ai is involved in the collaboration
Title
build backend error: fatal error: common/config.hpp: No such file or directory
Environment
to Reproduce
All error messages
Additional Notes
There are still many missing files in the backend folder. I couldn't find them in the source code. I added some myself. I don't know if there are still some codes that haven't been uploaded. Besides, I feel that the code is very poor. It seems that too much ai is involved in the collaboration