I want to create a program that modifies another c++ source,compiles it and runs the exe. I mean with something like gcc may be I can but on a windows os gcc may not be present. Is it possible?
+1
A:
I think your options are fairly limited for windows:
- Check for an install of a compiler (possibly limit this to a short list) and use that compiler
- Bring along a compiler in your application's install package
Robb
2010-09-02 15:18:04
hmm it can be slow...and it depends on internet connection.But it's interesting idea ;)
Alexander Ivanov
2010-09-02 15:35:04
+1 for audacity.
Steve Jessop
2010-09-02 15:43:06
Thanks... anyway I was thinking on it and realized about managing zip and http in C... and it was not that nice... :S
helios
2010-09-02 15:56:12
You can (should) grab a library for that sort of thing. Even so it's going to be more work than some languages. As it happens I have implemented both HTTP client and zip file writer libraries in the past: not in C but in a language at about the same level, so I was sitting on top of zlib and a Berkely-style sockets interface. I don't really recommend it, for a very simple http client it's not all that difficult, just very tedious. Use libcurl and libtar instead (tar since compression isn't actually essential here anyway, so keep it simple)...
Steve Jessop
2010-09-02 16:52:46