Archived

This topic is now archived and is closed to further replies.

This topic is 5239 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am working on a project that uses OpenGL and I want to port it to Linux using SDL, however without including windows.h all the typedefs, #defines and functions I use (like QueryPerformanceCounter and LONGLONG) are unavailable. What can I do? Should I #define and typedef what I need and use other alternative for the APIs? "C lets you shoot yourself in the foot rather easily. C++ allows you to reuse the bullet!"

Share this post


Link to post
Share on other sites
SDL has its own types that you can use so that it will compile on any system. You''re better off changing to those instead of writing your own defines. That way, you could still compile it on Windows without much source changing.

Share this post


Link to post
Share on other sites