Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > failed to compile boost.system with msvc-7.1

Reply
Thread Tools

failed to compile boost.system with msvc-7.1

 
 
BruceWho
Guest
Posts: n/a
 
      04-16-2008
I downloaded boost1.35.0 and built it with following command:

bjam --toolset=msvc-7.1 --variant=release --threading=multi --
link=shared --with-system stage

and it failed to compile, error message is:


E:\software\development\boost_1_35_0\boost_1_35_0> bjam --
toolset=msvc-7.1 --variant=release --threading=multi --link=shared --
with-system stage
....found 72 targets...
....updating 6 targets...
compile-c-c++ bin.v2\libs\system\build\msvc-7.1\release\threading-multi
\error_code.obj
error_code.cpp
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WinNT.h(477) : error C2467: illegal declaration of anonymous 'struct'
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WinNT.h(495) : error C2467: illegal declaration of anonymous 'struct'
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WinNT.h(2117) : error C2146: syntax error : missing ';' before
identifier 'PVOID'

D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WinNT.h(2117) : error C2501: '_inline' : missing storage-class or
type specifiers

D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WinNT.h(211 : error C2146: syntax error : missing ';' before
identifier 'PVOID'

D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WinNT.h(211 : error C2501: '_inline' : missing storage-class or
type specifiers

D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WinNT.h(211 : error C2086: 'int _inline' : redefinition
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK
\Include\WinNT.h(2117) : see declaration of '_inline'
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WinNT.h(7345) : error C2467: illegal declaration of anonymous
'struct'
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WinNT.h(7354) : error C2467: illegal declaration of anonymous
'struct'
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WinNT.h(7870) : error C2467: illegal declaration of anonymous
'struct'
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WinNT.h(8646) : error C2133: '_EVENTSFORLOGFILE:EventLogRecords' :
unknown size

D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WinNT.h(8652) : error C2133: '_PACKEDEVENTINFO::ulOffsets' : unknown
size
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WinBase.h(231) : error C2467: illegal declaration of anonymous
'struct'
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WinBase.h(525) : error C2467: illegal declaration of anonymous
'struct'
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WinGDI.h(1892) : error C2467: illegal declaration of anonymous
'struct'
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WinGDI.h(189 : error C2467: illegal declaration of anonymous
'struct'
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WinGDI.h(1946) : error C2467: illegal declaration of anonymous
'struct'
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WinGDI.h(1952) : error C2467: illegal declaration of anonymous
'struct'
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WinReg.h(8 : error C2146: syntax error : missing ';' before
identifier 'QUERYHA
NDLER'
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WinReg.h(91) : error C2143: syntax error : missing ';' before '*'
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WinReg.h(91) : error C2365: 'QUERYHANDLER' : redefinition; previous
definition wa
s a 'function'
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK
\Include\WinReg.h(8 : see declaration of 'QUERYHANDLER'
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WinReg.h(91) : error C2501: 'PQUERYHANDLER' : missing storage-class
or type speci
fiers
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WinReg.h(94) : error C2146: syntax error : missing ';' before
identifier 'pi_R0_1
val'
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WinReg.h(94) : error C2501: 'provider_info:QUERYHANDLER' : missing
storage-clas
s or type specifiers
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WinReg.h(94) : error C2501: 'provider_info:i_R0_1val' : missing
storage-class o
r type specifiers
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WinReg.h(95) : error C2146: syntax error : missing ';' before
identifier 'pi_R0_a
llvals'
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WinReg.h(95) : error C2501: 'provider_info:QUERYHANDLER' : missing
storage-clas
s or type specifiers
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WinReg.h(95) : error C2501: 'provider_info:i_R0_allvals' : missing
storage-clas
s or type specifiers
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WinReg.h(96) : error C2146: syntax error : missing ';' before
identifier 'pi_R3_1
val'
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WinReg.h(96) : error C2501: 'provider_info:QUERYHANDLER' : missing
storage-clas
s or type specifiers
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WinReg.h(96) : error C2501: 'provider_info:i_R3_1val' : missing
storage-class o
r type specifiers
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WinReg.h(97) : error C2146: syntax error : missing ';' before
identifier 'pi_R3_a
llvals'
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WinReg.h(97) : error C2501: 'provider_info:QUERYHANDLER' : missing
storage-clas
s or type specifiers
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WinReg.h(97) : error C2501: 'provider_info:i_R3_allvals' : missing
storage-clas
s or type specifiers
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\MMSystem.h(1837) : error C2467: illegal declaration of anonymous
'struct'
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\MMSystem.h(1841) : error C2467: illegal declaration of anonymous
'struct'
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\MMSystem.h(1862) : error C2467: illegal declaration of anonymous
'struct'
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\MMSystem.h(1866) : error C2467: illegal declaration of anonymous
'struct'
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\RpcDce.h(1807) : warning C4224: nonstandard extension used : formal
parameter 'ex
ception' was previously defined as a type
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\ShellAPI.h(886) : error C2146: syntax error : missing ';' before
identifier 'Shel
lMessageBoxA'
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\ShellAPI.h(886) : error C2377: '_cdecl' : redefinition; typedef
cannot be overloa
ded with any other symbol
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK
\Include\WinReg.h(8 : see declaration of '_cdecl'
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\ShellAPI.h(892) : error C2146: syntax error : missing ';' before
identifier 'Shel
lMessageBoxW'
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\ShellAPI.h(892) : error C2086: 'int _cdecl' : redefinition
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK
\Include\ShellAPI.h(886) : see declaration of '_cdecl'
d:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\RpcNdr.h(1017) : error C2133: '_MIDL_FORMAT_STRING::Format' : unknown
size
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WTypes.h(999) : error C2467: illegal declaration of anonymous
'struct'
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WTypes.h(1026) : error C2467: illegal declaration of anonymous
'struct'
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\WTypes.h(1039) : error C2467: illegal declaration of anonymous
'struct'
d:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\OAIdl.h(484) : error C2467: illegal declaration of anonymous 'struct'
d:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\OAIdl.h(486) : error C2467: illegal declaration of anonymous 'struct'
d:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\MsXml.h(595) : warning C4224: nonstandard extension used : formal
parameter 'DOMD
ocument' was previously defined as a type
d:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\MsXml.h(1213) : warning C4224: nonstandard extension used : formal
parameter 'DOM
Document' was previously defined as a type
D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
\PropIdl.h(371) : error C2467: illegal declaration of anonymous
'struct'

call "D:\program\Microsoft Visual Studio .NET 2003\VC7\bin
\vcvars32.bat" >nul
cl /Zm800 -nologo @"bin.v2\libs\system\build\msvc-7.1\release
\threading-multi\error_code.obj.rsp"

....failed compile-c-c++ bin.v2\libs\system\build\msvc-7.1\release
\threading-multi\error_code.obj...
....skipped <pbin.v2\libs\system\build\msvc-7.1\release\threading-
multi>boost_system-vc71-mt-1_35.dll for lack of <pbin.v2\libs\system
\build\msvc-7.1\r
elease\threading-multi>error_code.obj...
....skipped <pstage\lib>boost_system-vc71-mt-1_35.dll for lack of
<pbin.v2\libs\system\build\msvc-7.1\release\threading-
multi>boost_system-vc71-mt-1_35
..dll...
....skipped <pbin.v2\libs\system\build\msvc-7.1\release\threading-
multi>boost_system-vc71-mt-1_35.lib for lack of <pbin.v2\libs\system
\build\msvc-7.1\r
elease\threading-multi>error_code.obj...
....skipped <pstage\lib>boost_system-vc71-mt-1_35.lib for lack of
<pbin.v2\libs\system\build\msvc-7.1\release\threading-
multi>boost_system-vc71-mt-1_35
..lib...
....skipped <pstage\lib>boost_system-vc71-mt.lib for lack of <pstage
\lib>boost_system-vc71-mt-1_35.lib...
....failed updating 1 target...
....skipped 5 targets...


I added the system\src\error_code.cpp to an empty project and can
compiled it with success. So I guess there must be something wrong
with the default compile options, but I donnot know how to fix it.
Could anybody help me out? Any help would be appreciated!

 
Reply With Quote
 
 
 
 
Ian Collins
Guest
Posts: n/a
 
      04-16-2008
BruceWho wrote:

You should ask this on a windows/VS programming group.

--
Ian Collins.
 
Reply With Quote
 
 
 
 
Jim Langston
Guest
Posts: n/a
 
      04-16-2008
BruceWho wrote:
> I downloaded boost1.35.0 and built it with following command:
>
> bjam --toolset=msvc-7.1 --variant=release --threading=multi --
> link=shared --with-system stage
>
> and it failed to compile, error message is:
>
>
> E:\software\development\boost_1_35_0\boost_1_35_0> bjam --
> toolset=msvc-7.1 --variant=release --threading=multi --link=shared --
> with-system stage
> ...found 72 targets...
> ...updating 6 targets...
> compile-c-c++
> bin.v2\libs\system\build\msvc-7.1\release\threading-multi
> \error_code.obj
> error_code.cpp
> D:\program\Microsoft Visual Studio .NET 2003\VC7\PlatformSDK\Include
> \WinNT.h(477) : error C2467: illegal declaration of anonymous 'struct'


[SNIP]

That's a MSVC problem, one of the project settings, I haven't figured it out
yet. Same source code with different project settings will compile without
any warnings. Since it's microsoft speicfic try
microsoft.public.vc.language

hth


--
Jim Langston



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
compile directive for conditional compile for Java 1.4 versus Java 5 timjowers Java 7 02-02-2011 12:08 AM
How to compile the following source code in VC6// I have error inVC++6 but compile ok in GCC fAnSKyer C++ 2 06-07-2009 07:57 AM
computation at compile time i.e. compile time functions usingtemplates Carter C++ 2 03-04-2009 06:43 PM
Compile versus not compile (VS 2005)?? stupid48@gmail.com ASP .Net 1 04-11-2008 08:24 PM
cant compile on linux system.cant compile on cant compile onlinux system. Nagaraj C++ 1 03-01-2007 11:18 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57