On Wed, May 10, 2006 at 09:43:01AM +0200, Abdelrazak Younes wrote:
> Bo Peng a écrit :
> >>Abdel said that scons is able to recognize .C files as C++ source
> >>files on a native Windows environment. Why it is not able to do so
> >>with cygwin?
> >
> >I did not read that email in detail, what I know is that gcc tells the
> >content of a .c file and make itself g++ if the file is indeed in C++.
> >However, at linking time, gcc and g++ may lead to different results
> >(stdc++.so etc).
> >
> >A renaming of lyx .C files will never happen so we will have to use
> >the current solution, .i.e., force moc'ing, and force the use of g++
> >(I know, this leads to non-portability..... but this is life).
> 
> Please only reserve this treatment for cygwin as it seems to work well 
> with mingw:
> 
> * gcc rightfully takes .C file as C++ (by contents or by extension, I am 
> not sure).
> * Scons generates moc_xxx.cc file so they should be correctly identified 
> as C++ by gcc.
> * linking should be done with g++ or IIRC you can also use gcc and pass 
>  "-lstdc++"

Wait a moment Abdel. If scons is using gcc to compile .C files it means
that it is not able to recognize them as C++ sources. This also means
that it will not check for mocable files. So, how can it work for you?
I verified that 57 object files were missing from libqt3.a without
Bo's "treatment" and this led to the dreadful "undefined reference for
vtable in..." error.

-- 
Enrico

Reply via email to