Compiling linux based static library in Windows

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Sep 2009
Posts: 15
Reputation: abhipro is an unknown quantity at this point 
Solved Threads: 0
abhipro abhipro is offline Offline
Newbie Poster

Compiling linux based static library in Windows

 
0
  #1
Oct 20th, 2009
Hi all,

I have a library built in C++ targeted for linux platform. The authors suggested that with some minor changes, it can be compiled in windows as well.. This library in turn uses the mathematical library called miracl, which does support VC++ and I was also able to build it there.

My problem is how to port this linux based library to windows?

I found a open source software known as cmake for building the source files. Is it the correct tool for my problem?

Regards,

Abhi
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,358
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1463
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning
 
-7
  #2
Oct 20th, 2009
If you used g++ on linux then you should probably use Code::Blocks with MinGW compiler on Windows.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 15
Reputation: abhipro is an unknown quantity at this point 
Solved Threads: 0
abhipro abhipro is offline Offline
Newbie Poster
 
0
  #3
Oct 20th, 2009
Hey,
Thanks. I will now try code::blocks with minGW.

Previously, I tried to port the linux based C++ code to VS 2005 using cmake utility but it didn't work.


Regards,

Abhijit
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 15
Reputation: abhipro is an unknown quantity at this point 
Solved Threads: 0
abhipro abhipro is offline Offline
Newbie Poster
 
0
  #4
Oct 20th, 2009
Hi,

I tried code::blocks with minGW compiler.

As soon as I compiled a program, it gave multiple syntax errors, as if it's not recognizing the syntax at all.
What am i doing wrong?

also, this program called headers from other library which I have already build in VS 2005 and have the library file for it. Should I be including it here in Code::Blocks?

Regards,

Abhijit
Reply With Quote Quick reply to this message  
Join Date: Sep 2009
Posts: 15
Reputation: abhipro is an unknown quantity at this point 
Solved Threads: 0
abhipro abhipro is offline Offline
Newbie Poster
 
0
  #5
Oct 21st, 2009
Hi,

I have tried many methods, like cmake and minGW, but each time I try compiling the code in Windows, errors like in braces and basic syntax are thrown.

I never worked much with unix based C++.
Is there a compiler which I can use to compile linux based C++ code successfully in Windows environment?
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 440
Reputation: Agni is a jewel in the rough Agni is a jewel in the rough Agni is a jewel in the rough 
Solved Threads: 68
Sponsor
Agni's Avatar
Agni Agni is offline Offline
Posting Pro in Training
 
0
  #6
Oct 21st, 2009
Its surprising that you are not able to compile it in windows. If you take a library compiled in *NIX, it would not run on windows but usually the code compiles fine both on windows n *nix, apart from specific system calls if you have them. braces like error are not an issue of unix or windows. Its a code issue.

edit: sorry, didnt read the whole thing, you have a library i guess. plz ignore my post in that case.
Last edited by Agni; Oct 21st, 2009 at 7:48 pm.
thanks
-chandra
Reply With Quote Quick reply to this message  
Reply

Message:



Similar Threads
Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC