Wrox Programmer Forums
|
C++ Programming General discussions for the C++ language. For questions specific to Microsoft's Visual C++ variant, see the Visual C++ forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C++ Programming section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old October 11th, 2003, 06:14 PM
Authorized User
 
Join Date: Aug 2003
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts
Default Linux >> Windows files

Hi:

I understand that C is portable if compiled for the OS.

I'm trying to use code that includes these:
#include <unistd.h>
#include <fcntl.h>
#include <sys/wait.h>
#include <err.h>

These are Linux files that apparantly depend on a Linux OS w/ Linux functionality.

I'm guessing that this code is not executable in Windows?
How can I make it executable in Windows?

__________________
http://www.softlinksys.com
Professional Software Developer since 1994.
Reply With Quote
  #2 (permalink)  
Old October 13th, 2003, 09:29 AM
Registered User
 
Join Date: Oct 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to midfinger Send a message via MSN to midfinger
Default

u want to compile this in windows...



midFinger
Reply With Quote
  #3 (permalink)  
Old October 14th, 2003, 05:37 PM
Authorized User
 
Join Date: Jul 2003
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to merediths
Default

MAtkins,


 C code will only be portable if you use the ANSI/ISO subset of the language, which should be portable given you have an ANSI/ISO compliant compiler. It looks like a number of the header files you are using are system headers that are OS dependant, however a number of third party libraries and utilities are available for porting from window to unix.
 I recommend using Cygwin, which is what I use ( though their are a number of Open Source/ Commercial products on the market). Check out http://www.cygwin.com/ -- that should get you pointed in the right directions.

Regards,
Meredith Shaebanyan


Quote:
quote:Originally posted by MAtkins
 Hi:

I understand that C is portable if compiled for the OS.

I'm trying to use code that includes these:
#include <unistd.h>
#include <fcntl.h>
#include <sys/wait.h>
#include <err.h>

These are Linux files that apparantly depend on a Linux OS w/ Linux functionality.

I'm guessing that this code is not executable in Windows?
How can I make it executable in Windows?

Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chpt 7 >> Pg 245 >>Try It Out #4-5 harrison4411 BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 March 2nd, 2006 06:26 PM
Achitecture ? SQL -> XML -> ASP -> PDF or HTML Frm jstrong Classic ASP XML 0 July 9th, 2005 01:18 PM
Chapter 4> ERROR using "=>>>" guiro BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 5 January 13th, 2005 06:38 PM
VB.Net -> Filename -> DTS Package -> tempdB daniel Pro VB.NET 2002/2003 1 October 7th, 2004 01:46 PM
<<ASP.NET Security>>,download files in chapter 8 alaix All Other Wrox Books 1 July 24th, 2003 10:29 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.