On 8/19/2010 12:37 AM, Gerald Dunn wrote:
>> ...it would be nice to root cause the problem and solution.
>
> I don't think I expressed my confusion correctly. I agree that name mangling 
> is the problem. I just don't understand why it's only a problem for the 
> exports in one file and not the others. I was able to link with all other 
> exported functions not declared in the problematic header. The other .h files 
> don't ecapsulate the definitions with 'extern "C"'. That's all I meant.

Because you are mixing C and C++.  The C++ compiler goes through, sees 
those items in the header file, and adds the name-mangled versions to 
the object file.  Then the linker looks for the name-mangled versions, 
can't find them, and bails.  All C exports have to have the extern "C" 
declaration for the C++ compiler to know not to name-mangle the name.

-- 
Thomas Hruska
CubicleSoft President

Barebones CMS is a high-performance, open source content management 
system for web developers operating in a team environment.

An open source CubicleSoft initiative.
Your choice of a MIT or LGPL license.

http://barebonescms.com/

Reply via email to