Product : Engine, Version : 5.1.1.1042, ArticleID : 41024292

HowTo : I receive errors when I try to build a VC++ 2003 project in VS2005

Article41024292
TypeHowTo
ProductEngine
Version5.1.1.1042
Date Added9/4/2006
Submitted byBruce Jacobs
Keywords

Subject

I receive errors when I try to build a VC++ 2003 project in VS2005

Summary

I receive errors when I try to build a VC++ 2003 project (like your samples) in VS2005.

When I compile I get the following errors (and many more besides). Can you advise me on how to eliminate these errors?
 Form1.cpp 
 c:\program files\vectordraw\components\5-1-1\1039\samples\professional\visual studio .net\c++\add3dentities\Form1.h(12) : error C2653: 'Interop' : is not a class or namespace name 
 c:\program files\vectordraw\components\5-1-1\1039\samples\professional\visual studio .net\c++\add3dentities\Form1.h(308) : error C2653: 'AxInterop' : is not a class or namespace name 
 c:\program files\vectordraw\components\5-1-1\1039\samples\professional\visual studio .net\c++\add3dentities\Form1.h(308) : error C2061: syntax error : identifier '_DVdrawEvents_TimerEvent' 
....
 c:\program files\vectordraw\components\5-1-1\1039\samples\professional\visual studio .net\c++\add3dentities\Form1.h(78) : error C3867: 'Add3dEntities::Form1::button1_Click': function call missing argument list; use '&Add3dEntities::Form1::button1_Click' to create a pointer to member 
 c:\program files\vectordraw\components\5-1-1\1039\samples\professional\visual studio .net\c++\add3dentities\Form1.h(78) : error C3350: 'System::EventHandler' : a delegate constructor expects 2 argument(s) 

Solution

In order to migrate the C++ VS2003 Project to the VS2005 then follow these steps :
  1. Open the Project in VS2005
  2. In the Solution Explorer right click the "Add3DEntities" and click on the "References..."
  3. Delete the "Interop.VDProLib5.5.x" reference (Remove Reference button)
  4. Click the "Add New Reference..." button. Click on the "Browse" Tab and go to "C:\Program Files\VectorDraw\Components\5-1-1\10xx\Ansi\vdsn\vdsn" folder (or similar folder). Select "AxVDProLib5.dll" for Professional (similar : AxVDStdLib5.dll for Standard and AxVDViewLib5.dll  for Viewer) and press the OK button.
  5. Click again the "Add New Reference..." button. Click on the "Browse" Tab and go to "C:\Program Files\VectorDraw\Components\5-1-1\10xx\Ansi\vdsn\vdsn" folder. Select "VDProLib5.dll" for Professional (similar : VDStdLib5.dll for Standard and VDViewLib5.dll  for Viewer) and press the OK button.
  6. Search and replace in the whole project the strings : Interop::VDProLib5 with VDProLib5 and AxInterop::AxVDProLib5 with AxVDProLib5
  7. Open the forms (design mode) in the project where the VectorDraw component is placed and "refresh it" (like doing a double click)
  8. Check this article http://www.vdraw.com/Export/41023835.htm and do the replace that it is stated there is you receive a "Thread error".
  9. Clean the Project and rebuild it.