转载自不同操作系统的宏定义区分 #ifdef _WIN32//define something for Windows (32-bit and 64-bit, this part is common)#ifdef _WIN64//define something for Windows (64-bit only)#else//define something for Windows (32-bit only)#endif#elif__APPLE__#include"TargetConditionals.h"#ifTARGET_IPHON...
Xcode 利用宏定义区分iphone 模拟器和真机 示例: 如果在模拟器中运行就定义宏不编译rdp功能模块到app中,如果真机运行就编译rdp功能模块到app中。 #ifTARGET_IPHONE_SIMULATOR #defineWITH_FREE_RDP NOT_BUILD_IN // 模拟器不支持RDP #elifTARGET_OS_IPHONE #defineWITH_FREE_RDP BUILD_IN // 支持RDP #endif AI...
unix:LIBS += $$PWD/netsdk/linux64/dhnetsdk.so这里最好写相对路径,编译完成后linux会从这里配置的路径加载so库 写成相对路径 ./dhnetsdk.so 发布到其它机器运行时使用 export LD_LIBRARY_PATH=./ 配置从当前目录加载so库 宏定义 #ifdefined(Q_OS_WIN32) qDebug()<<"Q_OS_WIN32"; #else qDebug()<<...
不同操作系统的宏定义区分 #ifdef_WIN32//define something for Windows (32-bit and 64-bit, this part is common)#ifdef_WIN64//define something for Windows (64-bit only)#else//define something for Windows (32-bit only)#endif#elif__APPLE__#include"TargetConditionals.h"#ifTARGET_IPHONE_SIMULATO...
不同操作系统的宏定义区分 不同操作系统的宏定义区分转载⾃ #ifdef _WIN32 //define something for Windows (32-bit and 64-bit, this part is common)#ifdef _WIN64 //define something for Windows (64-bit only)#else//define something for Windows (32-bit only)#endif #elif __APPLE__#include ...
宏定义 #ifdefined(Q_OS_WIN32) qDebug()<<"Q_OS_WIN32"; #else qDebug()<<"Q_OS_other"; #endif qt定义的各个系统的宏定义 Q_OS_AIX Defined on AIX. Q_OS_ANDROID Defined on Android. Q_OS_BSD4 Defined on Any BSD 4.4 system. ...