From Mac to Unix


Hi everone,

I am using Mac for writing my codes and I use the following to compile my code in terminal:

clang++ -std=c++11 -stdlib=libc++ myFile.cpp

However, my instructor using Unix to test my program! Last assignment I submitted won't perfectly compile on unix and gives SEGMENTATION FAULT (CORE DUMPED) error. I think the problem in this statment

-stdlib=libc++

because it's not included when compile in unix! Anyone knows how to solve this problem?!

Thanks!
Last edited on
It is far more likely that the problem is in your program logic.
I see! So you think it's not a good idea to work and Mac and compile on unix?
I think it's a good idea to make sure your program is correct.
Topic archived. No new replies allowed.