转到makefile并添加编译源代码的行:-E通过这样做,您将在预处理阶段之后看到源代码.
搜索所有项目PHPAPI:
在php.h中找到它:
#ifdef PHP_WIN32
#include "win95nt.h"
# ifdef PHP_EXPORTS
# define PHPAPI __declspec(dllexport)
# else
# define PHPAPI __declspec(dllimport)
# endif
#define PHP_DIR_SEPARATOR '\\'
#else
#define PHPAPI
#define THREAD_LS
#define PHP_DIR_SEPARATOR '/'
#endif
Run Code Online (Sandbox Code Playgroud)
现在你需要知道的是什么是__declspec(dllexport)什么,什么是什么__declspec(dllimport)
在SO线程中 - 什么是__declspec以及何时需要使用它?
规范示例是
__declspec(dllimport)和__declspec(dllexport),它指示链接器(分别)从DLL导入和导出符号.Run Code Online (Sandbox Code Playgroud)// header __declspec(dllimport) void foo(); // code - this calls foo() somewhere in a DLL foo();(
__declspec(..)只是包装了Microsoft的特定内容 - 为了实现兼容性,人们通常会用宏来包装它)