Openslide Linking with Ubuntu 64 bits
Adam Goode
agoode at andrew.cmu.edu
Mon May 17 16:49:32 EDT 2010
On 05/17/2010 04:39 PM, Benjamin Stevens wrote:
> Hi,
>
> I would like to test OpenSlide (which looks great, thanks for this great
> work !) but I have some difficulties while compiling.
> I just ran the classical commands (configure, make & make install) and
> everything looked ok. In fact, the two files libopenslide.so &
> libopenslide.la <http://libopenslide.la> were generated in
> /user/local/lib. "include" files were copied in the include directory
> named /usr/local/include/openslide.
>
> Pkg-config seems also to work :
> pkg-config openslide --cflags => -pthread -I/usr/local/include/openslide
> -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
> pkg-config openslide --libs=> -L/usr/local/lib -lopenslide
>
> It is fantastic ;)
Thanks!!
>
> Then, I added the pkg-config commands in CFLAGS & LFLAGS in my MakeFile
> but it failed while linking :
>
> /home/stevben/Bureau/src/acquisition/IoOpenSlide.cpp:9: undefined
> reference to `openslide_open(char const*)'
> /home/stevben/Bureau/src/acquisition/IoOpenSlide.cpp:9: undefined
> reference to `openslide_open(char const*)'
> collect2: ld returned 1 exit status
>
> Line 9 : openslide_t* slide = openslide_open(filename);
>
> I'm looking for a solution since yesterday... Any idea would be a great
> help.
>
Since you are using C++, I think that when you #include <openslide.h>,
you should do something like this instead:
extern "C" {
#include <openslide.h>
}
Have fun with OpenSlide,
Adam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
Url : http://lists.andrew.cmu.edu/pipermail/openslide-users/attachments/20100517/59e8e165/attachment.bin
More information about the openslide-users
mailing list