class Class1
{
[DllImport("aa.dll", EntryPoint = "mytest", CallingConvention = CallingConvention.StdCall)]
public static extern int mytest();
}
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show(abc.Class1.mytest().ToString());
}________________________ 以上为c# 代码 ____________________________________
// 这是主 DLL 文件。#include "stdafx.h"#include "aa.h"
int mytest()
{
return 1;
}__________________ 在vs2005中建立的c++类库,以上为cpp代码 __________________________________错误:无法在 DLL“aa.dll”中找到名为“mytest”的入口点()
哪错了??给改下吗?
EXPORTS
mytest
; 此处可以是显式导出
{
return 1;
}
系统找不到mytest
我建立的是类库...按道理应该没有错..因为我也找到生成的dll文件了
to jiezi316
如何显示导出函数
{
return 1;
}
你把这个直接编译
方法不行to ling3wei
是dll有问题..
怎么改
报这错