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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T03:20:43+00:00 2026-06-02T03:20:43+00:00

I am creating a program in which i need to compile and run a

  • 0

I am creating a program in which i need to compile and run a newly generated .cpp file, and in order to do that i have to create a batch file, which compiles and runs the .cpp file, and can easily be accessed trough system("run_cpp.cpp").
I can easily run the .cpp file trough the command line, but that’s only when I’m using the MS visual studio command line OR setting up the environment using “VCVARS32.bat”.
BUT the goal is to make a program that works on any computer, and ANY computer doesn’t have MS Visual Studio 2010.

So my question is :

How can i compile a .cpp file on any computer using command line (batch file). Are there maby some freeware compilators, that are easy addable to the project? Please help me out here!

Thanks in advance!

EDIT : I ment run_cpp.BAT not run_cpp.cpp sorry !

  • 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-06-02T03:20:44+00:00Added an answer on June 2, 2026 at 3:20 am

    You could use gcc / gpp to compile your program. But then you will have to bundle the gnu toolchain with your program as well. or have it installed.

    In short this is not very feasible and running at run time generated code open a whole lot of security risks. Its never a good idea to do this. there are always other ways of solving you problem.
    You will also have no end of problems with enviroment settings

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

Sidebar

Related Questions

I am creating a program using wxpython which entails the need to create many
I am creating a client program that talks to a server (which I programmed).
I'm creating a program using C# (in ASP.NET environment) that makes an XML file.
I am creating a file reading program. I need to filter out any char
I am using gcc to compile a program which I need to link to
I'm creating a program in which I have a publicly defined boolean value Public
I have a program that is responsible for reading data, formatting it and creating
I'm creating an virtual stamp card program for the iphone and have run into
I creating a program which send newsletter with a background image. It works fine
I am creating a program which has an installer-like interface. Is it better 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.