Click to See Complete Forum and Search --> : [Resolved] SDL and VC++
ALundrigan
Feb 3rd, 2003, 03:44 PM
Hello.
I am having problems with SDL and VC++ 6.0
I followed the instructions for using SDL in VC6, but I still get unexplained errors. I can't see what i'm doing wrong, has anyone else got any ideas?
http://www.vpucentral.com/images/code.png
Thanks in advance!
Technocrat
Feb 4th, 2003, 10:25 AM
Did you make your project a console app?
ALundrigan
Feb 4th, 2003, 05:35 PM
No matter what I do I still get the same error. I've tried all the console and Win32 application types that are available in my VC6. The SDL VC++ page says that you should make your project a multithreaded DLL.
That gets rid of the errors, but the program doesn't execute then. No console window comes up and, from what I can gather, no code gets executed.
Technocrat
Feb 4th, 2003, 06:04 PM
Hmm looks like you should make a console app, and add:
#include <stdlib.h>
Try that
Technocrat
Feb 4th, 2003, 06:18 PM
Ok I got mine to compile by doing the following:
Copying all the includes and libs in to the include and lib directories under MSVC.
Created a new console win32 app
Copied the dll into my project folder
Changed the compile option to multi-threaded DLL
The used this code:
#pragma comment (lib, "SDL.lib")
#pragma comment (lib, "SDLmain.lib")
#include <stdlib.h>
#include "SDL.h"
int main( int argc, char* argv[] )
{
// Body of the program goes here.
return 0;
}
And it compiles and a window pops up
ALundrigan
Feb 5th, 2003, 10:27 AM
Thanks. I'll try that
ALundrigan
Feb 6th, 2003, 08:29 PM
It worked! Thanks a million!
Technocrat
Feb 7th, 2003, 12:31 AM
Glad to help
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.