[問題] 關於DLL的問題
( *[1m *[m 為色碼,可以按 Ctrl+V 預覽會顯示的顏色 )
( 未必需要依照此格式,文章條理清楚即可 )
遇到的問題: (題意請描述清楚)
使用DLL執行結束會一直出現錯誤(assertion failed dbgheap)
這幾天查了很久 覺得程式碼也沒有問題可是不知道為麼會有這個關於point的問題
希望得到的正確結果:
程式執行都沒有問題 可是回到主程式一定會跳出這個訊息
程式跑出來的錯誤結果:
"Debug assertion failed in dbgheap.c"
dbgheap.c這是內建函式 所以我即使用debug模式也沒辦法回去source哪裡有問題
話說都是組合語言碼 我也看不是很懂@@
開發平台: (例: VC++ or gcc/g++ or Dev-C++, Windows or Linux)
VC6.0 ((公司要求ˊˋ
有問題的code: (請善用置底文標色功能)
這是.h的部分
#ifndef LineInterpreterProxy_H
#define LineInterpreterProxy_H
#include "LineInterpreter.h"
using namespace std;
#define Interpreter_CALL __stdcall
#ifdef Interpreter_EXPORTS
#define Interpreter_API __declspec(dllexport)
#else
#define Interpreter_API __declspec(dllimport)
#endif
class Interpreter_API LineInterpreterProxy{
public:
LineInterpreterProxy(); // constructor
void Interpreter_CALL excute(string input);
private:
LineInterpreter *li;
};
#endif
.cpp的部分
#define Interpreter_EXPORTS
#include "LineInterpreterProxy.h"
#include "iostream"
using namespace std;
LineInterpreterProxy::LineInterpreterProxy()
{
}
void LineInterpreterProxy::excute(string input)
{
cout<<"test";
}
補充說明:
有正確印出test可是一定會出現那個錯誤訊息
小弟研究了好久 實在不曉得哪裡有寫錯@@
請各位大大幫忙阿~~感激!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.126.123.103
推
09/15 23:11, , 1F
09/15 23:11, 1F
→
09/15 23:12, , 2F
09/15 23:12, 2F
→
09/15 23:12, , 3F
09/15 23:12, 3F
→
09/15 23:13, , 4F
09/15 23:13, 4F
→
09/15 23:13, , 5F
09/15 23:13, 5F
→
09/15 23:21, , 6F
09/15 23:21, 6F
→
09/15 23:22, , 7F
09/15 23:22, 7F
→
09/15 23:23, , 8F
09/15 23:23, 8F
→
09/17 09:27, , 9F
09/17 09:27, 9F
→
09/19 23:47, , 10F
09/19 23:47, 10F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章