Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

calling c runtime library inside assembler32

EuclidesEuclides Member Posts: 1
I should like using microsoft c (and c++) visual c runtime libraries.
I've got problems while linking.
It's about c startup code.
Suggestions and/or solutions would really be welcome.


Comments

  • DariusDarius Member Posts: 1,666
    : I should like using microsoft c (and c++) visual c runtime libraries.
    : I've got problems while linking.
    : It's about c startup code.
    : Suggestions and/or solutions would really be welcome.

    Declare the functions you want to use as external (in TASM and probably MASM, for example, it's EXTRN variable). When you assemble you get an .obj file. That file is just like any .obj file you get from C/C++ so you can link it like that. Chances are whenever you make a C/C++ program some code is included that handles all the details at the beginning, that's probably what it's complaining about. Ideally, you want to not have to have that code if you don't need it, you haven't given enough information for me to tell you how you'd go about that. However, likely if you use the C/C++ compiler to link your code (instead of linking directly) it will automatically add in the necessary .obj file. Other than that you simply need to do whatever you'd do for a C/C++ .obj file for you assembly .obj file.

    "We can't do nothing and think someone else will make it right."
    -Kyoto Now, Bad Religion

  • Chris BrownChris Brown USAMember Posts: 4,624 ✭✭

    __ // http://forcoder.org // free video tutorials and ebooks about \ PHP C++ Assembly JavaScript PL/SQL Visual Basic Visual Basic .NET Delphi Perl Ruby Swift Python Scratch Objective-C Go C# MATLAB R Java C Hack ABAP FoxPro Ada Fortran F# VBScript ML Kotlin COBOL LabVIEW SAS Apex Lisp Logo Dart Scheme Alice Clojure Lua Julia D Bash Erlang Prolog Awk Crystal Rust Scala Transact-SQL \ ________

Sign In or Register to comment.