Archived

This topic is now archived and is closed to further replies.

thekid

Starting my compiler from an IDE app

Recommended Posts

thekid    122
Hi, I am in the process of creating a java like language for a school research project. I am going to be creating an IDE to code in but i need to know how to initiate my compiler .exe from the IDE in both windows, and linux if possible. I also need to be able to pass comandline arguments like filename, dependancies, outputfile, ect. Any information would be helpful Kid

Share this post


Link to post
Share on other sites
thekid    122
Im making my own IDE. I just need to know how to run my compiler application which is a comandline app, from the IDE program. I know VS does this, and all the GNC IDEs do it as well

Share this post


Link to post
Share on other sites
Sneftel    1788
Under Windows, you''ll be calling ShellExecute. Er, assuming you''re writing it in C/C++.


How appropriate. You fight like a cow.

Share this post


Link to post
Share on other sites
prh99    520
quote:
Original post by thekid
Hi,

I am in the process of creating a java like language for a school research project. I am going to be creating an IDE to code in but i need to know how to initiate my compiler .exe from the IDE in both windows, and linux if possible. I also need to be able to pass comandline arguments like filename, dependancies, outputfile, ect.

Any information would be helpful

Kid


I found this site:
http://graphics.lcs.mit.edu/~decoret/ARGSTREAM/
about parsing the command line. It should enable you recieve command line parameters for you compiler.

hope this helps

Share this post


Link to post
Share on other sites
George2    187
I don''t know about windows but under linux there is popen and pclose :


  

#include <stdio.h>

// use this to open a pipe to the compiler

// read_or_write is either "r" or "w"

// you get back a FILE* which you can use to read the compiler output, or

// write to the compilers input

FILE* popen(const char* commandline,const char* read_or_write);

// close the pipe

int pclose(FILE* pipe);



For more info you can allways look at the man page.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
I am in the process of solving the meaning of life, can someone please tell me how to add two numbers?

Share this post


Link to post
Share on other sites
krez    443
you could also have the IDE create a makefile (or some version of a makefile specifically geared to your compiler), and have the compiler app read it when it is started.

Share this post


Link to post
Share on other sites