Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting DJGPP C++ code to VC++

Status
Not open for further replies.

CubeE101

Programmer
Nov 19, 2002
1,492
US
What all do you need to do (if it is possible) to make djgpp programs run with VC++...

is it a simple matter of setting up the project right?
Or is it more complicated than that?

it looks like standard C++ to me, but I don't use VC++ very often... Mostly VB

I made a blank console 32 app...
added the files to the project... then tried to compile it...

When I try to compile it I get a handful of errors... Like:

error C2143: syntax error : missing ';' before '['
unsigned char *plasma1 = new (unsigned char)[256000];

error C2632: 'long' followed by 'long' is illegal
long long startTime = timer->getCount(), frameCount = 0, currentTime;

error C2065: 'uclock' : undeclared identifier
startTime = uclock();
...which is supposed to be here...
#include <time.h> // has the uclock() we need
...is this a djgpp specific function?

fatal error C1083: Cannot open include file: 'dpmi.h': No such file or directory
#include <dpmi.h>
...is this a djgpp specific file?

The reason I want to use VC++ is because I can't get DJGPP programs to run on windows XP, if anyone can tell me how I can make them run, I would appreciate it.

Thnx - Josh

Have Fun, Be Young... Code BASIC
-Josh Stribling
cubee101.gif

 
>>unsigned char *plasma1 = new (unsigned char)[256000];

Should be:
unsigned char *plasma1 = new unsigned char[256000];


>> long long startTime = timer->getCount(), frameCount = 0, currentTime;

I don't know how many bytes a 'long long' is in the other editor, but if it's 8; replace it with _int64 in VC++.


>>#include <time.h> // has the uclock() we need

Maybe it does in the other editor and doesn't in VC++ system include files.


>>#include <dpmi.h>

If VC++ can't find it... then it's probably only present as a system include file with the other editor.




Greetings,
Rick
 
That is what I was afraid of...

I &quot;think&quot; DJGPP has the source code available somewhere...

I guess I will try to recompile the libraries VC++ and try to go from there... (if I can find the source)

If anyone has another solution, please let me know...

Thnx
-Josh

Have Fun, Be Young... Code BASIC
-Josh Stribling
cubee101.gif

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top