Compilation with Visual Studio C++ 2010 PropertyHelper error

May 22, 2011 at 11:24 PM

Hi,

I followed the instructions in compiling the latest release,  I used boost 1.42, my dir struct is:

C:\temp\pstsdk_0_3_0

C:\temp\pstsdk_0_3_0\boost

C:\temp\pstsdk_0_3_0\Debug

C:\temp\pstsdk_0_3_0\pstsdk

C:\temp\pstsdk_0_3_0\pstsdk.definition

C:\temp\pstsdk_0_3_0\pstsdk.mcpp

C:\temp\pstsdk_0_3_0\pstsdk.net

C:\temp\pstsdk_0_3_0\samples

And im am starting with pstsdk.net.sln in visual studio c++ 2010

I am getting all this error in property file header Property.h:

1>C:/temp/pstsdk_0_3_0/pstsdk/ndb/node.h(112): warning C4800: 'std::_Bool_type' : forcing value to bool 'true' or 'false' (performance warning)

1>C:\temp\pstsdk_0_3_0\pstsdk.mcpp\util\PropertyHelper.h(288): error C2065: 'PropId' : undeclared identifier

1>C:\temp\pstsdk_0_3_0\pstsdk.mcpp\util\PropertyHelper.h(288): error C2955: 'System::Collections::Generic::List' : use of class generic requires generic argument list

1> c:\program files (x86)\reference assemblies\microsoft\framework\.netframework\v4.0\mscorlib.dll : see declaration of 'System::Collections::Generic::List'

1>C:\temp\pstsdk_0_3_0\pstsdk.mcpp\util\PropertyHelper.h(289): error C2146: syntax error : missing ';' before identifier 'GetPropertyType'

1>C:\temp\pstsdk_0_3_0\pstsdk.mcpp\util\PropertyHelper.h(289): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

1>C:\temp\pstsdk_0_3_0\pstsdk.mcpp\util\PropertyHelper.h(289): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

1>C:\temp\pstsdk_0_3_0\pstsdk.mcpp\util\PropertyHelper.h(289): error C2061: syntax error : identifier 'PropId'

1>C:\temp\pstsdk_0_3_0\pstsdk.mcpp\util\PropertyHelper.h(289): error C4693: 'pstsdk::mcpp::util::prop::PropertyHelper': a sealed abstract class cannot have any instance members 'GetPropertyType'

1>C:\temp\pstsdk_0_3_0\pstsdk.mcpp\util\PropertyHelper.h(289): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

1>C:\temp\pstsdk_0_3_0\pstsdk.mcpp\util\PropertyHelper.h(289): warning C4183: 'GetPropertyType': missing return type; assumed to be a member function returning 'int'

1>C:\temp\pstsdk_0_3_0\pstsdk.mcpp\util\PropertyHelper.h(290): error C2061: syntax error : identifier 'PropId'

1>C:\temp\pstsdk_0_3_0\pstsdk.mcpp\util\PropertyHelper.h(291): error C2061: syntax error : identifier 'PropId'

1>C:\temp\pstsdk_0_3_0\pstsdk.mcpp\util\PropertyHelper.h(292): error C2061: syntax error : identifier 'PropId'

1>C:\temp\pstsdk_0_3_0\pstsdk.mcpp\util\PropertyHelper.h(296): error C2065: 'PropId' : undeclared identifier

1>C:\temp\pstsdk_0_3_0\pstsdk.mcpp\util\PropertyHelper.h(296): error C2955: 'System::Collections::Generic::List' : use of class generic requires generic argument list

1> c:\program files (x86)\reference assemblies\microsoft\framework\.netframework\v4.0\mscorlib.dll : see declaration of 'System::Collections::Generic::List'

1>C:\temp\pstsdk_0_3_0\pstsdk.mcpp\util\PropertyHelper.h(297): error C2146: syntax error : missing ';' before identifier 'GetPropertyType'

1>C:\temp\pstsdk_0_3_0\pstsdk.mcpp\util\PropertyHelper.h(297): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

1>C:\temp\pstsdk_0_3_0\pstsdk.mcpp\util\PropertyHelper.h(297): error C2086: 'int pstsdk::mcpp::util::prop::PropertyHelper::PropertyType' : redefinition

1> C:\temp\pstsdk_0_3_0\pstsdk.mcpp\util\PropertyHelper.h(289) : see declaration of 'pstsdk::mcpp::util::prop::PropertyHelper::PropertyType'

1>C:\temp\pstsdk_0_3_0\pstsdk.mcpp\util\PropertyHelper.h(297): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

1>C:\temp\pstsdk_0_3_0\pstsdk.mcpp\util\PropertyHelper.h(297): error C2061: syntax error : identifier 'PropId'

1>C:\temp\pstsdk_0_3_0\pstsdk.mcpp\util\PropertyHelper.h(297): error C4693: 'pstsdk::mcpp::util::prop::PropertyHelper': a sealed abstract class cannot have any instance members 'GetPropertyType'

1>C:\temp\pstsdk_0_3_0\pstsdk.mcpp\util\PropertyHelper.h(297): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

1>C:\temp\pstsdk_0_3_0\pstsdk.mcpp\util\PropertyHelper.h(297): warning C4183: 'GetPropertyType': missing return type; assumed to be a member function returning 'int'

1>C:\temp\pstsdk_0_3_0\pstsdk.mcpp\util\PropertyHelper.h(298): error C2061: syntax error : identifier 'PropId'

1>C:\temp\pstsdk_0_3_0\pstsdk.mcpp\util\PropertyHelper.h(299): error C2061: syntax error : identifier 'PropId'

1>C:\temp\pstsdk_0_3_0\pstsdk.mcpp\util\PropertyHelper.h(300): error C2061: syntax error : identifier 'PropId'

1>

1>Build FAILED.

1>

1>Time Elapsed 00:00:25.45

What am i doing wrong?

Thanks for help.

 

 

Developer
May 22, 2011 at 11:35 PM

Hi emulator64,

 

It looks like your directory structure may be incorrect.  Pstsdk.net expects the following dependencies in the same top level directory:

 

.\boost_1_42_0 (http://www.boost.org/users/history/version_1_42_0.html)
--> .\boost
--> .\doc
--> .\libs
--> ...etc 

.\pstsdk (http://pstsdk.codeplex.com)
--> .\BuildProcessTemplates
--> .\fairport 

.\pstsdknet
--> .\branch
--> .\tag
--> .\trunk 

 

Let me know if that fixes it.

 

Thanks,

Christopher

May 23, 2011 at 10:39 PM
Edited May 23, 2011 at 10:45 PM

Sorry, Christhopher. When i try to build the project pstsdk.mcpp i got the errors anyway, followed the structure has you mentioned and problem still the same:

1>------ Rebuild All started: Project: pstsdk.mcpp, Configuration: Debug Win32 ------

1>Build started 23-05-2011 23:43:43.

1>_PrepareForClean:

1> Deleting file "Debug\pstsdk.mcpp.lastbuildstate".

1>InitializeBuildStatus:

1> Touching "Debug\pstsdk.mcpp.unsuccessfulbuild".

1>GenerateTargetFrameworkMonikerAttribute:

1>Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.

1>ClCompile:

1> Stdafx.cpp

1>C:\Users\Pedro\Desktop\GOOD\pstsdk\fairport\trunk\pstsdk/ndb/node.h(112): warning C4800: 'std::_Bool_type' : forcing value to bool 'true' or 'false' (performance warning)

1>c:\users\pedro\desktop\good\pstsdknet\trunk\pstsdk.mcpp\util\PropertyHelper.h(11): error C3083: 'definition': the symbol to the left of a '::' must be a type

1>c:\users\pedro\desktop\good\pstsdknet\trunk\pstsdk.mcpp\util\PropertyHelper.h(11): error C3083: 'util': the symbol to the left of a '::' must be a type

1>c:\users\pedro\desktop\good\pstsdknet\trunk\pstsdk.mcpp\util\PropertyHelper.h(11): error C2039: 'primitives' : is not a member of 'pstsdk'

1> C:\Users\Pedro\Desktop\GOOD\pstsdk\fairport\trunk\pstsdk/pst/pst.h(31) : see declaration of 'pstsdk'

1>c:\users\pedro\desktop\good\pstsdknet\trunk\pstsdk.mcpp\util\PropertyHelper.h(11): error C2871: 'primitives' : a namespace with this name does not exist

1>c:\users\pedro\desktop\good\pstsdknet\trunk\pstsdk.mcpp\util\PropertyHelper.h(288): error C2065: 'PropId' : undeclared identifier

1>c:\users\pedro\desktop\good\pstsdknet\trunk\pstsdk.mcpp\util\PropertyHelper.h(288): error C2955: 'System::Collections::Generic::List' : use of class generic requires generic argument list

1> c:\program files (x86)\reference assemblies\microsoft\framework\.netframework\v4.0\mscorlib.dll : see declaration of 'System::Collections::Generic::List'

1>c:\users\pedro\desktop\good\pstsdknet\trunk\pstsdk.mcpp\util\PropertyHelper.h(289): error C2146: syntax error : missing ';' before identifier 'GetPropertyType'

1>c:\users\pedro\desktop\good\pstsdknet\trunk\pstsdk.mcpp\util\PropertyHelper.h(289): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

1>c:\users\pedro\desktop\good\pstsdknet\trunk\pstsdk.mcpp\util\PropertyHelper.h(289): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

1>c:\users\pedro\desktop\good\pstsdknet\trunk\pstsdk.mcpp\util\PropertyHelper.h(289): error C2061: syntax error : identifier 'PropId'

1>c:\users\pedro\desktop\good\pstsdknet\trunk\pstsdk.mcpp\util\PropertyHelper.h(289): error C4693: 'pstsdk::mcpp::util::prop::PropertyHelper': a sealed abstract class cannot have any instance members 'GetPropertyType'

1>c:\users\pedro\desktop\good\pstsdknet\trunk\pstsdk.mcpp\util\PropertyHelper.h(289): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

1>c:\users\pedro\desktop\good\pstsdknet\trunk\pstsdk.mcpp\util\PropertyHelper.h(289): warning C4183: 'GetPropertyType': missing return type; assumed to be a member function returning 'int'

1>c:\users\pedro\desktop\good\pstsdknet\trunk\pstsdk.mcpp\util\PropertyHelper.h(290): error C2061: syntax error : identifier 'PropId'

1>c:\users\pedro\desktop\good\pstsdknet\trunk\pstsdk.mcpp\util\PropertyHelper.h(291): error C2061: syntax error : identifier 'PropId'

1>c:\users\pedro\desktop\good\pstsdknet\trunk\pstsdk.mcpp\util\PropertyHelper.h(292): error C2061: syntax error : identifier 'PropId'

1>c:\users\pedro\desktop\good\pstsdknet\trunk\pstsdk.mcpp\util\PropertyHelper.h(296): error C2065: 'PropId' : undeclared identifier

1>c:\users\pedro\desktop\good\pstsdknet\trunk\pstsdk.mcpp\util\PropertyHelper.h(296): error C2955: 'System::Collections::Generic::List' : use of class generic requires generic argument list

1> c:\program files (x86)\reference assemblies\microsoft\framework\.netframework\v4.0\mscorlib.dll : see declaration of 'System::Collections::Generic::List'

1>c:\users\pedro\desktop\good\pstsdknet\trunk\pstsdk.mcpp\util\PropertyHelper.h(297): error C2146: syntax error : missing ';' before identifier 'GetPropertyType'

1>c:\users\pedro\desktop\good\pstsdknet\trunk\pstsdk.mcpp\util\PropertyHelper.h(297): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

1>c:\users\pedro\desktop\good\pstsdknet\trunk\pstsdk.mcpp\util\PropertyHelper.h(297): error C2086: 'int pstsdk::mcpp::util::prop::PropertyHelper::PropertyType' : redefinition

1> c:\users\pedro\desktop\good\pstsdknet\trunk\pstsdk.mcpp\util\PropertyHelper.h(289) : see declaration of 'pstsdk::mcpp::util::prop::PropertyHelper::PropertyType'

1>c:\users\pedro\desktop\good\pstsdknet\trunk\pstsdk.mcpp\util\PropertyHelper.h(297): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

1>c:\users\pedro\desktop\good\pstsdknet\trunk\pstsdk.mcpp\util\PropertyHelper.h(297): error C2061: syntax error : identifier 'PropId'

1>c:\users\pedro\desktop\good\pstsdknet\trunk\pstsdk.mcpp\util\PropertyHelper.h(297): error C4693: 'pstsdk::mcpp::util::prop::PropertyHelper': a sealed abstract class cannot have any instance members 'GetPropertyType'

1>c:\users\pedro\desktop\good\pstsdknet\trunk\pstsdk.mcpp\util\PropertyHelper.h(297): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

1>c:\users\pedro\desktop\good\pstsdknet\trunk\pstsdk.mcpp\util\PropertyHelper.h(297): warning C4183: 'GetPropertyType': missing return type; assumed to be a member function returning 'int'

1>c:\users\pedro\desktop\good\pstsdknet\trunk\pstsdk.mcpp\util\PropertyHelper.h(298): error C2061: syntax error : identifier 'PropId'

1>c:\users\pedro\desktop\good\pstsdknet\trunk\pstsdk.mcpp\util\PropertyHelper.h(299): error C2061: syntax error : identifier 'PropId'

1>c:\users\pedro\desktop\good\pstsdknet\trunk\pstsdk.mcpp\util\PropertyHelper.h(300): error C2061: syntax error : identifier 'PropId'

1>

1>Build FAILED.

1>

1>Time Elapsed 00:00:15.81

========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

 

 

Developer
May 23, 2011 at 11:02 PM

From the errors, it looks like it's having a hard time finding items from the pstsdk.definition project.  If you right-click on the pstsdk.mcpp project and go to properties.  Under Common Properties -> Framework and References, make sure you ahve a reference to the pstsdk.definition project.  If it's not there, add it.

Since PropId is under that project, it just seems that the mcpp project is having difficulty resolving the reference.

Are you using VS2008 or VS2010?  VS2010 has to convert C++/CLI projects to .net 4, and references like this can be lost if the other projects aren't also converted to .net4.

Hopefully that takes care of it.

May 24, 2011 at 12:15 AM

Niiiiiiiiiice,  that solved the problem. I just needed to reference to the pstsdk.definition project, like you said.

Thank you very much for your help.

May 24, 2011 at 11:52 PM

I am now having problems in compiling the pstsdk itself, i can generate the visual studio 2010 solution and get the structure like:

ALL_BUILD

INSTALL

pstsdk_test

RUN_TESTS

ZERO_CHECK

But when the built is done, it doesnt generate any pstsdk.dll. I dont see it anywhere. I also get a dir win32\debug\ALL_BUILD Thats the only dll i cant compile and it is referenced in pstsdk.net. Could you help me?

thanks

Jul 4, 2012 at 8:09 AM

Hi,

 

Am a new bee to this code plex and PSTSDK. And has no hands on C++. I have downloaded BOOST, PSTSDK and PSTSDKNET. Placed all of them similar to the path recommended in this blog.

 

Opened solution in VS2010. It has asked me for migration of the solution clicked on Next and then Finish buttons to complete migration.

 

Cleaned the solution and then i was trying to build only pstsdk.mcpp. This project shows me an error that

Error    5    error C1083: Cannot open include file: 'pst.h': No such file or directory    d:\pst sdk\pstsdknet\trunk\pstsdk.mcpp\util\PropertyHelper.h    4    1    pstsdk.mcpp.

 

When checked there are no related files such as pst.h and pst.cpp. I checked in "pstsdknet-d451b452c2d4.zip" file as well but there are no such files. But it's siblings Stdafx.h, Stdafx.cpp, toolkit.h and toolkit.cpp were present.

 

Since the header pst.h was included in PropertyHelper.h project was not getting compiled.

 

Have tried to comment "# include pst.h" statement and compile. This has resulted more number of compilation errors.

 

Please help me out.

 

Thanks in advance.

Sandeep Yarramilli.

Developer
Jul 4, 2012 at 7:15 PM

Can you post the directory structure you're using?  It will look for the pst.h (part of the pstsdk, NOT pstsdk.net) file in a specific directory, so you need to make sure that you have the folder layout correct.  It's a header only library, so there are no cpp files.  If it can't find it, it's likely in the wrong place.   The directory structure should look something like:

 C:\<base directory>\pstsdknet <- this is the where the code from this project goes.
 C:\<base directory>\pstsdk <- fairpoint folder is inside this one
 C:\<base directory>\boost_1_42_0\