View Single Post
Old Aug 17th, 2006, 12:03 PM   #10
Klarre
Game engine designer
 
Klarre's Avatar
 
Join Date: May 2005
Location: Sweden
Posts: 301
Rep Power: 4 Klarre is on a distinguished road
I finally got it linked correctly.
class Foo
{
public:
	Foo();
	~Foo();

	int bar();
};

int main()
{
	Foo foo = Foo();
	int x = foo.bar();

	return 0;
}

.386P

; ----------------------------------------------------------------------------
; Foo::Foo()
; ----------------------------------------------------------------------------
_TEXT SEGMENT
??0Foo@@QAE@XZ PROC NEAR
	mov eax, ecx
	ret 0

??0Foo@@QAE@XZ ENDP
_TEXT ENDS

; ----------------------------------------------------------------------------
; Foo::~Foo()
; ----------------------------------------------------------------------------
_TEXT SEGMENT
??1Foo@@QAE@XZ PROC NEAR
	ret 0

??1Foo@@QAE@XZ ENDP
_TEXT ENDS

; ----------------------------------------------------------------------------
; int Foo::bar()
; ----------------------------------------------------------------------------
_TEXT SEGMENT
?bar@Foo@@QAEHXZ PROC NEAR
	mov eax, 4
	ret 0

?bar@Foo@@QAEHXZ ENDP
_TEXT ENDS

END
So now is the next step to play around with variables and other complex stuff.

Thanks alot for your help! See you soon again!

/Klarre
__________________
http://www.klarre.se
Klarre is online now   Reply With Quote