Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7007243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:34:55+00:00 2026-05-27T21:34:55+00:00

I would like to implement a number of functions in (32bit) NASM that have

  • 0

I would like to implement a number of functions in (32bit) NASM that have the following signature:

int function1();
int function2();

etc.

Then I want to create an object file and be able to statically link it with a C++ program compiled with gcc. I am looking for an example implementation of a function that returns an int, any additional code needed to export the symbols and the command line for NASM to produce a .a file that I can link to statically. Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T21:34:55+00:00Added an answer on May 27, 2026 at 9:34 pm

    Assembler will output an object file, just use it when linking (I don’t remember NASM options, so don’t try this verbatim — something like nasm foo.asm -o foo.o; g++ -o prog foo.o bar.cpp).

    Static libraries are nothing more than fancy archives (hence the .a extension) of object files. binutils has ar utility if you really want to pack a single object into an archive.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In a number of occasions I have a collection of functions that I'd like
I would like to implement an application for block a mobile number for receiving
I would like to implement a function with R that removes repeated characters in
We would like to implement a web form that automatically saves content at regular
I have a table called with thousands of records and would like to implement
I would like to implement the following feature using jQuery scrollTo function or some
I have a list of integers that I would like to convert to one
I would like to have a class implement operator() several different ways based on
I would like to implement a distinct thread for each route in apache camel.I
I would like to implement a very simple way to store a variable containing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.