Command for compiling C++ on a Linux server

Hi, I'm working on a project dealing with Binary-Decision-Diagram(BDD) using CUDD, which is a package for BDD manipulation.
And there's a simple question, which is what is the command to compile the .cpp file in the linux server. The one for .c file is as below:
gcc -I $CUDD/cudd/ -I $CUDD/util/ -I $CUDD <file>.c $CUDD/cudd/.libs/libcudd.a -lm -O3 –o Lab3

Which,
$CUDD = /…/cudd-3.0.0 (address)


But Idk the one for .cpp file. Is it just modifying the beginning gcc to g++ that simple?
It's a bit hurry. Thx in advance!
Last edited on
Yes, just replace gcc with g++.
@salem c
Hi, I've tried that already but getting some errors though.
g++: error: -lm: No such file or directory
g++: error: -o: No such file or directory
g++: error: Lab3: No such file or directory
Last edited on
Well the –o in your first post looks like some HTML munged look-alike to a real minus sign.
As in -o

Oh, right! That's the problem!
Thx a lot!
Topic archived. No new replies allowed.