I am using MinGW on Windows 7.
Simply put, I want to create a Hello World SDL program (initiate a window or something simple) and compile it so that I have a separate program that I can distribute without, say, users who need to install something additional (for example by putting SDL.dll in the Windows folder).
- I downloaded the SDL development library, which is currently sitting in
c:\SDL . - In my project folder, I have
test.cpp and SDL.dll
I'm not too sure what to do next; At first I thought that I could enable SDL, and then just a link to the DLL on the command line and voila, but maybe I think I need to compile the SDL development library with my program first? My only goal is for my SDL program to be completed in a folder that I can distribute to other Windows platforms without requiring them to install anything extra - or did they definitely need to install SDL.dll in the Windows folder?
EDIT: Further clarification - can someone describe the steps that I will take to do this? I mean, what would the developer want to distribute his application? Does most game installers install .dll files in the Windows folder, if such applications are installed?
Source (test.cpp):
#include <SDL/SDL.h> #include <iostream> using namespace std; int main () { cout << "Hello World!"; return 0; }
Folder:
test.cpp SDL.dll
Command line:
g++ test.cpp -lSDL
Output:
test.cpp:2:17: fatal error: SDL.h: No such file or directory compilation terminated
source share