我有一个此声明没有存储类或类型说明符执行C++ dll时的问题。下面是代码此声明没有存储类或类型说明符
CarPool.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);
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;
}
任何人有任何想法,为什么?谢谢。
本文探讨了在C++中定义DLL导出函数时遇到的一个具体问题:缺少存储类或类型说明符导致的编译错误。通过给出具体的代码示例,分析了问题的原因并讨论了解决方案。
1万+

被折叠的 条评论
为什么被折叠?



