Skip to main content
gamedev.net
🔒 Locked

VS2005 conversion problems

Started by Morpheus011 10 replies 2.1k views
Original Post
Morpheus011
Morpheus011
I recently upgraded to visual studio 2005 and ported my current project over from 2003. When I build, i'm getting an error in my glprocs.h because two functions don't explicitly declare a return type and apparently the new compiler complains about default int return types. I still have 2003 installed, and when I ported to 2005, I chose to make a backup of the solution, etc. However the only file that 2005 actually gives me as a 'backup' is a .old file. I have no way of actually using this .old file, and I was wondering if someone knew of a way to extract (not sure if that's the correct terminology) my old solution into 2003, using this .old file. If not, I'll probably just make a new solution and bring all my files over. I definitely don't want to go adding code to glprocs.h, so until I figure out why that's breaking the code, I rather stay with 2003. Any help is greatly appreciated, thanks!
kuphryn
kuphryn
revert via backup

what function declaration?

Kuphryn
Morpheus011
Morpheus011
could you possibly clarify that a little bit? I want to revert to my backup, the problem is, the only backup solution I have is a .old file which isn't a valid solution file. I was asking if there was a way to essentially turn this .old file into a more useful .sln file (thereby actually being able to _use_ the "backup" 2005 makes for me).

Thanks

EDIT: The functions it's giving me problems with are:

const (WINAPI *GetExtensionsStringEXT) (void);

and

const (WINAPI *GetExtensionsStringARB) (HDC hdc);
kuphryn
kuphryn
x.sln.old
x.suo.old
x.vcproj.7.10.old

where other two?

Kuphryn
ChaosEngine
ChaosEngine
why not just fix your code?
if you think programming is like sex, you probably haven't done much of either.-------------- - capn_midnight
gumpy
gumpy
Quote:
Original post by Morpheus011
could you possibly clarify that a little bit? I want to revert to my backup, the problem is, the only backup solution I have is a .old file which isn't a valid solution file. I was asking if there was a way to essentially turn this .old file into a more useful .sln file (thereby actually being able to _use_ the "backup" 2005 makes for me).

Thanks

EDIT: The functions it's giving me problems with are:

const (WINAPI *GetExtensionsStringEXT) (void);

and

const (WINAPI *GetExtensionsStringARB) (HDC hdc);

visual c++ 2005 doesn't support default int. try the following:
const int (WINAPI *GetExtensionsStringEXT) (void);const int (WINAPI *GetExtensionsStringARB) (HDC hdc);


edit: or whatever the proper types are. i need to pay more attention. [lol]
This space for rent.
Saruman
Saruman
Quote:
Original post by ChaosEngine
why not just fix your code?

I second that.. I'm not sure why you would want to keep a non-standard version instead of quickly fixing it. Especially after purchasing a copy of 2005 and than deciding to move back to 2003.. that would be such a waste :)
Evil Steve
Evil Steve
This is why you should always do something about warnings. You'll have been getting warnings about default int return types in VC 2003, and VC6 did it too.
gumpy
gumpy
Quote:
Original post by Evil Steve
This is why you should always do something about warnings. You'll have been getting warnings about default int return types in VC 2003, and VC6 did it too.


increasing the warning level to max is a good idea too. i believe it's set to 3 by default with a max of 4 in vc2k5. i've always used -Wall in gcc as well. sometimes you'll catch some extremely obscure bugs before they happen.
This space for rent.
Enigma
Enigma
Assuming those functions are the wgl ones then your code has been broken ever since you wrote those lines, even allowing for non-standard default int return types. The return type for both of those functions should be const char *. Fix it.

Σnigma
Morpheus011
Morpheus011
I do have warnings set to come up as errors in 2003. This has definitely never shown up, even as a warning before, I do always fix my warnings, no matter what.

The reason I didn't want to "fix" this code is because it's _not_ my code and I was worried about breaking other various projects I have been working on that use glprocs.

I appreciate all the replies, but no one has actually answered my original question yet, which was, is there a way to take the .old file vs2005 gives me and somehow use that to re-create a 2003 solution. If I'm simply out of luck that's cool, I can work around it (and I have since changed the glprocs, because it will be used in my future projects anyways), but if there is a way to do this, I would still like to know.

Thanks
GPUFan
GPUFan
Just delete the upgraded solution/project files and remove the .old extensions from your sln and vcproj files and reload with VS 2003 - these are clean backups of the originals. Deleting the suo files is ok.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.