Compilation errors when using boost libraries
Hi,
this is my first time to use Boost -librairies.
I have created a Project folder where in my complete Software
architeture is available.
I have placed boost libraries downloaded from boost.org site within
INCLUDE dir of VC 2005 Install directory.
However I received many compilation errors. Can anyone help me to
resolve these errors. Am I doing the right thing to get the CPP Software
to compile.
List of Errors I have received are here by
------ Build started: Project: vc2005_mcf52xxinit, Configuration: Debug
Win32 ------
Compiling...
CPU_MCF5282Init.cpp
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\if.hpp(63) : error C2653: 'T1' : is not a class
or namespace name
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\if.hpp(63) : error C2065: 'value' : undeclared
identifier
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\if.hpp(66) : error C2065: 'T2' : undeclared
identifier
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\if.hpp(67) : error C2065: 'T3' : undeclared
identifier
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\if.hpp(70) : error C2899: typename cannot be used
outside a template declaration
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\if.hpp(70) : error C2955: 'boost::mpl::if_c' :
use of class template requires template argument list
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\if.hpp(35) : see declaration of
'boost::mpl::if_c'
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\if.hpp(131) : error C2989: 'boost::mpl::if_' :
class template has already been declared as a non-class template
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\if.hpp(56) : see declaration of 'boost::mpl::if_'
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\if.hpp(131) : error C2143: syntax error : missing
';' before '<'
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\if.hpp(131) : error C2913: explicit
specialization; 'boost::mpl::if_' is not a specialization of a class
template
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\if.hpp(131) : error C2059: syntax error : '<'
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\if.hpp(131) : error C2143: syntax error : missing
';' before '{'
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\if.hpp(131) : error C2447: '{' : missing function
header (old-style formal list?)
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\if.hpp(131) : error C2947: expecting '>' to
terminate template-argument-list, found '<'
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\if.hpp(131) : error C2146: syntax error : missing
';' before identifier 'na'
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\if.hpp(131) : error C3856: 'boost::mpl': class is
not a class template
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\if.hpp(131) : error C4430: missing type specifier
- int assumed. Note: C++ does not support default-int
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\if.hpp(131) : error C4430: missing type specifier
- int assumed. Note: C++ does not support default-int
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\if.hpp(131) : error C2086: 'int boost::mpl::na' :
redefinition
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\if.hpp(131) : see declaration of 'boost::mpl::na'
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\if.hpp(131) : error C4430: missing type specifier
- int assumed. Note: C++ does not support default-int
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\if.hpp(131) : error C2086: 'int boost::mpl::na' :
redefinition
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\if.hpp(131) : see declaration of 'boost::mpl::na'
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\if.hpp(131) : error C2143: syntax error : missing
';' before '>'
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\if.hpp(131) : warning C4091: 'typedef ' : ignored
on left of 'boost::mpl::if_' when no variable is declared
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\if.hpp(131) : error C2143: syntax error : missing
';' before '<'
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\if.hpp(131) : error C2059: syntax error : '<'
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\if.hpp(131) : warning C4091: 'typedef ' : ignored
on left of 'boost::mpl::if_' when no variable is declared
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\if.hpp(131) : error C2143: syntax error : missing
';' before '<'
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\if.hpp(131) : error C2059: syntax error : '<'
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\if.hpp(133) : error C2059: syntax error : '}'
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\if.hpp(133) : error C2143: syntax error : missing
';' before '}'
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\if.hpp(133) : error C2059: syntax error : '}'
c:\program files\microsoft visual studio
8\vc\include\boost\type_traits\type_with_alignment.hpp(32) : error
C2143: syntax error : missing ';' before '{'
c:\program files\microsoft visual studio
8\vc\include\boost\type_traits\type_with_alignment.hpp(32) : error
C2447: '{' : missing function header (old-style formal list?)
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\eval_if.hpp(40) : error C2143: syntax error :
missing ',' before '<'
c:\program files\microsoft visual studio
8\vc\include\boost\mpl\eval_if.hpp(44) : see reference to class template
instantiation 'boost::mpl::eval_if
Varadarajan, Satiamoorthy (GE Infra, Transportation) wrote:
Hi,
this is my first time to use Boost -librairies.
I have created a Project folder where in my complete Software architeture is available.
I have placed boost libraries downloaded from boost.org site within INCLUDE dir of VC 2005 Install directory.
However I received many compilation errors. Can anyone help me to resolve these errors. Am I doing the right thing to get the CPP Software to compile.
Satia, 1) Don't put the Boost libraries and headers IN the INCLUDE dir of VC. Install them to a separate location and then add the appropriate paths to the INCLUDE/LIBRARY/SOURCE/etc locations within Tools->Options->Projects->VC++ Directories. 2) You didn't say whether you downloaded the source code or the pre-built binary installer. While a large portion of Boost is in fact header-only, there are several libraries that do require you to build them. If you downloaded the binaries then this has already been built for you but if you pulled down the source then you need to check out the "Getting Started Guide" included in the archive (zip/tar). 3) Try a small program scratch program that only brings in part of the Boost functionality that you'll be working with to see if you are still getting errors. HTH, -Chris
Hi Chris As suggested by you in point 2) in ur previous response, I have followed instructions given in "Getting Started Guide" to download the boost libraries. However I was unsucessful to use the installer(boost_1_33_1_setup.exe)provided by Boost Consulting website. The link or mirror site doesn't seem to be working. Hence I had downloaded boost 1.33.1 version libraries from boost.org (which links to sourceforge.net) http://sourceforge.net/project/showfiles.php?group_id=7586 I have downloaded following items to separate folder boost_1_33_1.exe Mirror 10181389 133353 i386 .exe (32-bit Windows) boost_1_33_1.tar.bz2 Mirror 11507161 54803 Platform-Independent Source .bz2 boost_1_33_1.tar.gz Mirror 14358143 54367 Platform-Independent Source .gz boost_1_33_1.zip Mirror 21579318 93695 Platform-Independent Source .zip Then installed boost_1_33_1.exe, which helped me to create the boost library 1.33.3 version folder in my system. Since I see that boost libraries are installed I did not tried to use other downloaded items i.e ( boost_1_33_1.tar.bz2, boost_1_33_1.tar.gz and boost_1_33_1.zip). Then I created a new project in MSVC 2005 where I copied the Example.cpp program given in "Getting Started Guide" and I excecuted the example.cpp. I was successful in compiling the example.cpp and also tested the example application by entering values in the into the resulting window. So, I believe that Iam successful in installing the boost libraries. However when I compile my project files using these boost library. I had to face with compilation errors. FYI, I followed following steps to compile my project CPP files. 1) Created a New project and added all the necessary header files and source files to the project 2) In Configuration Properties > C/C++ > General > Additional Include Directories, entered the path to the Boost root directory as D:\boost_1_33_1. 3) In Configuration Properties > C/C++ > Precompiled Headers, changed Use Precompiled Header (/Yu) to Not Using Precompiled Headers.3 4) From the Build menu, selected Build Solution Please help me to know if these errors are due to A) Improper installation of Boost libraries. Or B) Necessary Binary Library are not installed. Or C) Problem not in boost-library but in the Software I use ( FYI the software I use here has been developed in different Compiler named Green hills using boost-library 1.33.1 by Different Team and Iam evolving a way to test these Software using VC2005). NOTE: lib\ is found missing in the Boost library installation ver 1.33.1 COMPILATION ERRORS ARE HERE: ------ Build started: Project: UCII_DART_new, Configuration: Debug Win32 ------ Compiling... CPU_MCF5282Init.cpp d:\ucii_dart\adu\code\pal\cpu\cpu_mcf52xxinterruptcontroller.h(55) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int d:\ucii_dart\adu\code\pal\cpu\cpu_mcf52xxinterruptcontroller.h(55) : error C2143: syntax error : missing ';' before '&' d:\ucii_dart\adu\code\pal\cpu\cpu_mcf52xxinterruptcontroller.h(55) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int d:\ucii_dart\adu\code\pal\cpu\cpu_mcf52xxinterruptcontroller.h(56) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int d:\ucii_dart\adu\code\pal\cpu\cpu_mcf52xxinterruptcontroller.h(56) : error C2143: syntax error : missing ';' before '&' d:\ucii_dart\adu\code\pal\cpu\cpu_mcf52xxinterruptcontroller.h(56) : error C2086: 'volatile int CPU::MCF52xx::InterruptController::uint32' : redefinition d:\ucii_dart\adu\code\pal\cpu\cpu_mcf52xxinterruptcontroller.h(55) : see declaration of 'CPU::MCF52xx::InterruptController::uint32' d:\ucii_dart\adu\code\pal\cpu\cpu_mcf52xxinterruptcontroller.h(56) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int d:\ucii_dart\adu\code\pal\cpu\cpu_mcf52xxinterruptcontroller.h(57) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int d:\ucii_dart\adu\code\pal\cpu\cpu_mcf52xxinterruptcontroller.h(57) : error C2143: syntax error : missing ';' before '*' d:\ucii_dart\adu\code\pal\cpu\cpu_mcf52xxinterruptcontroller.h(57) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(74) : error C2039: 'uint8' : is not a member of 'CPU' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(74) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(74) : error C2143: syntax error : missing ';' before '&' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(74) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(74) : error C2039: 'uint8' : is not a member of 'CPU' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(74) : error C2059: syntax error : '>' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(76) : error C2039: 'uint16' : is not a member of 'CPU' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(76) : error C2039: 'uint16' : is not a member of 'CPU' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(76) : error C2065: 'uint16' : undeclared identifier d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(76) : error C2059: syntax error : '>' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(78) : error C2039: 'uint8' : is not a member of 'CPU' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(78) : error C2039: 'uint8' : is not a member of 'CPU' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(78) : error C2059: syntax error : '>' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(80) : error C2039: 'uint8' : is not a member of 'CPU' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(80) : error C2039: 'uint8' : is not a member of 'CPU' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(80) : error C2059: syntax error : '>' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(82) : error C2039: 'uint8' : is not a member of 'CPU' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(82) : error C2039: 'uint8' : is not a member of 'CPU' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(82) : error C2059: syntax error : '>' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(84) : error C2039: 'uint16' : is not a member of 'CPU' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(84) : error C2039: 'uint16' : is not a member of 'CPU' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(84) : error C2059: syntax error : '>' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(86) : error C2039: 'uint8' : is not a member of 'CPU' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(86) : error C2039: 'uint8' : is not a member of 'CPU' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(86) : error C2059: syntax error : '>' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(88) : error C2039: 'uint8' : is not a member of 'CPU' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(88) : error C2039: 'uint8' : is not a member of 'CPU' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(88) : error C2059: syntax error : '>' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(90) : error C2039: 'uint8' : is not a member of 'CPU' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(90) : error C2039: 'uint8' : is not a member of 'CPU' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(90) : error C2059: syntax error : '>' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(92) : error C2039: 'uint8' : is not a member of 'CPU' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(92) : error C2039: 'uint8' : is not a member of 'CPU' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(92) : error C2059: syntax error : '>' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(94) : error C2039: 'uint8' : is not a member of 'CPU' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(94) : error C2039: 'uint8' : is not a member of 'CPU' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(94) : error C2059: syntax error : '>' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(96) : error C2039: 'uint16' : is not a member of 'CPU' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(96) : error C2039: 'uint16' : is not a member of 'CPU' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(96) : error C2059: syntax error : '>' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(98) : error C2143: syntax error : missing ';' before '}' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(99) : error C2143: syntax error : missing ';' before '}' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(113) : error C2143: syntax error : missing ';' before '{' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(115) : error C2143: syntax error : missing ';' before '}' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(122) : error C2143: syntax error : missing ';' before '{' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(124) : error C2143: syntax error : missing ';' before '}' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(133) : error C2143: syntax error : missing ';' before '{' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(135) : error C2143: syntax error : missing ';' before '}' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(142) : error C2143: syntax error : missing ';' before '{' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(144) : error C2143: syntax error : missing ';' before '}' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(147) : error C2143: syntax error : missing ';' before '{' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(157) : error C2065: 'T' : undeclared identifier d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(160) : error C2143: syntax error : missing ';' before '{' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(163) : error C2065: 'Bitmasks' : undeclared identifier d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(163) : error C2065: 'Mask' : undeclared identifier d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(163) : error C2065: 'ValidBits' : undeclared identifier d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(163) : error C2955: 'UT::AccumulateBitmask::AccumulateBitmask' : use of class template requires template argument list d:\ucii_dart\adu\code\ut_accumulatebitmask.h(70) : see declaration of 'UT::AccumulateBitmask::AccumulateBitmask' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(163) : error C2039: 'value' : is not a member of 'UT::AccumulateBitmask::AccumulateBitmask' d:\ucii_dart\adu\code\ut_accumulatebitmask.h(70) : see declaration of 'UT::AccumulateBitmask::AccumulateBitmask' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(165) : error C2143: syntax error : missing ';' before '}' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(166) : error C2143: syntax error : missing ';' before '}' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(171) : error C2143: syntax error : missing ';' before '{' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(174) : error C2039: 'uint16' : is not a member of 'CPU' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(184) : error C2143: syntax error : missing ';' before '}' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(191) : error C2143: syntax error : missing ';' before '{' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(192) : error C2039: 'uint16' : is not a member of 'CPU' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(192) : error C2653: 'PortE' : is not a class or namespace name d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(192) : error C2065: 'Masks' : undeclared identifier d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(193) : error C2947: expecting '>' to terminate template-argument-list, found '>' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(193) : error C2039: 'PEPAR' : is not a member of 'CPU::`anonymous-namespace'::Register' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(194) : error C2143: syntax error : missing ';' before '}' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(201) : error C2143: syntax error : missing ';' before '{' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(202) : error C2039: 'uint16' : is not a member of 'CPU' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(202) : error C2653: 'PortE' : is not a class or namespace name d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(203) : error C2947: expecting '>' to terminate template-argument-list, found '>' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(203) : error C2039: 'PEPAR' : is not a member of 'CPU::`anonymous-namespace'::Register' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(204) : error C2143: syntax error : missing ';' before '}' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(211) : error C2143: syntax error : missing ';' before '{' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(212) : error C2039: 'uint16' : is not a member of 'CPU' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(212) : error C2653: 'PortE' : is not a class or namespace name d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(213) : error C2947: expecting '>' to terminate template-argument-list, found '>' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(213) : error C2039: 'PEPAR' : is not a member of 'CPU::`anonymous-namespace'::Register' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(214) : error C2143: syntax error : missing ';' before '}' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(223) : error C2143: syntax error : missing ';' before '{' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(230) : error C2143: syntax error : missing ';' before '{' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(238) : error C2143: syntax error : missing ';' before '{' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(245) : error C2143: syntax error : missing ';' before '{' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(252) : error C2143: syntax error : missing ';' before '{' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(258) : error C2143: syntax error : missing ';' before '{' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(266) : error C2143: syntax error : missing ';' before '{' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(273) : error C2143: syntax error : missing ';' before '{' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(280) : error C2143: syntax error : missing ';' before '{' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(287) : error C2143: syntax error : missing ';' before '{' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(293) : error C2143: syntax error : missing ';' before '{' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(300) : error C2143: syntax error : missing ';' before '{' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(306) : error C2143: syntax error : missing ';' before '{' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(311) : error C2143: syntax error : missing ';' before '{' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(314) : error C2039: 'uint8' : is not a member of 'CPU' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(322) : error C2923: 'boost::mpl::vector_c' : 'CPU::`anonymous-namespace'::Register::uint8' is not a valid template type argument for parameter 'T' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(74) : see declaration of 'CPU::`anonymous-namespace'::Register::uint8' d:\ucii_dart\adu\code\pal\cpu\cpu_pinfunctionsimplementation.h(322) : fatal error C1003: error count exceeds 100; stopping compilation Build log was saved at "file://d:\Users\307004223\My Documents\Visual Studio 2005\Projects\UCII_DART_new\UCII_DART_new\Debug\BuildLog.htm" UCII_DART_new - 109 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== -----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Christopher Woods Sent: Monday, June 04, 2007 8:10 PM To: boost-users@lists.boost.org Subject: Re: [Boost-users] Compilation errors when using boost libraries Varadarajan, Satiamoorthy (GE Infra, Transportation) wrote:
Hi,
this is my first time to use Boost -librairies.
I have created a Project folder where in my complete Software architeture is available.
I have placed boost libraries downloaded from boost.org site within INCLUDE dir of VC 2005 Install directory.
However I received many compilation errors. Can anyone help me to resolve these errors. Am I doing the right thing to get the CPP Software to compile.
Satia, 1) Don't put the Boost libraries and headers IN the INCLUDE dir of VC. Install them to a separate location and then add the appropriate paths to the INCLUDE/LIBRARY/SOURCE/etc locations within Tools->Options->Projects->VC++ Directories. 2) You didn't say whether you downloaded the source code or the pre-built binary installer. While a large portion of Boost is in fact header-only, there are several libraries that do require you to build them. If you downloaded the binaries then this has already been built for you but if you pulled down the source then you need to check out the "Getting Started Guide" included in the archive (zip/tar). 3) Try a small program scratch program that only brings in part of the Boost functionality that you'll be working with to see if you are still getting errors. HTH, -Chris _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of Varadarajan, Satiamoorthy (GE Infra,Transportation) Sent: Tuesday, June 05, 2007 10:24 AM To: boost-users@lists.boost.org Subject: Re: [Boost-users] Compilation errors when using boost libraries- Second
I was successful in compiling the example.cpp and also tested the example application by entering values in the into the resulting window.
So, I believe that I am successful in installing the boost libraries.
[Nat] I'm inclined to agree.
However when I compile my project files using these boost library. I had to face with compilation errors.
COMPILATION ERRORS ARE HERE:
------ Build started: Project: UCII_DART_new, Configuration: Debug Win32 ------ Compiling... CPU_MCF5282Init.cpp d:\ucii_dart\adu\code\pal\cpu\cpu_mcf52xxinterruptcontroller.h(55) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int d:\ucii_dart\adu\code\pal\cpu\cpu_mcf52xxinterruptcontroller.h(55) : error C2143: syntax error : missing ';' before '&'
[Nat] ? Do any of these errors have anything to do with Boost?
Varadarajan, Satiamoorthy (GE Infra, Transportation) wrote:
3) In Configuration Properties > C/C++ > Precompiled Headers, changed Use Precompiled Header (/Yu) to Not Using Precompiled Headers.3
You shouldn't have needed to do this just because of Boost - but it doesn't matter either way.
Please help me to know if these errors are due to A) Improper installation of Boost libraries. Or B) Necessary Binary Library are not installed. Or C) Problem not in boost-library but in the Software I use ( FYI the software I use here has been developed in different Compiler named Green hills using boost-library 1.33.1 by Different Team and Iam evolving a way to test these Software using VC2005).
[...]
d:\ucii_dart\adu\code\pal\cpu\cpu_mcf52xxinterruptcontroller.h(55) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int d:\ucii_dart\adu\code\pal\cpu\cpu_mcf52xxinterruptcontroller.h(55) : error C2143: syntax error : missing ';' before '&' d:\ucii_dart\adu\code\pal\cpu\cpu_mcf52xxinterruptcontroller.h(55) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
[...] At this point I think you are on your own. More than likely if you look at the lines in which the errors are coming from you'll find that you are missing some includes defining types that have nothing to do with Boost itself. If it's something of Boost, try implementing it in a simple small stand alone example - which then if you can't resolve you can at least post with some hope of getting additional help. Sorry I couldn't help you further, -Chris
Hi Chris Thanks for ur reply. I found that problem with the software I tried to compile. I corrected the Error successfully and now found that all the CPP files are compiling independently (using compile i.e. Ctrl+ F7) with boost library. However When I say "Build Solution (F7)" I receive the following Errors. CPU_MCF52xxInit.obj : error LNK2019: unresolved external symbol _CPU_MCF52xxInitInterrupts referenced in function "void __cdecl CPU::MCF52xx::initInterrupts(void)" (?initInterrupts@MCF52xx@CPU@@YAXXZ) CPU_MCF52xxInterruptController.obj : error LNK2019: unresolved external symbol _CPU_closeInterruptGate referenced in function "int __cdecl CPU::closeInterruptGate(void)" (?closeInterruptGate@CPU@@YAHXZ) CPU_MCF52xxInterruptController.obj : error LNK2019: unresolved external symbol _CPU_setInterruptGate referenced in function "bool __cdecl CPU::setInterruptGate(int)" (?setInterruptGate@CPU@@YA_NH@Z) D:\Users\307004223\My Documents\Visual Studio 2005\Projects\UCII_DART_new\Debug\UCII_DART_new.exe : fatal error LNK1120: 3 unresolved externals Build log was saved at "file://d:\Users\307004223\My Documents\Visual Studio 2005\Projects\UCII_DART_new\UCII_DART_new\Debug\BuildLog.htm" UCII_DART_new - 4 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== Please help me to resolve these above errors. I believe there could be problem with the linker. Regards Satia -----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Christopher Woods Sent: Tuesday, June 05, 2007 9:19 PM To: boost-users@lists.boost.org Subject: Re: [Boost-users] Compilation errors when using boost libraries-Second Varadarajan, Satiamoorthy (GE Infra, Transportation) wrote:
3) In Configuration Properties > C/C++ > Precompiled Headers, changed Use Precompiled Header (/Yu) to Not Using Precompiled Headers.3
You shouldn't have needed to do this just because of Boost - but it doesn't matter either way.
Please help me to know if these errors are due to A) Improper installation of Boost libraries. Or B) Necessary Binary Library are not installed. Or C) Problem not in boost-library but in the Software I use ( FYI the software I use here has been developed in different Compiler named Green hills using boost-library 1.33.1 by Different Team and Iam evolving a way to test these Software using VC2005).
[...]
d:\ucii_dart\adu\code\pal\cpu\cpu_mcf52xxinterruptcontroller.h(55) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int d:\ucii_dart\adu\code\pal\cpu\cpu_mcf52xxinterruptcontroller.h(55) : error C2143: syntax error : missing ';' before '&' d:\ucii_dart\adu\code\pal\cpu\cpu_mcf52xxinterruptcontroller.h(55) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
[...] At this point I think you are on your own. More than likely if you look at the lines in which the errors are coming from you'll find that you are missing some includes defining types that have nothing to do with Boost itself. If it's something of Boost, try implementing it in a simple small stand alone example - which then if you can't resolve you can at least post with some hope of getting additional help. Sorry I couldn't help you further, -Chris _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
These linker errors have nothing to do with the Boost libraries. You
have to tell VC++ the name of the file that contains these functions.
You do this somewhere in the linker settings part of the project.
On 6/6/07, Varadarajan, Satiamoorthy (GE Infra, Transportation)
Hi Chris
Thanks for ur reply. I found that problem with the software I tried to compile. I corrected the Error successfully and now found that all the CPP files are compiling independently (using compile i.e. Ctrl+ F7) with boost library. However When I say "Build Solution (F7)" I receive the following Errors.
CPU_MCF52xxInit.obj : error LNK2019: unresolved external symbol _CPU_MCF52xxInitInterrupts referenced in function "void __cdecl CPU::MCF52xx::initInterrupts(void)" (?initInterrupts@MCF52xx@CPU@@YAXXZ) CPU_MCF52xxInterruptController.obj : error LNK2019: unresolved external symbol _CPU_closeInterruptGate referenced in function "int __cdecl CPU::closeInterruptGate(void)" (?closeInterruptGate@CPU@@YAHXZ) CPU_MCF52xxInterruptController.obj : error LNK2019: unresolved external symbol _CPU_setInterruptGate referenced in function "bool __cdecl CPU::setInterruptGate(int)" (?setInterruptGate@CPU@@YA_NH@Z) D:\Users\307004223\My Documents\Visual Studio 2005\Projects\UCII_DART_new\Debug\UCII_DART_new.exe : fatal error LNK1120: 3 unresolved externals Build log was saved at "file://d:\Users\307004223\My Documents\Visual Studio 2005\Projects\UCII_DART_new\UCII_DART_new\Debug\BuildLog.htm" UCII_DART_new - 4 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Please help me to resolve these above errors. I believe there could be problem with the linker.
Regards Satia
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Christopher Woods Sent: Tuesday, June 05, 2007 9:19 PM To: boost-users@lists.boost.org Subject: Re: [Boost-users] Compilation errors when using boost libraries-Second
Varadarajan, Satiamoorthy (GE Infra, Transportation) wrote:
3) In Configuration Properties > C/C++ > Precompiled Headers, changed Use Precompiled Header (/Yu) to Not Using Precompiled Headers.3
You shouldn't have needed to do this just because of Boost - but it doesn't matter either way.
Please help me to know if these errors are due to A) Improper installation of Boost libraries. Or B) Necessary Binary Library are not installed. Or C) Problem not in boost-library but in the Software I use ( FYI the software I use here has been developed in different Compiler named Green hills using boost-library 1.33.1 by Different Team and Iam evolving a way to test these Software using VC2005).
[...]
d:\ucii_dart\adu\code\pal\cpu\cpu_mcf52xxinterruptcontroller.h(55) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int d:\ucii_dart\adu\code\pal\cpu\cpu_mcf52xxinterruptcontroller.h(55) : error C2143: syntax error : missing ';' before '&' d:\ucii_dart\adu\code\pal\cpu\cpu_mcf52xxinterruptcontroller.h(55) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
[...]
At this point I think you are on your own. More than likely if you look at the lines in which the errors are coming from you'll find that you are missing some includes defining types that have nothing to do with Boost itself. If it's something of Boost, try implementing it in a simple small stand alone example - which then if you can't resolve you can at least post with some hope of getting additional help.
Sorry I couldn't help you further,
-Chris
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- sashan http://sashang.orcon.net.nz/
on Tue Jun 05 2007, "Varadarajan, Satiamoorthy (GE Infra, Transportation)"
Hi Chris
As suggested by you in point 2) in ur previous response, I have followed instructions given in "Getting Started Guide" to download the boost libraries. However I was unsucessful to use the installer(boost_1_33_1_setup.exe)provided by Boost Consulting website.
You might try again; we have released a new installer for version 1.34.0. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com
participants (5)
-
Christopher Woods
-
David Abrahams
-
Nat Goodspeed
-
Sashan Govender
-
Varadarajan, Satiamoorthy (GE Infra, Transportation)