Bo Peng wrote:
First you should use, when not already done, the option 'log_file=yes'.
then you see the commands which are called by scons.
Is there DBOOST_USER_CONFIG="<config.h>" in the command line, I assume
yes, because I've no problems.

I don't know, will try again but note that the macro is defined in src/config.h:

#define BOOST_USER_CONFIG <config.h>

But it is defined after "#define BOOST_ALL_NO_LIB 1", so that maybe is the source of the problem.

Compiling a typical file I see:

cl /TP /EHsc /wd4819 /wd4996 /nologo /O2 -DHAVE_CONFIG_H -DQT_CLEAN_NAMESPACE -DQT_GENUINE_STR -DQT_NO_STL -DQT3_SUPPORT /ID:\program\GnuWin32\include /ID:\devel\lyx\trunk\boost /ID:\devel\lyx\trunk\src /ID:\program\Qt\4.1\include /ID:\program\Qt\4.1\include\QtCore /ID:\program\Qt\4.1\include\QtGui /Imsvc\common /ID:\devel\lyx\trunk\src /Imsvc\common\images /ID:\devel\lyx\trunk\src\images /Imsvc\common\frontends /ID:\devel\lyx\trunk\src\frontends /Imsvc\common\frontends\qt4 /ID:\devel\lyx\trunk\src\frontends\qt4 /Imsvc\common\frontends\controllers /ID:\devel\lyx\trunk\src\frontends\controllers /cD:\devel\lyx\trunk\src\frontends\qt4\Application.C /Fomsvc\common\frontends\qt4\Application.obj
Application.C

So there is no DBOOST_USER_CONFIG="<config.h>" there, I guess this is normal?

But compiling a boost::signal file, I see it is there:

cl /TP /EHsc /wd4819 /wd4996 /nologo /O2 -DBOOST_USER_CONFIG="<config.h>" /TP /ID:\program\GnuWin32\include /ID:\devel\lyx\trunk\boost /ID:\devel\lyx\trunk\src /c D:\devel\lyx\trunk\boost\libs\signals\src\connection.cpp /Fomsvc\boost\signals\src\connection.obj


Then compile one file by hand and add /showIncludes
("Displays a list of all include files during compilation" )
and search for the config.h, maybe on your setup has a other config.h
in the compiler search path.

I have searched for one but didn't find any.

You could also add a wrong C++ in the config.h and see if it stops
compilation.

I have done that and I get an error:

cl /TP /EHsc /wd4819 /wd4996 /nologo /O2 /ID:\program\GnuWin32\include /ID:\devel\lyx\trunk\boost /ID:\devel\lyx\trunk\src /c D:\devel\lyx\trunk\src\main.C /Fomsvc\common\main.obj main.C D:\devel\lyx\trunk\src\config.h(14) : error C4430: missing type specifier - int
assumed. Note: C++ does not support default-int
D:\devel\lyx\trunk\src\config.h(14) : error C4430: missing type specifier - int

So src/config.h _is_ used.

Peter's suggestions are sensible. The problem must be with that
BOOST_ALL_NO_LIB but your boost src somehow do not get it through
-DBOOST_USER_CONFIG="<config.h>". That means there is some other
config.h being picked up.

I think there is indeed a clash somewhere and that you should not add DBOOST_USER_CONFIG="<config.h>" because all included boost file should #include "config.h" already. At least that's what Lars told me once. So I guess there's another config.h in my system but I am sure it is not in the lyx tree.


Anyway, what macros are boost specific? I have modified SConstruct and
it now generates multiple config.h (currently src/config.h and
intl/config.h). If you can tell me which macros to use, it is easy for
me to create another config.h file just for boost.

Great! There is one less item in "my" Scons TODO list :-)

I think all BOOST_* should go to "boost/boost_config.h" with the exception of BOOST_USER_CONFIG. Using the same name will lead to compiler confusion for sure.

When compiling boost files DBOOST_USER_CONFIG="<boost_config.h>" must be passed and trunk/src/ shall *not* be in the include path!

BOOST_USER_CONFIG shall also be present only in src/config.h and shall point to "boost_config.h":

#define BOOST_USER_CONFIG <boost_config.h>


Attached is a snapshot patch of what I am doing. It compiles fine
under linux, but I may not have time to test it under windows until
far later. Your help would be appreciated. What you need to do is
first see if this patch works with your mingw and/or msvc settings.

I'll do that with your updated patch.

Then, you may try to create a boost/config.h mimicking intl/config.h
(line 1214-1330). You boost/config.h should be far easier than the
current two though.

The patch is big since there are major shuffling going on.

Not 100% sure about that but I think "boost_config.h" contents shall be:

#define BOOST_ALL_NO_LIB 1

/* #undef BOOST_POSIX */

#if !defined(ENABLE_ASSERTIONS)
#  define BOOST_DISABLE_ASSERTS 1
#endif
#define BOOST_ENABLE_ASSERT_HANDLER 1

#define BOOST_DISABLE_THREADS 1
#define BOOST_NO_WREGEX 1
#define BOOST_NO_WSTRING 1

#ifdef __CYGWIN__
#  define BOOST_POSIX 1
#endif

#if defined(HAVE_NEWAPIS_H)
#  define WANT_GETFILEATTRIBUTESEX_WRAPPER 1
#endif

#endif


Abdel.

Reply via email to