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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:20:15+00:00 2026-05-14T03:20:15+00:00

I want to compile a batch file into an EXE file using C++. I

  • 0

I want to compile a batch file into an EXE file using C++. I can get through parsing the batch file and writing a new .cpp file. But I don’t know how to compile the new .cpp file into an EXE file for the end user.

OK, here’s the thing, I am creating an application in DevC++ that will read in a batch file. Then, one by one parsing it using:

system(getline(myfile,line));

After setting everything up, I save the newly created file as “main.cpp”.

The problem is, I want to compile it into an EXE file, from my program, for the end user.

So basically, can I compile a C++ file from a C++ EXE?

  • 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-14T03:20:15+00:00Added an answer on May 14, 2026 at 3:20 am

    Yes, you can provided that the end user has a C++ compiler installed and you’re emitting valid C++.

    Depending on the compiler you’re using, your C++ executable would have to spawn a process that runs

    cl main.cpp
    

    or a similar invocation of the compiler after finishing the translation.

    If your user doesn’t have a compiler installed, then you’re pretty much out of luck – trying to build a C++ compiler yourself is a rather non-trivial exercise.

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

Sidebar

Related Questions

My project using libxml2 and i want to compile my application with iOS 4.0
If I want to compile the source (cs) file of the web page, i
I want to compile my only changed changed java source files. I know that
I want to compile and use Visual studio for checking an unmanaged C++ on
I want to install File::Fetch, which is a core module in Perl 5.12, in
The situation is as follows: I want to release the full source to a
I want to include a C library in my Java project via JNI. I
I have the following VBScript: Dim strFile, strXPath, strNewText, xmlDoc, xmlNodes, xmlNode strFile =
Our Software project contains Perl, C & VC++ code. I am trying to set
Let's say that I have an adt representing some kind of tree structure: data

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.