PDA

View Full Version : C++ in Linux -- Complete noob here....



AmEv
03-08-2011, 12:50 AM
To the point:
I am trying to figure out how to compile a program into Linux.
I have the source code; I'm just not exactly sure how to compile it into a Linux executable.
I tried to Google to figure it out, but the searches assume I have had years of practice (haha), and they all point at various packages and programs, no consistencies.
Kubuntu 10.10.

The program, specifically, is MadTracker from SourceForge, if anyone needs to know.

x88x
03-08-2011, 05:06 AM
Unless I'm missing something, that's a Windows project. Just because they released the source code doesn't mean you can just build it in Linux and it will magically work. ...that'd be nice, but no.. :( Apparently it works quite nicely in Wine though. So, to kinda-sorta-not-really answer your question..

sudo apt-get install wine ;)

AmEv
03-08-2011, 12:49 PM
I got Wine; I'm just not sure how to compile.


And this will be a fun project to tinker around with, I suppose....
I hope........

x88x
03-08-2011, 01:30 PM
Sorry, let me rephrase. Since it's a Windows project, and there is talk in their forums of running it in Wine, I assume that it will not compile under Linux. This is fairly common, especially with GUI's. Any program that uses any Windows native or dependent libraries will not compile (or at the very least will not function properly if it does somehow compile) under Linux.

What I would recommend doing is downloading the normal executable and running it in Wine.

AmEv
03-08-2011, 01:54 PM
k.


Got the MT2 EXE.

Runs relatively well.


The source I got is MT3.
So, to compile into EXE...?

x88x
03-08-2011, 05:06 PM
Well, according to their website, MT3 isn't released yet...and actually, looking at the forums, it's been "in development"..without developers..for a while. Last update to the codebase was 2009-10-17. Unless you're looking to actively develop it (I'm assuming not, given the context), I can't say I would recommend trying to use it. Hell, it might not even be in a functioning state even if you did get it compiled, idk.

If you still want to push ahead and try compiling their source, you're going to have to compile it in Wine..which may prove strange.. You'd have to find a Windows C++ compiler that works in Wine, at the very least. Either that or you'll have to figure out how to cross-compile for Windows using GCC, but then you'll probably run into a lot of missing libraries that you'll have to find, possibly just linking them from the Wine directory, possibly not.

..Like I said, unless you're looking to develop it, I would recommend sticking with MT2.

AmEv
03-08-2011, 06:01 PM
k.

Thanks for the info.