How to link programs in C and C++?

Status
Not open for further replies.

shedeed

Member level 4
Joined
Sep 26, 2004
Messages
70
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,288
Location
Egypt
Activity points
631
C programs Linking

i want to link a program written in C language and another one written in C++ language.
How could i do so using Borland Compilers
 

Re: C programs Linking

As per my understanding C++ is the superset of c so directly you can compile c files also in cpp compiler by changeing just the name of file from .c to .cpp. this way u can link it.If any issue let me know.
 

Re: C programs Linking

The superset issue is right!. Actually you do NOT even have to rename the file!..

I have compiled lots of c files with brland compilers.

It can be done.

Just be sure to select a console application while you make a new project.
 

C programs Linking

you can add the statement "#inlude the C filename" in the beginning of the C++ program
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…