qt中调用以下Interface_CppDllMingW.h定义的C++动态dll库,在qi中直接引入以下代码的Interface_CppDllMingW.h提示语法错误,给出在qt中引入的Interface_C'p'p'DllMingW.h的代码;#pragma once #ifdef INTERFACE_CPPDLLMINGW_EXPORTS #define INTERFACE_CPPDLLMINGW_API extern "C" __declspec(dllexport) #else #define INTERFACE_CPPDLLMINGW_API extern "C" __declspec(dllimport) #endif public ref class Interface_CppDllMingW { public: // Interface_CppDllMingW() = default; // ~Interface_CppDllMingW() = default; virtual int mingw_add(int a, int b) = 0; virtual void mingw_substract(int a, int b, int* c) = 0; virtual void mingw_showBox(const char* str) = 0; virtual short win32_Sync_isUSBExist() =0; virtual short win32_Sync_READ_status(const char* MainProg, const char* CurProg, int* CurSeq, const char* Mode, const char* Status, const char* Alarm, const char* EMG) = 0; }; INTERFACE_CPPDLLMINGW_API Interface_CppDllMingW^ CALL_API();
时间: 2023-06-02 15:08:11 浏览: 253
由于中文输入法出现了误差,Interface_CppDllMingW.h 库的名称中出现了额外的字母 ‘p’。在qt中,正确引入该库的方式如下:
#include "Interface_CppDllMinGW.h"
阅读全文