View previous topic :: View next topic |
Author |
Message |
lemon
Joined: 11 Nov 2005 Posts: 4
|
Posted: Fri Nov 11, 2005 3:51 pm Post subject: SDL in Windows when I'm used to Linux. |
|
|
I've used SDL in Linux with C++ before, but I don't even know where to begin with Windows and d.
My main problem with programming in windows is that I just don't know where anything is supposed to go. In linux, the installers put everything where it needs to be, but here all I have are .zip files that I am supposed to extract myself.
I notice that dmd does not want to work unless I put it in C:\dmd\. I managed to add that directory to the path so d works just fine.
But when it comes to a library, I don't know where to put things, where to put things in relation to my project's files, and what these obj and dll and lib files are.
I got the SDL files from DedicateD, but where do I put these? Am I supposed to include all of these files in my project? Or do I put them somewhere and put the path in some environment variable?
If I could find a small d program that uses SDL, then that would help me a lot. |
|
Back to top |
|
|
h3r3tic
Joined: 30 Mar 2004 Posts: 261 Location: Torun, Poland
|
Posted: Mon Nov 14, 2005 2:05 am Post subject: |
|
|
First of all, I'd suggest using Derelict for SDL (and other libs). I've followed that way and I live happily in Linux and Windows. Grab Derelict from SVN at dsource. The docs are here:
http://svn.dsource.org/projects/derelict/trunk/docs/index.html
The only thing you'll need from the Windows SDL zip file is the SDL.dll file (and possibly other DLL's like SDLttf). You can put them to any directory and set the PATH accordingly, but when you drop'em to windows/system32/ you won't need to alter any environment settings. You might also put the .dll to your application's directory instead, but then only it could use it.
From what I tried, DMD works in other directories, not only C:/ . You just have to set the PATH accordingly (I don't recall if I had to edit any configuration files). if (you're new to Windows && you're using WinXP) {
right click on 'my computer'
select 'properties'
go to the 'advanced tab'
click 'environment variables'
you'll have the PATH field somewhere. Add your dmd path to the list (it's separated by semicolons on Windows systems)
}
When you download Derelict and compile it (you must have the Build utility), you put the .lib files to your dmd/lib directory so that the linker can find them. In the application you're creating you add sth like:
pragma(lib, "derelictSDL");
and possibly
pragma(lib, "derelictUtil");
so that the .lib files are linked with your project.
/+
I hope I got everything right. I don't have a Windows machine here with me.
+/
--
Tom |
|
Back to top |
|
|
lemon
Joined: 11 Nov 2005 Posts: 4
|
Posted: Mon Nov 14, 2005 9:48 am Post subject: |
|
|
Thank you for the reply. I was avoiding Derelict because it looked like another layer of complexity, but perhaps that isn't the case.
You also inadvertently answered another question I had; what are people using for build management in Windows? I'll check out Build as well. |
|
Back to top |
|
|
lovewithyou8808
Joined: 12 Aug 2011 Posts: 2
|
|
Back to top |
|
|
|
|
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
|
Powered by phpBB © 2001, 2005 phpBB Group
|