Using Windows Functions in VCC The Windows header file windows.h can be included in white box c and
black box cpp as normal. This is made possible thanks to Andy merging
the Windows headers with VCCs, accomplished by simple copying all the
MSDN headers (i.e. Visual C++) to a Cadence directory. The next project should update the header files before beginning. This can be accomplished using Andy's method (a backup of the original VCC headers exist) or restoring the original headers and specifying the MSDN include directory in the 'includeDirs' parameter of the properties for each behaviour. The latter option is a little tedious but I'm unaware of any other way to add directories to the VCC compiler. The University has a Microsoft subscription and the MSDN CD's can be obtained from Archie Howitt at the time of writing. VCC allows for the use of static and dynamic libraries and (seems) to use a Microsoft based linker similar to one included with Visual C++ 6.0. Building a library in Visual C++ is a much more rewarding experience than attempting to use VCC's stripped down version so this feature was invaluable. Of course getting it to actually work is another matter!
The pipe communication base classes are common to both the Windows application and the VCC model. By compiling them into a static library, code was no longer required to be duplicated reducing potential source control problems. |
||||
![]() |
||||
How to use VC++ 6 Libraries in VCC For an easier life make sure that the compilation (in VC++ 6) of your
library has code optimisations set to default or debug. The differences
between VC++ 6 and VCC can cause weird and wonderful errors otherwise. ![]() All that's left is to include your .h file in your black box model and tell VCC where to look for the .lib file. To do this right click in your code window in VCC and set the parameters. Each parameter is a semicolon delimited list of values. These parameters need to be set for each model that requires the libraries so it pays to stay consistent. |
||||
|
||||
![]() |
![]() |