Advertisement

CXD 3.1 + Visual Studio 2005/2008/2010 compability issues

Started by December 22, 2011 09:33 AM
-1 comments, last by Nali 12 years, 11 months ago
Greetings all!

Having issues with compiling old game projects I wrote with C++/DX 7.0/CDX 3.1 library (www.cdxlib.com, not active anymore).

I have setup dev environment with DirectX 7 SDK and CDX 3.1 and have tested with VS 2005 Professional, VS 2008 Professional, VS 2010 Express but it generates the same errors:


1>c:\tools\cdx\include\cdxsurface.h(252): error C2248: 'CDXScreen::SetSurfaceScreen' : cannot access protected member declared in class 'CDXScreen'
1> c:\tools\cdx\include\cdxscreen.h(144) : see declaration of 'CDXScreen::SetSurfaceScreen'
1> c:\tools\cdx\include\cdxscreen.h(90) : see declaration of 'CDXScreen'
1>c:\tools\cdx\include\cdxsurface.h(253): error C2248: 'CDXScreen::SetSurfaceWidth' : cannot access protected member declared in class 'CDXScreen'
1> c:\tools\cdx\include\cdxscreen.h(146) : see declaration of 'CDXScreen::SetSurfaceWidth'
1> c:\tools\cdx\include\cdxscreen.h(90) : see declaration of 'CDXScreen'


Anyone who have ran into these errors and got a solution?
Edit: removing protected word in implementation seems like one way to get rid of this error. if it breaks game play or similar is yet to be tested, compiler is now complaining about VS 6.0 resource file which is invalid/didnt converted well.

My google skills brought me to a swedish gamedev site but there was no link to the so called "Fixed CDX Library" which should be usable in VS 2005.

Many thanks in advance.


Edit 2:
Finally, got it to compile, this is the steps I took when converting an old VS 6.0 project to be used in VS 2010 and compile:

* Open up project in Visual Studio and let Microsoft do the work of conversion

* Download CDX 3.1 (google) and install to e.g: C:\SDK\CDX3.1\

* Download Direct X SDK (I used 7.0) and install to e.g: C:\SDK\DX7\

* Locate project properties => Configuration Properties => VC++ Directories, and add these:
Include Directories: C:\SDK\CDX3.1\include;C:\SDK\DX7\include;
Library Directories: C:\SDK\CDX3.1\lib;C:\SDK\DX7\lib;
Source Directories: C:\SDK\CDX3.1\src;

* When compiling your game you will most likely run into the error described above, "cannot access protected member declared in class CDXScreen", to solve this edit the file cdxscreen.h and comment the line 140:
//protected:

* Then you might run into compile error about Libc.lib, to fix this (not sure if this is the best way but it solved it for me):
Rightclick on your project => Properties => Configuration Properties => Linker => Input. Add LIBC.LIB in the "ignore specific default libraries" list.

Lastly I ran into some issues with resource files but it was most likely due to I was compiling to Release and the files used was in Debug folder, copy paste files.


Hope this will be of help to anyone more out there trying to compile an old project or try out CDX 3.x in a Visual Studio newer then 6.0 ;) .. its a shame CDX havent been updated, it was such a great beginner lib back in the days. Kudos to Bil Simser.

This topic is closed to new replies.

Advertisement