[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Linking in libpgm
From: |
Dave Rudolf |
Subject: |
Linking in libpgm |
Date: |
Thu, 23 Sep 2004 07:26:27 -0600 |
Hey all,
I am trying to use libpgm and libpbm into a C++ program, but I get the
following at link time:
: undefined reference to `pm_freearray(char**, int)'
: undefined reference to `pm_openr(char const*)'
: undefined reference to `pgm_readpgm(_IO_FILE*, int*, int*, unsigned*)'
: undefined reference to `pgm_init(int*, char**)'
... and so on. Now, if I compile the source with gcc instead of g++ (and I
remove all references to c++ libraries), then it links fine. Looking in my
libs directory, I see that I do indeed have the dynamic library, if that
matters at all:
/usr/lib/libpgm.a
/usr/lib/libpgm.so
So is there some reason why the linker gets confused on these libs? I should
be able to use raw C libraries in my C++ code, should I not? If so, then can
anyone tell me what is going on here?
Thanks.
Dave
- Linking in libpgm,
Dave Rudolf <=