CodeGuru Forums -
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic Newsletters VB Forums Developer.com


Newest CodeGuru.com Articles:

  • Installing SQL Server 2008
  • Writing UDFs for Firebird Embedded SQL Server
  • [Updated] Shutdown Manager
  • Building Windows Azure Cloud Service Applications with Azure Storage and the Azure SDK

  • Search CodeGuru:
     



    Go Back   CodeGuru Forums > Other Programming > Assembly
    FAQ Members List Calendar Search Today's Posts Mark Forums Read

    Assembly Questions and Answers for Assembly here!

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1    
    Old March 14th, 2005, 09:57 AM
    ionutdinulescu ionutdinulescu is offline
    Junior Member
     
    Join Date: Mar 2005
    Posts: 4
    ionutdinulescu is an unknown quantity at this point (<10)
    Exclamation TASM and BCC

    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
    Reply With Quote
      #2    
    Old March 14th, 2005, 11:21 AM
    NoHero's Avatar
    NoHero NoHero is offline
    Moderator
     
    Join Date: Mar 2004
    Location: (Upper-) Austria
    Posts: 2,899
    NoHero has much to be proud of (1500+)NoHero has much to be proud of (1500+)NoHero has much to be proud of (1500+)NoHero has much to be proud of (1500+)NoHero has much to be proud of (1500+)NoHero has much to be proud of (1500+)NoHero has much to be proud of (1500+)NoHero has much to be proud of (1500+)NoHero has much to be proud of (1500+)NoHero has much to be proud of (1500+)NoHero has much to be proud of (1500+)
    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!
    Reply With Quote
    Reply

    Bookmarks
    Go Back   CodeGuru Forums > Other Programming > Assembly


    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 02:22 PM.



    Acceptable Use Policy

    internet.comMediabistrojusttechjobs.comGraphics.com

    WebMediaBrands Corporate Info


    Advertise | Newsletters | Feedback | Submit News

    Legal Notices | Licensing | Permissions | Privacy Policy


    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
    Copyright WebMediaBrands Inc. 2002-2009