Ensure C++ will work on a Unix system


 
Thread Tools Search this Thread
Top Forums Programming Ensure C++ will work on a Unix system
# 1  
Old 09-21-2011
Ensure C++ will work on a Unix system

For my one college course, my professor said that we have to ensure that the C++ code we send him will work on a Unix system. I in turn installed Cygwin on my Windows 7 machine, and have been using that to compile and check my code, but it sounds like Cygwin is still compiling the code for my Windows based system and may have issues if run on Unix. Since I'm so used to Windows, should I install an easy to use Linux version such as Ubuntu and use that to check my code? Would that ensure it will run on my professor's Unix environment? Thank you.
# 2  
Old 09-21-2011
Of course Cygwin compiles for Windows; it could hardly do otherwise. The difference is that Cygwin provides replacements for UNIX system calls, so that code which builds on UNIX can build in Cygwin and hopefully vice-versa, if your code uses 100% UNIX system calls in a UNIX-compliant manner.

So, your code is, at the very least, going to be a heck of a lot closer than the poor souls who're still trying to hack it with Visual Studio.

I'd be loath to suggest reformatting or trying to set up dual-booting on your computer just to get a Linux/UNIX environment. Too many ways for that to go wrong. Does your school provide shell logins? Can you get a scrap/throwaway computer to install Linux on? Nearly anything with >=40GB HDD and >=256MB RAM will do...

It'd help to know what your professor's UNIX environment is...
# 3  
Old 09-21-2011
Quote:
I'd be loath to suggest reformatting or trying to set up dual-booting on your computer just to get a Linux/UNIX environment. Too many ways for that to go wrong. Does your school provide shell logins? Can you get a scrap/throwaway computer to install Linux on? Nearly anything with >=40GB HDD and >=256MB RAM will do...
Alternatively, you could set-up Ubuntu in a virtual machine, or use wubi

Brgs,
/Lew
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Which X Window system is installed on my server that would work with Xming?

I would like to use Xming to connect a server and managed to get it to work. I am now trying to get it to connect to a different server but i am not sure which X Window system is installed. I tried it through putty and i get the following error/warning: /usr/java/jdk1.7.0_67/bin> jvisualvm... (5 Replies)
Discussion started by: ziggy25
5 Replies

2. Shell Programming and Scripting

How to ensure a script can only be invoked from another?

Hi All, I have two scripts - ScriptA and ScriptB ScriptA has logic to invoke ScriptB : - with some parameter - or without any parameter ScriptB can also be invoked by the user from the command line. Is there anyway to ensure that when I execute ScriptB from the command line, it does... (3 Replies)
Discussion started by: chaitanya.gvc
3 Replies

3. Solaris

Mount command doesn't work on Solaris System

Hi All, I am using a solaris Sun-Fire-V440 server. The OS is solaris. My problem is whenever I run the command mount | grep "^/ " | sed -e 's,^.*dsk/\(*\).*$,\1,' it should return a disk value as "d30" as it does on each of my other servers.But on this server I am not getting any o/p from... (3 Replies)
Discussion started by: vivek.goel.piet
3 Replies

4. Shell Programming and Scripting

Reading file from remote system and work on it locally

Hi! I am still fairly new to shell programming, but I have taken an interest to it and want to try some new stuff. I intend to make a shell script (using bash) to read a file on a remote system, then do some work on it on the local system and display it. In the long run I want to have a... (9 Replies)
Discussion started by: aaOzymandias
9 Replies

5. Shell Programming and Scripting

script to ensure lines are in sequence

Hello there, I check files containing more than 2000 lines, I try to make sure that the lines are in sequence...for example the first line begins with Av567, second line contains Av568 and so on up to the last line that may contain Av2500. I need a script to check that all lines are in sequence... (5 Replies)
Discussion started by: docaia
5 Replies

6. Shell Programming and Scripting

System call in CGI not work

I have a cgi script that calls a perl script (A.pl) to do something in backgroup, when run that perl script in command everything works fine, but when it calls by the CGI script, nothing works. I have tried another perl script (B.pl not cgi) calls A.pl, and it works fine. The A.pl is chmod 777, ... (6 Replies)
Discussion started by: tqlam
6 Replies

7. Shell Programming and Scripting

Ensure the file completion ?

Hi, I would like to copy a file from one location to another. But that particular file is not fully loaded. I like to copy a file once it's fully loaded or complete file. How to ensure whether file is fully loaded or complete file?. -Thambi (5 Replies)
Discussion started by: thambi
5 Replies

8. UNIX for Dummies Questions & Answers

Ensure FTP is complete before using file

Hi, I have a program that checks a directory for new files. A file may be placed in the directory only via FTP from another system. The files are long, the FTP can take several minutes to complete. my program sences that a file has arrived but can't tell if the FTP process that sent it is... (10 Replies)
Discussion started by: GMMike
10 Replies
Login or Register to Ask a Question