On Tue, May 09, 2006 at 10:19:39AM -0500, Bo Peng wrote:
> >> The .C and .c problem has been handled.
> >
> >So, is the problem with "undefined reference to vtable" solved?
> 
> Yes. scons scans .cpp (and .cxx etc) and included .h files for
> Q_OBJECT, and moc them if needed. It failed to moc .C files because it
> is .c under windows.  I have corrected the problem by manually moc the
> necessary files.

Hmmm... This risks to be error prone. SCons should be fixed to recognize
.C files as source files also on Windows.

> >
> >> Please, if you can, help me
> >> figure out why cygwin build lyx needs zlib1.dll, instead of cygwin
> >> libz.a.
> >
> >I will gladly do that but I don't I understand what you mean.
> >On cygwin you should use -lz and by default it should link using
> >/usr/lib/libz.dll.a, which is the import library for /usr/bin/cygz.dll.
> >There is also a static /usr/lib/libz.a, but it should not be used unless
> >you provide the -static option.
> 
> That is also my understanding, but on my system, the link failed with
> unknown references to zlib stuff. I then tried to feed it zlib1.dll
> from www.zlib.org, and ld succeeded.

Yesterday, when I tried scons for the first time, I also noticed that.
The problem was simply that -lz is specified on the final link
step before the -lboost_* libraries. Moving -lz at the end solved the
problem.

> >> It seems that the .rdata problem is now correctly handled (hidden in
> >> SConstruct), which is, in my opinion, the most troublesome thing for a
> >> cygwin/lyx build.
> >
> >I saw you clever solution, but the rdata script is only needed when
> >linking against the X11 libs.
> 
> Right now, I assume that a cygwin build will use cygwin qt3 (a right
> choice) so the script is used. If you would like to use standalone
> qt3/qt4, you may have to pass a flag that change things like default
> system libraries.

How is that done with scons?

> >I don't think that it may be harmful, though, but it can be done in
> >this simple way: if X11 is requested then use the script else add
> >-DQ_CYGWIN_WIN to CPPFLAGS.
> 
> This can be done easily.

I suggest a boolean "without_x11".

> >This brings me to the question of how passing options. I tried adding
> >CPPFLAGS=-O2 on the scons command line but it doesn't seem to have
> >worked.
> 
> This is supposed to work if I add "xxx', which means something easy
> but not known by me, given my one week experience with scons.

;-)

> >I'll try and report the results. However, be warned that I almost
> >never accept defaults and try to push a software to do what I want
> >and not what it thinks is the best for me ;-)
> 
> I know. There are lots of FIXMEs regarding such things, and you are
> more than welcome to tweak things for your own convenience and
> optimization, *after* the basis is figured out.

Yes, python should be easier to tweak than m4, but we have to prove
that it can be as powerful as m4 is.

I'll tell you that the first time I was faced with vi on Unix, I was
really lost and don't even succeeded to quit it without peeking at a
manual. I remember that I promised to never use vi because it was so
unfriendly to the user. Today I would not use anything but vim for
editing because it is so powerful.

What I mean is that I will help to tune scons but I do not promise
to leave autotools for it unless it proves to be at least as powerful
as they already are.

For example, the -lz thing is a con for scons (sorry for the pun), as
libtool is able to handle the reordering of libraries quite well.

-- 
Enrico

Reply via email to