Derek Atkins writes:

> Perhaps you need an 'extern "C"' in there so C++ knows how to call the C
> functions?

To cut to the chase, Bruce probably should make sure that all of his C
functions are declared in C-specific header files that have the
following pattern:



#ifndef UTIL_H
#define UTIL_H

#ifdef __cplusplus
extern "C" {
#endif


void some_function_with_c_linkage();

#ifdef __cplusplus
}
#endif

#endif  /* UTIL_H */


Bruce will also want to make sure that his C functions are compiled by
an actual C compiler.

This advice is a little bit of my opinion and a little bit of an
inflexible "you must do this if you want this to work".

Regards,

--kevin

Keywords:  name-mangling


-- 
GnuPG ID: B280F24E                God, I loved that Pontiac.
alumni.unh.edu!kdc                -- Tom Waits
http://kdc-blog.blogspot.com/     
_______________________________________________
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/

Reply via email to