This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Mixing C and C++


Mixing C and C++

Postby Phantom » Sep 11, 2001 @ 6:03am

I have a problem: Descent is now calling some functions from EasyCE.cpp, but Descent itself is pure C. This causes unresolved externals while linking. Can someone explain to me how I can fix this? I tried renaming easyce.cpp to easyce.c, but that causes major problems with the other libraries that I link to easyce. I'm also not familiar with the 'extern "C"' thing, should I use that?<br><br>Like I said, I suck at C++. :)
Give me some good data and
I will give you the world
User avatar
Phantom
pm Insider
 
Posts: 913
Joined: Feb 21, 2001 @ 8:14am
Location: Houten, Netherlands


Re: Mixing C and C++

Postby Phantom » Sep 11, 2001 @ 6:06am

Never mind, it's solved. :) I needed to add 'extern "C"' to both the definition and implementation.
Give me some good data and
I will give you the world
User avatar
Phantom
pm Insider
 
Posts: 913
Joined: Feb 21, 2001 @ 8:14am
Location: Houten, Netherlands


Re: Mixing C and C++

Postby CARPEDIEM » Sep 11, 2001 @ 7:51pm

yeah, C sucks big time man. Good thing C++ is around.<br>
CARPEDIEM
pm Insider
 
Posts: 514
Joined: Feb 24, 2001 @ 3:58pm


Return to Phantom's Forum


Sort


Forum Description

Discuss any of Phantom's projects here (Operation Nutcracker, etc.)

Moderators:

sponge, RICoder, Phantom

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum