----- Carlos R. Mafra <[email protected]> a écrit :
> On Sun, 11 May 2014 at  1:09:23 +0800, David Maciejak wrote:
> > On Sat, May 10, 2014 at 10:10 PM, Carlos R. Mafra <[email protected]> wrote:
> > >
> > > [...]
> > >
> > >   CCLD     wmiv
> > > /usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld:
> > >  wmiv.o: undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
> > >
> > > [...]
> >
> > hum did not try it on Suse, is your command line contains -pthread ?
>
> No. But adding it manually in the Makefile.am
>
> wmiv_LDADD = \
>       $(top_builddir)/wrlib/libwraster.la \
>       @XLFLAGS@ @XLIBS@ \
>       @GFXLIBS@ -lpthread
>
> makes it compile. But there must be a better way.

Hi,

There are indeed better ways to handle this:
 - the minimum is to detect it in configure and set the appropriate compilation 
flags, or disable wmiv if the application does not support pthread;

 - but, in the present case, the use of pthreads in the code is the wrong 
solution to the problem. this use case should be handled with timeout (in 
WUtil, there's WMAddTimerHandler for that);

 - but... Looking at the code, apart from the list of comment it calls for, the 
thing that stands out is that this app is not using WINGs toolkit, not even 
WUtil, which is a bit sad for an util that would be part of WindowMaker and 
makes it a little bit out of place... Shouldn't it deserve being a stand-alone 
app, as wmiv still has potential?

..but that's just my point of view.


--
To unsubscribe, send mail to [email protected].

Reply via email to