| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | Newsletters | VB Forums | Developer.com |
|
|||||||
| Assembly Questions and Answers for Assembly here! |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I have the following cpp and asm sources :
//--testc.cpp #include <stdio.h> extern int rez(int,int); void main(){ int x,y; int v=rez(3,5); printf("%d", v); } //--testa.asm .model small .stack 100 .code public _rez _rez proc near push bp mov bp,sp mov ax,[bp+4] add ax,[bp+6] pop bp ret _rez endp end I use the following commands to compile&link : d:\borlandc\bin\bcc -ms -c -Id:\borlandc\include testc.cpp d:\borlandc\bin\tasm /ml testa.asm d:\borlandc\bin\tlink d:\borlandc\lib\c0s testc testa, testc,,d:\borlandc\lib\cs The linker tells me : Undefined symbol rez(int,int) in module TEST.CPP I use bcc ver3.1, asm ver3.1, tlink ver 5.1 Does anyone know what is happening ??? What tlinker/tasm/bcc version should I use to get this working ? Thank you |
|
#2
|
||||
|
||||
|
Re: TASM and BCC
Try...
Code:
extern "C" int rez( int, int );
__________________
I am not offering technical guidiance via email or IM Come on share your photo with us! CG members photo album! Use the Code Tags! |
![]() |
| Bookmarks |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|