DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 8 of 8

Thread: Using code written for linux on Windows

  1. #1
    Join Date
    Nov 2006
    Posts
    5

    Using code written for linux on Windows

    Hi!

    I'm new to the forums and also to the the programming world so let's see if you can help me. I'm searching some open source software so that I can add a new module to already existing software. It's written in C++ and the GUI is developed for Qt. The thing is that I found something that fits what I'm looking for but it's written for Linux. Is there any possibility that I can use the code for my software, which is written for Windows?

    Thanks

  2. #2
    Join Date
    Dec 2003
    Posts
    3,366
    If the code written for linux is standard C++ (unlikely) then you can easily put it into any windows compiler and use it. If its full of nonsense like #include <unix.h> or the like, then you often cannot easily fix it. In between, a few minor things might exist that are easily fixable by hand - the compiler will fuss and you fix, a few times and it suddenly works. This goes both ways.. windows code that is full of MFC is often not easily moved to linux.

    There is hope: there exists a package called cygwin which can often compile unix code on windows when the code has too much "unix" in it to be easily ported by hand.

  3. #3
    Join Date
    Jan 2005
    Posts
    49
    Yeah you can use that software for sure...Its simply a question of porting it...
    Now cygwin will allow you to build it on the windows platform with very few changes...check out http://www.cygwin.com/
    However, you might want to specify more about the open source module, as the portability issues vary depending on the type of the application...The more system dependent the module is, the harder will be your task...and typicaly graphics applications, tend to depend quite a bit on the system....
    NN

  4. #4
    Join Date
    Nov 2006
    Posts
    5
    The project is ANCA:

    http://anca.sourceforge.net/

  5. #5
    Join Date
    Nov 2006
    Posts
    3

    Same functionality maybe already ported to Windows

    OpenH323 is an open-source project that already has a number of Windows incarnations and may also meet your needs. http://www.openh323.org/

  6. #6
    Join Date
    Nov 2006
    Posts
    5
    Thanks for the link. The thing is that I need something written for the Qt environment, and for the moment the anca project is the only one that suits my needs.

    THANKS!

  7. #7
    Join Date
    Nov 2006
    Posts
    5
    I've looking through the project, and I think the only thing that belongs to unix is a include config.h. What does it provide and how could I find a substitute for Windows?

  8. #8
    Join Date
    Dec 2003
    Posts
    3,366
    first thing to do is just remove the header and see what fails -- you can probably find versions of the include file and its contents online but likely there are differences across compilers and distributions. Just google "config.h" if you prefer that approach. Once you know what it was doing, let us know or search your online help to find an alternative.

Similar Threads

  1. Shut down windows code
    By Flambo in forum VB Classic
    Replies: 0
    Last Post: 01-20-2006, 01:22 AM
  2. Speaking of strings...
    By Harlow in forum .NET
    Replies: 246
    Last Post: 10-26-2002, 12:30 AM
  3. wot is CLR
    By lostguy in forum .NET
    Replies: 8
    Last Post: 04-03-2002, 07:41 PM
  4. Replies: 0
    Last Post: 12-15-2001, 11:37 AM
  5. Another Language
    By Steven Bell in forum .NET
    Replies: 260
    Last Post: 06-01-2001, 04:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center