Boost logo

Boost-Build :

From: Aleksey Gurtovoy (alexy_at_[hidden])
Date: 2005-05-28 10:58:26


Victor A. Wagner Jr. writes:
>>I'm getting errors while rebuilding current cvs:
>>execnt.c
>>execnt.c(424) : error C2143: syntax error : missing ';' before 'type'
>>execnt.c(425) : error C2065: 'expected' : undeclared identifier
>>execnt.c(425) : warning C4047: 'function' : 'const char *' differs in levels
>>of
>>indirection from 'int'
>>execunix.c
>
> you haven't said which compiler you're uisng.

Most probably MSVC 6.5. It was failing for us as well, for valid
reasons -- see below.

> from cvs annotate execnt.c
> 1.17 (david_ab 27-May-05):
> 1.17 (david_ab 27-May-05): {
> 1.17 (david_ab 27-May-05): char** argv = string_to_args("\"g++\" -c -I\"Foobar\"");
> 1.17 (david_ab 27-May-05): assert(!strcmp(argv[0], "g++"));
> 1.18 (david_ab 27-May-05):
> 1.18 (david_ab 27-May-05): /* Work around vc6 bug; it doesn't like escaped string
> 1.18 (david_ab 27-May-05): * literals inside assert
> 1.18 (david_ab 27-May-05): */
> 1.18 (david_ab 27-May-05): char const expected[] = "-c -I\"Foobar\""; //<<<<<<<<<<<< line 424 <<<<<<<<<<<<<<<<
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Here's the culprit. It's C. You cannot define something in the middle
of a block, only at the beginning.

> 1.18 (david_ab 27-May-05): assert(!strcmp(argv[1], expected));
> 1.17 (david_ab 27-May-05): free_argv(argv);
> 1.17 (david_ab 27-May-05): }

>>It does build OK with gcc however,

Fixed in the CVS.

-- 
Aleksey Gurtovoy
MetaCommunications Engineering
 

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk