SDL Forum Index
SDL
Simple DirectMedia Layer Forums
Reply to topic
How can i use SDL 2 with windows.h?
theatron


Joined: 03 Feb 2014
Posts: 15
Reply with quote
I heard that it was possible to do so with openGL, but SDL is able to do the same as openGL and it can do basic input by itself, and i know SDL so i didn't want to backtrack learning a library that does the same thing. But recently ive been pulling my hair out trying to get OIS(Object Oriented Input System) to work with my SDL 2 project. I've recently googled how to build OIS with CMake so i can link the .dll files to codeblocks, like i did with Box2D, it didnt work. I also tried importing the .cpp files and .h files from the folder in the OIS win32 folder labeled SDL, directly into my src and header folders in my project that didnt work either. Then i caught wind of a library built into windows called windows.h and I've read a tutorial on someone using it with openGL, but what about SDL? If ANYONE has a tutorial on this or know hows to work either windows.h or OIS with SDL 2, please post it.

Thanks Very Happy
View user's profileSend private message
GameCodingNinja


Joined: 29 Aug 2014
Posts: 32
Reply with quote
I am really confused after reading this post.

Assuming I understand you correctly, windows.h is a header file for the Windows API. You just include the header if you are building a Windows app. Normally you would do something like the below.

Code:

#if defined(_WINDOWS)
#define STRICT
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif
View user's profileSend private message
How can i use SDL 2 with windows.h?
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic