Skip to content

Conversation

pengguanjun
Copy link

我得到了stbiw.lib库,可是main.exe编译不出来。

cd C:\Users\pgjgg\Desktop\C++_learn\course-master\hw01
git clone https://github.com/pengguanjun/hw01.git
cd hw01
C:/zeno/vcpkg/downloads/cmake-3.21.1-windows-i386/bin/cmake.exe -B build

hellocmake.sln编译出现了3个错误:

1    Severity	Code	Description	Project	File	Line	Suppression State
Error	LNK2019	unresolved external symbol stbi_write_png referenced in function "void __cdecl test_rainbow(void)" (?test_rainbow@@YAXXZ)	main	C:\Users\pgjgg\Desktop\C++_learn\course-master\hw01\hw01\build\rainbow.obj	1	


2    Severity	Code	Description	Project	File	Line	Suppression State
Error	LNK2001	unresolved external symbol stbi_write_png	main	C:\Users\pgjgg\Desktop\C++_learn\course-master\hw01\hw01\build\mandel.obj	1	

3    Severity	Code	Description	Project	File	Line	Suppression State
Error	LNK1120	1 unresolved externals	main	C:\Users\pgjgg\Desktop\C++_learn\course-master\hw01\hw01\build\Release\main.exe	1	

image

@pengguanjun
Copy link
Author

自己尝试的方法,求助:https://blog.csdn.net/yantuguiguziPGJ/article/details/122018912

@pengguanjun
Copy link
Author

重启所有的VS项目就好了。
image

@pengguanjun pengguanjun changed the title VS2019 | cmake good,run bad. VS2019 | cmake good,run good. Dec 18, 2021
Copy link
Collaborator

@archibate archibate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

做的好!最后自己解决了问题!88分!

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

Successfully merging this pull request may close these issues.

2 participants