C++ "undefined reference" [not-in-charge] [in-charge]

Hugo hv at uninova.pt
Mon Oct 6 14:15:40 UTC 2003


Hi!


I am trying to compile a C++ program for the 1st time but I am having
some problems.

I can compile a typical "Hello World" example and I have changed the
Makefile to use the 'make-cxx-exe', but unfortunately I still have some
errors.


The code:

#include <pcibios.h>
                                                                                                                                                                            
int main() {
                                                                                                                                                                            
  pcib_init();
                                                                                                                                                                            
  return 0;
}

The compilation error:

Undefined reference to 'pcib_init()'


If I try to compile this code as C instead of C++ it compiles with no
error.


What am I forgetting?

Many thanks,
HV






More information about the users mailing list