some problems with c and c++ header file -


i have confusing problem in using c functions in c++ class functions.

i have class named a defined in a.h , implemented in a.cpp. , have b.h , b.c has declared , implemented functions.

inside a functions have called functions defined in b.h , b.c (there no class b), think usual stuff compiler error says unresolved reference or else pointing functions of b.

i have #include "b.h" @ start of a.cpp and, compiler gcc under linux (opensuse 12.3), , sorry can not show codes because of copyright.

this confusing me, not c++ pro know way c++ header , source files working together, asking if have similar experience this.

thanks

you want:

extern "c" {     #include "b.h"; } 

Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -