PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

How to use (configure) GapiDraw 1.02 on VC++ 6

I looked at GapiDraw for VC 6.0 - HELP but that didn't help me.

Since i'm a newbee I'll show you what I did using VC++ 6.0:

  • 'File, New...'

  • selected 'MFC apps wizard (exe)'

  • created a new 'source' directory in the Gapi directory. Project was named 'test'

  • in the first wizard screen unchecked 'choose document/view' and selected 'Finished'

  • deleted 'test.*', 'mainfrm.*', 'childfrm.*' and 'childview.*' from the project

  • deleted 'test.*', 'mainfrm.*', 'childfrm.*' and 'childview.*' from the 'test' directory

  • in 'Project, Setting...' on the 'resources' tab added '../../GapiDraw;../../GDHelloGapiXP'

  • on the 'link' tab added '../../GapiDrawXP/Release/GD102.dll'

  • on the 'file view' selected the 'Add Files to Project...' and then added the 'GapiDraw/GapiDraw.h' file

  • on the 'file view' selected the 'Add Files to Project...' and then added all the files from 'GDHelloGapiXP'
If I try to compile this it says (of course) that there are two 'stdafx' both wanting to create an object file. After deleting the standard 'StdAfx.cpp' and 'StdAfx.h' and recompiling I get a:

Code:
Compiling...
stdafx.cpp
c:\program files\microsoft visual studio\vc98\mfc\include\afxv_w32.h(119) : warning C4005: '_WIN32_WINDOWS' : macro redefinition
c:\windows ce tools\gapi\gdhellogapixp\stdafx.h(22) : see previous definition of '_WIN32_WINDOWS'
Linking...
../../GapiDrawXP/Release/GD102.dll : fatal error LNK1136: invalid or corrupt file
Error executing link.exe.

test1.exe - 1 error(s), 1 warning(s)

Now, what am I doing wrong? Who can help me getting GapiDraw 1.02 to work on my VC6++ on a Windows 2000 platform
First, edit the stdafx.h to remove the definition of _WIN32_WINDOWS. You also might want to update your Platform SDK, as that may be the source of this warning.

Next, instead of linking to gd102.dll, link to gd102.lib. The old post had a typo.

-Ionitor
Yep, that compiled corectly. Thanks