Skip to content

add MSVC compile in CMakelists #2

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Jun 25, 2024
Merged

add MSVC compile in CMakelists #2

merged 1 commit into from
Jun 25, 2024

Conversation

damengziuu
Copy link
Contributor

  1. add a line to compile in msvc

@Razirp Razirp merged commit 8225efa into Razirp:main Jun 25, 2024
2 checks passed
@Razirp
Copy link
Owner

Razirp commented Jun 25, 2024

生成静态链接库确实是用MSVC进行编译时的一种可行的替代方案🎉
Creating a static link library is indeed a viable alternative when compiling with MSVC. 🎉

@JiahaoCodes
Copy link

CMake-Best-Practices-20221002.pdf
静态库不是一个合适的方案。对于msvc来说,编译动态库需要导出符号生成对应的lib文件。合适的方式是判断编译器,如果是msvc则添加相应的导出配置。具体可以参考CMake-Best-Practices书中3.4.2动态库中的符号可见性章节。

@damengziuu
Copy link
Contributor Author

CMake-Best-Practices-20221002.pdf 静态库不是一个合适的方案。对于msvc来说,编译动态库需要导出符号生成对应的lib文件。合适的方式是判断编译器,如果是msvc则添加相应的导出配置。具体可以参考CMake-Best-Practices书中3.4.2动态库中的符号可见性章节。

还未合并新的代码

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants