Running a C++ program in Windows vs Linux -


i've been told teacher homework (a simple program, chose code in c++) must runnable in linux. here's said exactly:

"...you should include readme file contains command lines should run cut-and-paste. if used c, then

 $ gcc –o 2010-11649-hairpin 2010-11649-hairpin.c  $ 2010-11649-hairpin –input filename –l 200 –m 4 –h 20 

"

where -l 200, -m 4 , parameters of program.

i've coded in windows, , have little experience running programs command line, i'm not sure need make sure program can run in linux. can me figure out need do? i've written program, need make sure works when ta tries run in linux.

first of have try executing instructions on linux.

if have written program in standard c/c++ compile , run on linux fine. once less basic parts, have big chances have used os specific headers , might not work easily.

when compiling c++ program under linux, want use g++ c++ compiler in gcc. depending on program, replacing gcc g++ in example might work (although filenames different). might end like:

g++ –o myprogram myprogram.cpp ./myprogram –l 200 –m 4 

the above work basic programs source code in single directory.


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -