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 7656693
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:49:59+00:00 2026-05-31T12:49:59+00:00

I would like to know how to embed CINT into a C++ code on

  • 0

I would like to know how to embed CINT into a C++ code on Windows 7 or NT.

On windows7, I need to write a C++ program that reads a C++ program from an input file, runs it and counts how many lines of code were executed during the run. I found the best way to do this would be by (1) updating the read program code so that once a command in it is executed a counter value is increased (for commands like return or break the counter value will be increased before execution), and (2) executing the updated program with a C++ interpreter, reading the counter value once it returns.
I would appreciate other approaches to solve this issues.

I searched the web and found CINT would be the correct interpreter to use (although old). I downloaded it from the ROOT home page, installed it and went throw the TestApp demo, but building it I got a linkage error I didn’t find how to solve. Hence I need your help.

The best would be if someone can provide me a project embedding CINT in C++ code on windows, so I can test on my machine, and find my mistake.

I will appreciate any other valueable input as well.

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-31T12:50:01+00:00Added an answer on May 31, 2026 at 12:50 pm

    A more reasonable alternative would be to modify the source file as you read it. For instance, when this is your input:

    void foo() {
      std::cout << "Hello";
      std::cout << " World" << std::endl;
    }
    

    you transform it to this:

    static int LineCounter = 0;
    extern "C" int getLineCounter() { return LineCounter; }
    
    extern "C" void foo() {
      ++LineCounter;
      std::cout << "Hello";
      ++LineCounter;
      std::cout << " World" << std::endl;
    }
    

    and pass that to a compiler. Compile it into a DLL, call LoadLibrary, GetProcAddress("foo"), and GetProcAddress("getLineCounter").

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

Sidebar

Related Questions

Would like to know the c# code to actually retrieve the IP type: Static
I would like to know how to embed my div tag, which I want
I would like to know if there is a way to embed a cranvas
I would like to implement/embed a notes area where people can write some notes
We have a site that we would like our customers to embed in their
I have an application that I would like to embed inside our companies CMS.
I would like to know if embed js is a problem for site security,
i would like to know what is the more practical way to embed many
I have a lot of videos I would like to embed into an app,
i would like know some reference. I know i can googling it. but prefer

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.