This is the mail archive of the
mailing list for the GCC project.
c anc c++ compiling
- From: "ratnadeep joshi" <ratngccc at rediffmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: 27 Jan 2002 09:13:15 -0000
- Subject: c anc c++ compiling
- Reply-to: "ratnadeep joshi" <ratngccc at rediffmail dot com>
1. I compiled and linked two source files one
of which is c and other is c++ . I called
a function which was in c++ file from c file .
gcc flagged an error..
I gave :
$>gcc a.c a.cpp
Error was : undefined reference to that
When i ran the same with g++ , it worked
$>g++ a.c a.cpp
What happens exactly ?
2. Now i want to add c++ code to objc compiler
cc1obj . i.e i will link one more file which
is .cpp with other objc source files which are
.c . Here the same problem arises .
The thing that we can't make here compiler
g++ as it happens through stages..and it
What can be done for this ?
Thanking you in anticipation ...
- Ratnadeep Joshi