-
Notifications
You must be signed in to change notification settings - Fork 107
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
Fali To Install By Vcpkg . it complain 5 LINK ERROR #140
Comments
Please provide more details and format appearance of your question. Did vcpkg install work, what commands did you run, etc |
My IDE is the latest version of Visual Studio. After executing the command And I was able to use the ImGui and successfully run the code in #include "hello_imgui/hello_imgui.h"
int main(int, char* []) {
HelloImGui::Run(
[] { ImGui::Text("Hello, world!"); }, // Gui code
"Hello!", true); // Window title + Window size auto
} The following errors occurred: I installed both the command of "vcpkg list" show:
|
I just tried this: Save main.cpp
Save CMakeLists.txt
Install vcpkg
Run build
And it worked. I'm afraid there is not much more I can do to help. However, I would advise you to try and solve the issue with CMake instead of inside visual studio project options.
Other than that ChatGPT might perhaps have some good advices: |
INSTRUCTIONS
生成开始于 13:46...
1>------ 已启动生成: 项目: hello_imgui1, 配置: Debug x64 ------
1>hello_imgui.lib(runner_factory.cpp.obj) : error LNK2019: 无法解析的外部符号 _Thrd_sleep_for,函数 "void __cdecl std::this_thread::sleep_until<struct std::chrono::steady_clock,class std::chrono::duration<__int64,struct std::ratio<1,1000000000> > >(class std::chrono::time_point<struct std::chrono::steady_clock,class std::chrono::duration<__int64,struct std::ratio<1,1000000000> > > const &)" (??$sleep_until@Usteady_clock@chrono@std@@v?$duration@_JU?$ratio@$00$0DLJKMKAA@@std@@@23@@this_thread@std@@YAXAEBV?$time_point@Usteady_clock@chrono@std@@v?$duration@_JU?$ratio@$00$0DLJKMKAA@@std@@@23@@chrono@1@@z) 中引用了该符号
1>hello_imgui.lib(hello_imgui_font.cpp.obj) : error LNK2019: 无法解析的外部符号 __std_find_last_trivial_1,函数 "char const * __cdecl std::_Find_last_vectorized<char const ,char>(char const * const,char const * const,char)" (??$_Find_last_vectorized@$$CBDD@std@@YAPEBDQEBD0D@Z) 中引用了该符号
1>hello_imgui.lib(hello_imgui_font.cpp.obj) : error LNK2019: 无法解析的外部符号 __std_find_last_of_trivial_pos_1,函数 "unsigned __int64 __cdecl std::_Find_last_of_pos_vectorized<char,char>(char const * const,unsigned __int64,char const * const,unsigned __int64)" (??$_Find_last_of_pos_vectorized@DD@std@@YA_KQEBD_K01@Z) 中引用了该符号
1>hello_imgui.lib(whereami_cpp.cpp.obj) : error LNK2001: 无法解析的外部符号 __std_find_last_of_trivial_pos_1
1>hello_imgui.lib(hello_imgui_ini_settings.cpp.obj) : error LNK2019: 无法解析的外部符号 __std_search_1,函数 "char const * __cdecl std::_Search_vectorized<char const ,char const >(char const * const,char const * const,char const * const,unsigned __int64)" (??$_Search_vectorized@$$CBD$$CBD@std@@YAPEBDQEBD00_K@Z) 中引用了该符号
1>hello_imgui.lib(hello_imgui_ini_any_parent_folder.cpp.obj) : error LNK2001: 无法解析的外部符号 __std_search_1
1>hello_imgui.lib(functional_utils.cpp.obj) : error LNK2001: 无法解析的外部符号 __std_search_1
1>hello_imgui.lib(hello_imgui_ini_settings.cpp.obj) : error LNK2019: 无法解析的外部符号 __std_find_end_1,函数 "char const * __cdecl std::_Find_end_vectorized<char const ,char const >(char const * const,char const * const,char const * const,unsigned __int64)" (??$_Find_end_vectorized@$$CBD$$CBD@std@@YAPEBDQEBD00_K@Z) 中引用了该符号
1>F:\Project\WorkSpace\C++\VS\hello_imgui1\x64\Debug\hello_imgui1.exe : fatal error LNK1120: 5 个无法解析的外部命令
1>已完成生成项目“hello_imgui1.vcxproj”的操作 - 失败。
========== 生成: 0 成功,1 失败,0 最新,0 已跳过 ==========
========== 生成 于 13:46 完成,耗时 02.334 秒 ==========
Describe the issue
MSBUILD complain 5 LINK ERROR:
_Thrd_sleep_for
__std_find_last_trivial_1
__std_find_last_of_trivial_pos_1
__std_search_1
__std_find_end_1
Version & Platform
My CPU is AMD 7900X,GPU 4060TI with latest driver
using VS with latest version
VS 2022 143v ,c++17
vcpkg install command is vcpkg install "hello-imgui[opengl3-binding,glfw-binding]",
windows sdk 10(latest)
fail to build sln with #include "hello_imgui/hello_imgui.h"
int main() { HelloImGui::Run( { ImGui::Text("Hello, world!"); ImGui::ShowDemoWindow(); }); }
The text was updated successfully, but these errors were encountered: