試圖瞭解如何鏈接在結構中定義的函數,該函數在彙編代碼中,並試圖從c調用它。我覺得我缺少一個步驟,因爲當我調用該函數,我得到一個未解決的外部符號...鏈接彙編和c問題
;Assembly.asm
.686p
.mmx
.xmm
.model flat
include Definitions.inc
.code
[email protected]@@[email protected]@@Z proc
jmp $
[email protected]@@[email protected]@@Z endp
end
//CFile.c
struct Fee
{
signed long id;
}
struct Foo
{
static void Initialize(Fee *);
}
int startup(Fee * init)
{
Foo::Initialize(init); //<-- This is unresolved
return 0;
}
你想向C++公開一個asm函數嗎? – 2009-12-13 16:02:46