chronoxor / CppServer

Ultra fast and low latency asynchronous socket server & client C++ library with support TCP, SSL, UDP, HTTP, HTTPS, WebSocket protocols and 10K connections problem solution
MIT License
1.43k stars 284 forks source link

Getting Cmake Error while Building #69

Open Saurabh2109 opened 2 years ago

Saurabh2109 commented 2 years ago

CMake Error at C:/Users/dataman/AppData/Local/Programs/Python/Python310/Lib/site-packages/cmake/data/share/cmake-3.22/Modules/SystemInformation.cmake:35 (file): file failed to open for writing (No such file or directory):

D:/Andre/CppTrader/modules/CppCommon/

Call Stack (most recent call first): modules/CppCommon/CMakeLists.txt:27 (include)

CMake Error at C:/Users/dataman/AppData/Local/Programs/Python/Python310/Lib/site-packages/cmake/data/share/cmake-3.22/Modules/SystemInformation.cmake:35 (file): file failed to open for writing (No such file or directory):

D:/Andre/CppTrader/modules/CppCommon/

Call Stack (most recent call first): modules/CppCommon/CMakeLists.txt:27 (include)

CMake Error at C:/Users/dataman/AppData/Local/Programs/Python/Python310/Lib/site-packages/cmake/data/share/cmake-3.22/Modules/SystemInformation.cmake:35 (file): file failed to open for writing (No such file or directory):

D:/Andre/CppTrader/modules/CppCommon/

Call Stack (most recent call first): modules/CppCommon/CMakeLists.txt:27 (include)

chronoxor commented 2 years ago

Did you do the following step? image

Saurabh2109 commented 2 years ago

yes i followed all the steps.this error was coming from running vs.bat.Is there any path related issue.

Saurabh2109 commented 2 years ago

Now i am getting this error.

"D:\Andre\CppTrader\temp\ALL_BUILD.vcxproj" (default target) (1) -> "D:\Andre\CppTrader\temp\cpptrader-tests.vcxproj" (default target) (17) -> (Link target) -> cppcommon.lib(path.obj) : error LNK2019: unresolved external symbol imp_GetUserProfileDirectoryW referenced in function "public: static class CppCommon::Path cdecl CppCommon::Path::home(void)" (?home@Path@CppCommon@@SA ?AV12@XZ) [D:\Andre\CppTrader\temp\cpptrader-tests.vcxproj] cppcommon.lib(uuid.obj) : error LNK2019: unresolved external symbol imp_UuidCreate referenced in function "p ublic: static class CppCommon::UUID cdecl CppCommon::UUID::Random(void)" (?Random@UUID@CppCommon@@SA?AV12@XZ) [D:\Andre\CppTrader\temp\cpptrader-tests.vcxproj] cppcommon.lib(uuid.obj) : error LNK2019: unresolved external symbol __imp_UuidCreateSequential referenced in f unction "public: static class CppCommon::UUID __cdecl CppCommon::UUID::Sequential(void)" (?Sequential@UUID@CppCo mmon@@SA?AV12@XZ) [D:\Andre\CppTrader\temp\cpptrader-tests.vcxproj] D:\Andre\CppTrader\temp\RelWithDebInfo\cpptrader-tests.exe : fatal error LNK1120: 3 unresolved externals [D:\A ndre\CppTrader\temp\cpptrader-tests.vcxproj]

uniflare commented 11 months ago

UuidCreate and UuidCreateSequential come from MS, you need to link Rpcrt4.lib. GetUserProfileDirectoryW is also a MS function and comes from userenv.lib.

Arguably these should be public dependencies of cppcommon module, or at least interface dependencies if you want to rely on the user to link these