Archived

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

emileej

Looking for a free command-line compiler

Recommended Posts

emileej    130
Hey! I am looking for a compiler which I can include in a project I am working on. My program is generating some C/C++ code which it then should pass on to a compiler - turning it into a windows dll file. My initial thought was to use the GCC compiler (ofcourse remembering to credit it), but I cant find a contained stand alone version of it. Anyone got some advice here?

Share this post


Link to post
Share on other sites
mattnewport    1038
quote:
Original post by SiCrane
Microsoft recently released a stand-alone version of it''s MSVC 7.1 compiler as a free download.


Doesn''t necessarily mean it''s freely redistributable though - you''d have to check the license for that.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Applications created from the standalone Microsoft compiler are redistributable. There''s nothing to worry about there.

Share this post


Link to post
Share on other sites
Melraidin    128
AP: He''s looking for a compiler that he can distribute with his application, which would quite possibly be against the MS licensing agreement.

emileej: Not sure if it would do what you want, but I''ve had some success having C# code create dlls on the fly. May want to look into it.

Share this post


Link to post
Share on other sites
NickB    146
I believe that the MS compiler itself is not redistributable - IIRC the licence agreement is for the use of a single copy.

If you''re just looking for a plain C compiler lcc-win32 might be a good choice; it is free, but I think I''ve seen copies of it in the MatLab installation for example.

Share this post


Link to post
Share on other sites
emileej    130
Dammit! I have just finished implementing the MS compiler
Thygrr << I have already had a look at mingw and to be hornest it frightened the hell out of me. I wasnt able to isolate the compiler from the interface but if you have experience with it then perhaps you could help me on that?

Share this post


Link to post
Share on other sites
Fidelio66    164
quote:
Original post by emileej
Hey! I am looking for a compiler which I can include in a project I am working on. My program is generating some C/C++ code which it then should pass on to a compiler - turning it into a windows dll file. My initial thought was to use the GCC compiler (ofcourse remembering to credit it), but I cant find a contained stand alone version of it.
Anyone got some advice here?


If you write it in C#, you''d need the .NET framework to run it, and the runtime includes the (command line) compilers. So anyone who can run it can also compile the C# files it generates. So no need to include the compiler itself, you can just distribute the .exe and data files.

Share this post


Link to post
Share on other sites
emileej    130
Nono - I dont want anything like that. My file goes in one end and a dll goes out the other - thats the ida of this app. And C/C++ is the language(s) being used.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Pretty much the only viable C and C++ compiler suite you are able to redistribute yourself if the GCC/MingW. If you want to redistribute one, you should be trying to get over that feeling of scariness and just figure it out. It''s your only option as far as I can see.

Share this post


Link to post
Share on other sites
emileej    130
AP << Yea thats what I thought, but I also thought that mayhaps someone in here had messed around with the mingw distribution already.

Also I had a thought: If my program uses a licenced compiler like the MS compiler - would it then be legal to work around my problem by providing instalation instructions for that compiler and then use it that way?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
quote:
Original post by emileej
AP << Yea thats what I thought, but I also thought that mayhaps someone in here had messed around with the mingw distribution already.



I might be able to help if you clarify what this actually means: "I wasnt able to isolate the compiler from the interface"

Share this post


Link to post
Share on other sites
Arild Fines    968
quote:
Original post by emileej
Also I had a thought: If my program uses a licenced compiler like the MS compiler - would it then be legal to work around my problem by providing instalation instructions for that compiler and then use it that way?

As long as you don''t physically ship the compiler yourself, sure.

Although, IANAL.

Share this post


Link to post
Share on other sites
emileej    130
Well obviously you dont approve of that solution, but how about some constructive criticism in stead? What would you do?

Share this post


Link to post
Share on other sites
Arild Fines    968
quote:
Original post by emileej
Well obviously you dont approve of that solution, but how about some constructive criticism in stead? What would you do?

Huh? IANAL = I Am Not A Lawyer.

What I said was basically, "As far as I know, that''s legal, but I''m not a lawyer, so don''t blame me if you get in legal problems."

Share this post


Link to post
Share on other sites
Matei    190
I'm not sure you can redistribute GCC as part of your application either, unless you make your app open-source, due to the GNU General Public License. However, IAANAL.

If compiling C++ files won't be a major part of your project but rather something for making mods, or if your project is targetted at programmers, you can just point them to the MS compiler and to MinGW in some kind of readme file, perhaps even include scripts that compile their files assuming one of those is installed.

[edited by - Matei on May 27, 2004 6:24:33 PM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
quote:
Original post by Matei
I''m not sure you can redistribute GCC as part of your application either, unless you make your app open-source, due to the GNU General Public License. However, IAANAL.


in this case have your program call the compiler and pass it arguments

Share this post


Link to post
Share on other sites
Etnu    880
Why not just have the user specify which compiler to use?

Anyone capable of programming C++ should know how to obtain a compiler. Just point them in the direction of the VC compiler, or GCC or whatever and then load it via an ini file.

Share this post


Link to post
Share on other sites
davepermen    1047
i''ve done this with D and dmd from digitalmars. but i guess you can''t have dmc for free (it would work the same way, just for c++)..

but it should be doable with gcc (?!).






If that''s not the help you''re after then you''re going to have to explain the problem better than what you have. - joanusdmentia

davepermen.net

Share this post


Link to post
Share on other sites
thedevdan    210
quote:
Original post by Etnu
Why not just have the user specify which compiler to use?

Anyone capable of programming C++ should know how to obtain a compiler. Just point them in the direction of the VC compiler, or GCC or whatever and then load it via an ini file.


If it is an open source project, he may only want to release the source, and no executable. Some people who would be downloading it may not know how to program, and step by step instructions along with a compiler would be very helpful for them.

That might not be how it is in his case, but that is how I am planning on doing it (except to link to a compiler, instead of providing one with the source).

Share this post


Link to post
Share on other sites
emileej    130
It is not an open source project and I would prefere to have a compiler shipped with my program so that the user doesnt need to go thru some annyoingly long installation instruction.
I have looked at cygwin, but have still not been able to isolate the compiler itself. Any help on this?

Share this post


Link to post
Share on other sites