Mail Archives: djgpp/1998/10/12/13:55:32
Could anyone help me out?
I used NASM and outputed with COFF, which it says you have to do to link
in the .o file with djgpp. Now I can't figure out how to do this.
I have a global function in my file assembled by NASM.
I want to use that in my .cpp file compiled by DJGPP. But, it keeps saying
can't find myGolbalFunc. How exactly do you link in the file? heres my
assembly code and cpp code.
global _myfunc
_myfunc: push ebp
mov ebp,esp
mov eax,[ebp+8]
leave
ret
now in my .cpp file
#include <iostream.h>
extern int _myfunc(int);
void main()
{
int a = myfunc();
cout << a;
}
- Raw text -