23 Matching Annotations
  1. May 2024
  2. Feb 2024
  3. Jan 2024
  4. Aug 2023
    1. But it is designed to compile applications that use Windows APIs, not POSIX APIs

      mingw直接使用的windows api,不是posix apis,如何判断程序是否使用了posix apis,从而决定是否用cygwin或mingw

    1. 教程假设您使用的是 Linux 操作系统,我们要使用 POSIX 编写多线程 C++ 程序。POSIX Threads 或 Pthreads 提供的 API 可在多种类 Unix POSIX 系统上可用

      对于c++ 11标准,提供std::thread类,是跨平台的多线程处理类

    1. 如果在头文件中定义了变量(该做法是错误的!),在多个cpp文件中包含,编译时会有多个.o文件中有这个变量,所以在链接环节会出错

      头文件中只能出现声明,不能出现变量或函数的定义

  5. Jul 2023
    1. When the - option is used, -p is ignored.

      sudo su切换到root时,并没有保留环境变量,su username 保留了原先的环境变量, su - username不保留原先shell的环境变量

  6. Jun 2023
  7. May 2023
    1. If the CONFIGURE_DEPENDS flag is specified, CMake will add logic to the main build system check target to rerun the flagged GLOB commands at build time. If any of the outputs change, CMake will regenerate the build system.

      啥意思?是不是cmake 2.x版本,如果文件有增删,file(GLOB ...)是检测不到变化的,如果加了CONFIGURE_DEPENDS flag就能检测的到?