www.digitalmars.com         C & C++   DMDScript  

c++.wxwindows - building wxWdigets 2.60, stlport and psdk

reply Craig Bowlas <craigbowlas yahoo.co.uk> writes:
Hi,

I have a problem building wxWidgets 2.6.  I am using stlport 4.5.2, latest
dmc(CD version and tools with on-line update) and the latest platform sdk.
When I attempt to compile either debug or release builds with smake and
makefile.dms I get a series of compilation errors in regexec.c as
follows...


        dmc -mn -c -odmc_msw\wxregex_regexec.obj  -o  -ND
-D_WIN32_WINNT=0x040
0 -I..\..\include -I..\..\lib\dmc_lib\msw -D__WXMSW__    -w12
..\..\src\regex\
regexec.c
newdfa(v, cnfa, cm, small)
                       ^
..\..\src\regex\rege_dfa.c(267) : Error: identifier expected
struct smalldfa *small;         /* preallocated space, may be NULL */
                    ^
..\..\src\regex\rege_dfa.c(271) : Error: identifier or '( declarator )'
expected

        struct smalldfa *smallwas = small;
                                       ^
..\..\src\regex\rege_dfa.c(276) : Error: expression expected
                if (small == NULL) {
                        ^
..\..\src\regex\rege_dfa.c(282) : Error: expression expected
                        small = (struct smalldfa *)MALLOC(
                              ^
..\..\src\regex\rege_dfa.c(283) : Error: '=', ';' or ',' expected
Fatal error: too many errors
--- errorlevel 1


If I remove the -ND switch from the command line the error goes away and
libraries are built, likewise if I use the default STL or the supplied
windows SDK.  Also if I use the make utility and makefile.dmc the build is
ok, but here -ND is not specified on the command line to dmc.

From the description of the -ND option in the documentation I do not see
how this could effect compilation, the preprocessor macros set do not seem
relevant, I have looked at this in the sources

What difference does building with and without -ND make?  Presumably if
present the dmc run-time libs are loaded at program run-time and not link
time, this should have no effect the compilation phase.  Am I being stupid
here but - any ideas anyone?


Craig
May 19 2005
parent "Włodzimierz Skiba" <abx abx.art.pl> writes:
Craig Bowlas <craigbowlas yahoo.co.uk> wrote in
news:1bodl2jgrj59g$.5ba3ydjqd8ka$.dlg 40tude.net: 
 If I remove the -ND switch from the command line the error goes away
 and libraries are built
In makefiles.dms you can find that -ND comes from conditions: !if "$(RUNTIME_LIBS)" == "dynamic" __RUNTIME_LIBS = -ND !endif !if "$(RUNTIME_LIBS)" == "static" __RUNTIME_LIBS = !endif so all you have to do is to use RUNTIME_LIBS=static in command line of smake. For example complete command line I use myself for such build are: for wxMSW build: smake /NOLOGO /F makefile.dms SHARED=0 RUNTIME_LIBS=static UNICODE=0 MONOLITHIC=1 BUILD=debug USE_GUI=1 USE_OPENGL=0 USE_ODBC=0 WXUNIV=0 for wxMSWUniversal build: smake /NOLOGO /F makefile.dms SHARED=0 RUNTIME_LIBS=static UNICODE=1 MONOLITHIC=0 BUILD=release USE_GUI=1 USE_OPENGL=0 USE_ODBC=0 WXUNIV=1 so I'm able to test different settings of build system. I use ODBC and OpenGL turned off because I have free DMC available at the place I usually test it. ABX
May 19 2005