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

  • SEARCH
  • Home
  • 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 545223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:44:19+00:00 2026-05-13T10:44:19+00:00

I have an application which is written in C and logs my function calls

  • 0

I have an application which is written in C and logs my function calls by writing them to a file.
Now I need to re-use these logged function calls in another C-application (which is also the reason for logging).

This application should do – next to other things – exactly the things which were logged.

example:
MYLOGFILE which was written by the first application

printf("Starting main process w/ pid %d\n", (int)getpid());
    Display *dsp = XOpenDisplay( NULL );

Then the second application shall execute the function calls logged and taken from the file.

Any ideas how to realize that?

  • 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-13T10:44:19+00:00Added an answer on May 13, 2026 at 10:44 am

    In essence, you want to generate C code and have that code executed, right? If this is is the case, you can check TCC that is available as a library and provides exactly this functionality.

    Of course assuming your platform is among the supported ones.

    That said I would rather avoid emitting C code and having another application reading it, compiling it and executing it. I would suggest you one of the following:

    1. invent your own language and emit it in your logfile. Then write an interpreter for that language and make the other program read and interpret the log file.

    2. Embed a scripting language (i.e. Lua) in your second program and emit your logfile in that language.

    Which solution would work best depends on the complexity of the tasks you have to describe in your logfile.

    As very last solution, assuming you want to emit C you can consider using system() to invoke your compiler and than the compiled program. But I would really really discourage you to do so!

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

Sidebar

Related Questions

I have written a small java application for which I need to obtain performance
I have a c++ application which logs to some file using log4cxx (RollingFile appender).
I have written a Ruby application which parses lots of data from sources in
I have an application written in Delphi 7 which does not require an admin
Background: I have an application written in native C++ which uses the wxWidgets toolkit's
I have a web application written using CherryPy, which is run locally on 127.0.0.1:4321
Let's say I have an existing application written in Java which I wish to
I have a web application, written in ColdFusion, which periodically starts using 100% of
I have an application which extracts data from an XML file using XPath. If
We have an application which needs to use Direct3D. Specifically, it needs at least

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.