Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > C++ Programming
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 11th, 2003, 06:14 PM
Authorized User
Points: 325, Level: 6
Points: 325, Level: 6 Points: 325, Level: 6 Points: 325, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Altamonte Springs, FL
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
Location: , , .
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
Location: , , .
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
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 08:23 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.