-4

In question: How to compile file .cpp to exe, but with comperssion natively?

barwnikk
  • 950
  • 8
  • 14
  • `g++ -o foo foo.cpp && tar -xzvf foo.tar.gz foo.exe`? –  Oct 27 '13 at 21:14
  • 2
    Compression, not compersion. Also: You don't compile it that way, you compile it normally and use a tool to compress the exe afterwards. Google it yourself as I never needed something like that myself. – Daniel Frey Oct 27 '13 at 21:15
  • 1
    _compersion_ for space/portability ? Why don't you directly write in assembly or brainfck :P Why is this even tag for `C++`. It has nothing to do with any programming language. Just get the executable binary, use tool to compress the executable – P0W Oct 27 '13 at 21:20
  • @P0W (frustrating, isn't it? especially the lack of effort and the tag abuse.) –  Oct 27 '13 at 21:21
  • "You keep using that word. I do not think it means what you think it means." Anyway, [this is what compersion means](http://en.wikipedia.org/wiki/Compersion), and it has nothing to do with compression. – C. K. Young Oct 28 '13 at 05:08

1 Answers1

1

You just compile it using your normal C++ compiler. Then compress the resulting .exe file using UPX.

DarkDust
  • 90,870
  • 19
  • 190
  • 224