convert C++ for Linux to Windows

Can anyone who is expert with C++ in Linux help me to convert a C++ code written for Linux to work in windows

I can pay for him/her .
Not saying that I will personally help, but I feel the need to point out how general your request is.

What does the code do? How much code is there? If your code is some kind of audio app, but no one knows this, you may get people who have lots of experience with GTK or QT or something, but none with audio. Giving more information may help you get interest.

I also believe there is a board specifically for job listings...
The code is not one file . you can download it form here

http://www.wikisend.com/download/582314/moealib.tar.gz

Some files depend on other files like headers to work fine .

it complied by g++
for Uasge see Make files inclcuding into the forder

If you need to contact in private email me mem82m@yahoo.com

I forget to say that code for solving Knapstack optimstion problem using evolutionary algorithms . no need for GTK or QT
I skimmed through the source files and couldn't find any Linux-specific code.
Have you tried compiling this as it is on Windows...?
yes I have tried to compile it using Gold:: bolck ( C++ open source) and my errors have been shown .

And the author of these codes said the cordes bulid to run in Linux only !!

My PhD project depend on this codes. really need to convert it to run in windows
Gold::block? Hee hee...

Why are all the files suffixed with .c when they contain C++ code?

Seriously, I hope your PhD thesis contains fewer spelling and grammar errors than your posts. You need to take some time to spell better here for fear that you might not be respected as much as you should be.

I saw no system-dependant includes in the header files. I trust that the author (who I understand isn't you) never used system(), and I trust that you tried to use Code::Blocks' own multi-file compilation system.

What compiler are you using with Code::Blocks?

-Albatross
Last edited on
You might want to try compiling this in the Cygwin environment.

http://www.cygwin.com/

At first glance, looks completely doable. You only need to work around with the project settings of your IDE... I am sure you can diy. Read up on some make utility and the key likes in the make files for this project.


Cheers!
@Albatross: firstly, I am so sorry for my poor language , I was just rushing.
Secondly : I posted my request here to get help nothing else. So if anyone can help me , he/she will be very welcomed
About the file extension, me neither I do not know ,ask the author, his email

xchen@nankai.edu.cn


The complier is GUN GCC . And I am sure the code written to run on Linux only read the included Read me file .

@Galik: Thank for the reply , I will try it out and get back to you

@Korg: Thanks for your advice , but I do not work on Linux . All the commands in Makes file are related to compile the codes on Linux.

Again , I am still need someone who expert in C++ for both Linux and Windows to help me to do this .
It can be considered as a part time job




meme1982 wrote:
Again , I am still need someone who expert in C++ for both Linux and Windows to help me to do this .
It can be considered as a part time job


I don't have access to a windows machine but maybe you should post this on the jobs forum?

http://www.cplusplus.com/forum/jobs/

Or you could try a commercial freelance agency like rentacoder?

http://www.rentacoder.com/RentACoder/SmallBiz.asp?txtFromURL=AId_2140205

knapsack.h:
1
2
3
4
5
6
7
8
9
#include <time.h>
#include <strstream.h>
#include <fstream.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <iomanip.h>

#include <moea/MOEA.h> 
It's pre-ISO C++, this code is obsolete. It shouldn't compile on Linux neither using a modern compiler
@Bazzy
Thank you for the reply

So what you recommend me to do? . Do you think I have to rewrite it on my own way ??

All you need to do with those is replace them with (in order)
#include <sstream>
Might require a lot of rewriting if you do this, even though it's recommended.

#include <fstream>

#include <iomanip>

-Albatross
Last edited on
Notice that <strstream> is not the same as <sstream>. It's a deprecated library. strstream works with char arrays, stringstream with std::strings
And you'll have to add using namespace std; to get everything from the modern headers into the global namespace


@Albatross, Bazzy :

Thank you SO MUCH for your help , I am very appreciate that

I think I will rewrite the code taking into account your suggestions .
I wouldn't mind doing it... but I just get some kind of python file from the download... somethings wrong with it. You can email me if you want to.
Topic archived. No new replies allowed.