2

I've been fighting a whole day with UNIX utilities - so sorry if I appear confused! I'm describing my painful and (so far) fruitless process a little because maybe someone may correct me, or maybe describing the process might be helpful to someone later on. If you want to skip this, the question is bolded below.

So I'm trying to convert a Linux program developed using kdevelop. I'm trying to make it run on Windows 7. (This is the SHoUT Speech Took mentioned here, developed by Marijn Huijbregts).

I've wasted half a day trying to install kdevelop on Windows, only to understand that kdevelop can't run on Windows and that I've been installing KDE all that time :( (If kdevelop CAN run on Windows, information would be highly appreciated).

OK, so following the advice in SO's Best environment to port C/C++ code from Linux to Windows, I installed MinGW32 only to find out that SHoUT's makefile contains targets such as aclocal, autoheader etc. - I've come face to face with the hitherto unknown GNU Build System.

I'm now in the middle of installing GnuWin32 using GetGnuWin32. This is taking hours. And I suspect that once it finishes, I'll stumble on something else.

A day of pain - and still not one code line compiled :((.

So, I'm thinking about an alternative approach: Install Linux and run kdevelop as a cross-compiler to compile to Windows. As this is a console application, MAYBE it'll be easier.

So, finally, my question:

If I want to install Linux guest in VMWare Workstation (8, running on Windows 7 host), I understand I need a "distribution". I understand there's a ton of distributions, some free, some paid.

Which distribution should I choose which would run kdevelop and be as simple as possible? I just want to #@$$ing compile, and I can't stand one more day like this...

Avi

Edit:

I've tried compiling the code using VS - very tedious. Many differences between Linuix/GCC and windows/MSVC. Moreover, this is code deveoped by someone else, and I'm not even sure that the program sovles the business needs. So I've decided on the following process:

  1. Configure Linux and run the software on Linux.
  2. Validate that program solves business rule. If not - Abort.
  3. Try cross oompiling on Linux. If running on Windows, verify by comparing outputs to those obtained on Linux. If good - Done.
  4. Try compiling on Windows using ported Windows versions of the GNU Build tools. Use understanding and values obtained from building on the Linux target. If good - Done. Else
  5. Abend and try another solution to the business problem, or try the MS tools (again using understanding and values obtained from building on the Linux target).
Community
  • 1
  • 1
Avi
  • 15,696
  • 9
  • 39
  • 54

5 Answers5

2

Many distributions are possible. Mandriva is KDE based.

But you can also install a Debian distribution, and install KDE in it.

I suggest to contact the ShOUT project community.

Basile Starynkevitch
  • 223,805
  • 18
  • 296
  • 547
2

You should not cross-compile. MinGW can come handy but it is not required. What you need is to port the code and its dependencies to Windows, and there is nothing wrong if you use Visual Studio, for example.

  • This seems logical and is, indeed, what I first tried. I've created a consol application in VS2010, added all the files and tried to compile. The compilation, however, failed. And unless I understand the build process, I think it's quite destined to fail. – Avi Nov 29 '11 at 15:59
  • 1
    @Avi: Having Linux just to see how the build process works and what dependencies are there is a good idea. But keep in mind that you cannot just cross-compile some Linux code and run it in Windows. If library, for example, is using `/proc` filesystem or epoll or anything else, you can compile it for any architecture, but it will never run on Windows. You should determine what parts are not platform agnostic and come up with Windows alternative. –  Nov 29 '11 at 17:52
  • Sorry, no space for my reply here - I've added it as an Edit to my question. Thanks! – Avi Dec 04 '11 at 17:53
1

I am using Ubuntu on VirtualBox OSE and through it use kdevelop and it runs seamlessly. Alternatively you can try kubuntu.

Why VirtualBox OSE - Free, Mature

Abhijit
  • 62,056
  • 18
  • 131
  • 204
1

Please DON'T install Linux! It will take you another half a day and another questions asked here if you're doing it for the first time.

Just install VirtualBox and grab some VirtualBox image from some site. Kubuntu should be working fine with your KDE stuff: http://virtualboxes.org/images/kubuntu/

It will get you a running KDE Linux in just 5 minutes.

Oleg Mikheev
  • 17,186
  • 14
  • 73
  • 95
  • Are there similar VMWare images that can be downloaded? – Avi Nov 29 '11 at 16:00
  • 1
    You can convert a VDI to a VMWare image. But why would you use VMWare anyway? VirtualBox is open sourced and it can be compiled to match exactly your CPU/platform, also it's much more user friendly imo – Oleg Mikheev Nov 29 '11 at 18:28
  • I already have VMWare Workstation installed on my computer, all of my workflow is done using virtual machines, and I hesitate to install a second virtualization solution (i.e. VirtualBox) on the host. – Avi Nov 30 '11 at 06:34
  • VMware Converter will help you convert a VirtualBox VDI image to VMWare VMDK format. But frankly, lack of VMWare images freely available online would be enough for me to switch to VirtualBox – Oleg Mikheev Nov 30 '11 at 09:09
  • 1
    • Downloaded KUbuntu 11.10 from DeveloperVMs. User name “user”, password: “user1234”. • Maybe not necessary: Updated installed items on KUbuntu using Muon. • Maybe not necessary: Upgraded the VM to 8, and reinstalled VMware tools. • Use Muon to install Kdevelop, git, make and automake (for aclocal). – Avi Dec 04 '11 at 16:59
1

It is easier to compile with MinGW on Windows than cross compile on Linux.

Build system... It could be quite easy to write Your own. Much easier than actual porting of C++ code. Could be even easier than using GNU Build System.

Michas
  • 8,534
  • 6
  • 38
  • 62