[Xcb] xcb-util - image library n win32

Jeetu Golani jeetu.golani at gmail.com
Tue May 5 08:51:14 PDT 2009


Hi,

In trying to build xcb-util for win32 I realized that I had mistakenly linked 
with .a files instead of .dll files for SHM, Render and a few libraries 
created while building xcb. 

I've made the change and am attaching the output again. There are a few 
undefined symbol warnings which exist because if I try to add -no-undefined 
to the LDFLAGS for some reason I get undefined reference errors as shown in 
my previous post.

The output shows the following type of errors for xcb-util libraries

*** Warning: This system can not link to static lib 
archive ../atom/libxcb-atom.la.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have.

*** Warning: This system can not link to static lib 
archive ../property/libxcb-property.la.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have.

I don't know how to rectify this, would appreciate help.

Bye for now


On Monday 04 May 2009, Jeetu Golani wrote:
> Hi guys,
>
> Thanks for replying back.
>
> I've made changes as suggested by Vincent. It's all quite a quickly put
> together hack for now but I get the warnings on static libraries as can be
> seen in the attached without-noundefined text file. I don't have any shared
> library .so files for the win32 xcb port I've generated, just the dll and
> the .a,.la files......neither do the xcb-util libraries generate .so
> files....do I need to add -shared somewhere so these are built first?
>
> The above is done without adding the -no-undefined directive. The
> with-undefined file which I'm attaching shows what happens if I add
> -no-undefined to libxcb_atom_la_LDFLAGS as an example here
> atom/Makefile.am. I get a bunch of  undefined references here. The same
> happens with image or any of the other libraries.
>
> Any clues?
>
> Thanks....n I don't know whether this list prefers file attachments or I
> should have pasted the text instead but if its the latter my bad..sorry :)
>
> Bye for now
>
> On Sun, May 3, 2009 at 1:57 PM, Vincent Torri <vtorri at univ-evry.fr> wrote:
> > On Sun, 3 May 2009, Jeetu Golani wrote:
> >> Hi,
> >>
> >>  When you build and install libxcb, it will create xcb.pc. Points
> >>
> >>> PKG_CONFIG_PATH there. For example I built libxcb with prefix
> >>> $HOME/w/x11 so it would configure xcb-util like this:
> >>
> >> I got past this step. I setup the XCB_CFLAGS and XCB_LIBS environment
> >> variables instead so that works.  I also had to setup environment
> >> variables
> >> for SHM and Render. Although I've set things up so as to link against my
> >> pthreadGC2 dll there is still one place (at least) which is still
> >> causing it
> >> to link against -lpthread which fails for me....tried making changes
> >> within
> >> Makefile.am but didn't work so as a quick hack setup a symlink between
> >> libpthread.a and my pthreadGC2.dll so I got through this step.
> >>
> >> In order to get a DLL I tried doing what I did for XCB i.e. in
> >> configure.ac I
> >> put in an AC_LIBTOOL_WIN32_DLL before AC_PROG_LIBTOOL. Also in
> >> Makefile.am I
> >> put in a libxcb_image_LDFLAGS=-no-undefined. (reciting by memory so hope
> >> I haven't made a mistake writing this but I think this seems what I did)
> >>
> >> Everything goes through now but under image/.libs all i can see is a
> >> libxcb-image.a and a .la file....no dll...so I'm guessing something more
> >> needs to be done....any ideas?
> >
> > to make libtool aware of building a dll:
> >
> > 1) put AC_LIBTOOL_WIN32_DLL before AC_PROG_LIBTOOL (you already did that)
> > 2) add -no-undefined in the *_LDFLAGS cariable in the Makefile.am file
> > 3) have all the dependency dll needed to build the lib.
> >
> > don't forget to run 'make clean' to force the link again before running
> > make.
> >
> > check if during the link, there is no warning message that tells you that
> > libtool can create only the static lib (for some reason). If yes, then
> > the dll is not built. Then, paste the message.
> >
> > Vincent


-------------- next part --------------
A non-text attachment was scrubbed...
Name: output
Type: application/octet-stream
Size: 31853 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/xcb/attachments/20090505/2954abb9/attachment-0001.obj 


More information about the Xcb mailing list