Skip to content

Conversation

@GeLee-Q
Copy link

@GeLee-Q GeLee-Q commented Apr 29, 2022

  • 为什么不指定 cmake_minimum_required 会导致下面在 project 处出错?

​ 因为CMakeList.txt至少需要3.10版本才可以运行.

  • 这样设置 C++14 的方式对吗?请改正

    ​ 1.这是针对gcc的用法,对MSVC用户不方便。
    ​ 2.再次添加会导致冲突。

  • 使用 SHARED 在 Windows 上会遇到什么困难?请尝试修复!
    1.当dll和exe不在同一目录时,只会查找exe所在目录和PATH。

    2.除了手动链接,可以使用CMake把dll文件生成到与exe相同的目录去。

  • 自动批量的添加源文件
    1.使用GLOB 自动添加当前目录下指定扩展名的文件。
    2.GLOB_RECURSE 自动包含所有子文件夹的文件(需要将源码放到src目录下)。

1
1
Copy link
Contributor

@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.

all correct, good job gelee~

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