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 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

I want to know, can I compile oracle forms without using Oracle Form Builder?
when i want compile my app with the Distribution or Release method i get
I want to compile a simple hello-world-style program using the Windows command line. cl
I want to compile a "Hello World" MS-DOS exe. Not a program that runs
The Idea I've compiled a C++ exe using G++ on Cygwin, and I want
I want to compile intel syntax assembly using gcc. Is it possible? because I
I'm using a pre-build event in Visual Studio to run a batch (.bat) file
I want to know if its possible to get the return value from batch
I want to compile an open source iPhone app( https://github.com/newsyc/newsyc/ ) but since I
I want to compile some .java files into a JAR. I would like to

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.