View Single Post
  #7   Spotlight this post!  
Unread 01-26-2010, 07:46 AM
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,069
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Cannot Mix C Code

Quote:
Originally Posted by slavik262 View Post
But if you compile everything as C++, the symbols should match up and the linker should have no problem. I'd focus on just getting it to compile as C++. I don't know why this should be too much of a problem. If it's some some stupid persistent project setting that you can't change or something, try copying the code into new .cpp files.
It seems that this is the simplest solution to this problem. Usually, the C/C++ mixing nastiness is only an issue if you are using a large C code base and/or pre-compiled C library that you want to link with in a C++ application. Since it seems like there is only a single C-style function, just rename it to .cpp and the compiler will compile it as C++.

As to what the problem may be with your current extern "C" way, what is a "scheme *" type defined as? Is it a C type or a C++ class? Consult this FAQ for more information.
Reply With Quote