----- Original Message ----- 
From: "Arjen Markus" <[email protected]>
To: "Sisyphus" <[email protected]>
Cc: "plplot" <[email protected]>
Sent: Thursday, January 13, 2011 1:08 AM
Subject: Re: [Plplot-general] plplot-5.9.7 won't build on Cygwin-1.7.7


> Hi Rob,
>
> this is rather odd: DWORD is defined as an "unsigned long", but
> that ought to be okay. I have not used Cygwin in a pretty long
> while, I must admit (focusing on MinGW instead at the moment)
> and the structure definition seems perfectly okay as well.
>
> Can you check the various Cairo include files? It seems likely
> that the problem resides there. (I do not have it myself at
> the moment)

Finally found the culprit. In Xlib.h:

#define Status int

In drivers/cairo.c it's therefore just a matter of including windows.h 
before the X11 includes.
But then I get:

##################################
[ 56%] Building C object drivers/CMakeFiles/cairo.dir/cairo.c.o
Linking C shared module cairo.dll
CMakeFiles/cairo.dir/cairo.c.o:cairo.c:(.text+0x4373): undefined reference 
to `_setbkco...@8'
CMakeFiles/cairo.dir/cairo.c.o:cairo.c:(.text+0x43cf): undefined reference 
to `_exttexto...@32'
CMakeFiles/cairo.dir/cairo.c.o:cairo.c:(.text+0x43f0): undefined reference 
to `_setbkco...@8'
CMakeFiles/cairo.dir/cairo.c.o:cairo.c:(.text+0x487c): undefined reference 
to `_cairo_win32_surface_create'
collect2: ld returned 1 exit status
make[2]: *** [drivers/cairo.dll] Error 1
make[1]: *** [drivers/CMakeFiles/cairo.dir/all] Error 2
make: *** [all] Error 2
##################################

`_setbkco...@8' and `_exttexto...@32' will be resolved by linking to 
libgdi32.a. How do I make that happen ?

But I haven't yet found `_cairo_win32_surface_create' in any of the 
libraries.
I can find it in the 'native' win32 libcairo.dll.a, but we're linking to the 
*cygwin* version of libcairo.dll.a, and it just doesn't have that symbol.

I guess this means that either Cygwin's cairo library needs to have a 
'cairo_win32_surface_create' function, or the function needs to be avoided 
in the plplot (drivers/cairo.c) source when we build on Cygwin.

If I build afresh, having disabled the cairo driver, 'make' errors out with:

#################################
Scanning dependencies of target test_xwin_dyndriver
[ 61%] Generating test_dyndrivers_dir/xwin.rc
Could not open driver module xwin
libltdl error: The specified module could not be found.
make[2]: *** [drivers/test_dyndrivers_dir/xwin.rc] Error 1
make[1]: *** [drivers/CMakeFiles/test_xwin_dyndriver.dir/all] Error 2
make: *** [all] Error 2
#################################

That's all I've got time for, for the moment ... more later.

Thanks Arjen.

I'm also more interested in MinGW (where plplot builds fine, btw) than 
Cygwin - just a bit curious as to why it's not so straightforward on Cygwin.

Cheers,
Rob


------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Plplot-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-general

Reply via email to