此声明没有存储类或类型说明符 我在执行C++ DLL时,这个声明没有存储类或类型说明符问题。这是密码
拼车.h代码:此声明没有存储类或类型说明符 我在执行C++ DLL时,这个声明没有存储类或类型说明符问题。这是密码,c++,dll,export,C++,Dll,Export,拼车.h代码: #pragma once #define DllExport _extern "C" long __declspec(dllexport) DllExport CartToPol(char* fileName, long imgWidth, long imgHeight, long bytePerPixel); DllExport PolToCart(char* fileName, long imgWidth, long imgHeight, long bytePerPixel
#pragma once
#define DllExport _extern "C" long __declspec(dllexport)
DllExport CartToPol(char* fileName, long imgWidth, long imgHeight, long bytePerPixel);
DllExport PolToCart(char* fileName, long imgWidth, long imgHeight, long bytePerPixel);
CarPool.cpp代码
// CarPool.cpp : Defines the exported functions for the DLL application.
//
#include "stdafx.h"
#include "CarPool.h"
DllExport CartToPol(char* fileName, long imgWidth, long imgHeight, long bytePerPixel)
{
return TRUE;
}
DllExport PolToCart(char* fileName, long imgWidth, long imgHeight, long bytePerPixel)
{
return TRUE;
}
有人知道为什么吗?谢谢。我找到了,是外部的下划线 应该是
#define DllExport extern "C" long __declspec(dllexport)
而不是
#define DllExport _extern "C" long __declspec(dllexport)
谢谢