CAD System Web Site
i NET1000.COM
by Makoto Honda
Last Update: 2010-January-22                         Update Info     Site Index     Licensing    Copyright Notice    Contact Us  


System Architecture

 DLL Hierarchy
 Element Classes
 FM Programming
 Temp Elements
 Current Plane


DLL Hierarchy


1.  Bring up VC++

File - New - Project tab
Choose MFC AppWizard [DLL] - OK
Project name:
Element (this becomes the DLL name)
Location: your folder to create the project under
MFC AppWizard - Select: MFC extension DLL (using shared MFC DLL) - Finish - OK

2.  After Project is created, add xxx.h & xxx.cpp to this project as follows.

Copy xxx.h & xxx.cpp to this project folder
VC++ File View tab - Add these files to the folder (R-click Source & Header)

3.  Now edit xxx.h

Add class AFX_EXT_CLASS to all classes in the header that are to be exposed.
#ifdef GUID ... xxx.h ... #endif

4.  In StdAfx.h, add #include "..\A_include\Resource.h"

5.  If dependent on any other DLLs, VC++ Project - Add To Project - Files

Files of type: LIBRARY FILES (Lib)
Navigate and select YYY.lib (easiest to go to A_lib folder and select all libs needed)
The result should appear in File View tab

6.  If OpenGL dependent, add the following in StdAfx.h

#include <gl\gl.h>
#include <gl\glu.h>
#incldue <gl\glaux.h>  ... not needed (if included, an error occurs in VS2008)

7.  VC++ Project - Settings - LINK tab

Object/Library modules:
Key in:
opengl32.lib glu32.lib  (lib names delimited by a space)

8.  Now, VC++ Build

7.  When the build is done successfully, do the following:

Copy all include files (xxx.h) to the A_Include folder.
From the debug folder of this project, copy xxx.lib to the A_Lib folder.
From the debug folder of this project, copy xxx.dll to the G\debug folder.


CAD System Web Site - Computer Aided Design Software:  Copyright 2010-2013 Makoto Honda. All Rights Reserved.  

Copyright 2010-2013 Makoto Honda. All Rights Reserved.