Results 1 to 8 of 8

Thread: [Resolved] SDL and VC++

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2002
    Location
    Newfoundland
    Posts
    71

    [Resolved] SDL and VC++

    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?



    Thanks in advance!
    Last edited by ALundrigan; Feb 6th, 2003 at 09:29 PM.
    - Adam Lundrigan

  2. #2
    Frenzied Member Technocrat's Avatar
    Join Date
    Jan 2000
    Location
    I live in the 1s and 0s of everyones data streams
    Posts
    1,024
    Did you make your project a console app?
    MSVS 6, .NET & .NET 2003 Pro
    I HATE MSDN with .NET & .NET 2003!!!

    Check out my sites:
    http://www.filthyhands.com
    http://www.techno-coding.com


  3. #3

    Thread Starter
    Lively Member
    Join Date
    Sep 2002
    Location
    Newfoundland
    Posts
    71
    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.
    - Adam Lundrigan

  4. #4
    Frenzied Member Technocrat's Avatar
    Join Date
    Jan 2000
    Location
    I live in the 1s and 0s of everyones data streams
    Posts
    1,024
    Hmm looks like you should make a console app, and add:
    #include <stdlib.h>

    Try that
    MSVS 6, .NET & .NET 2003 Pro
    I HATE MSDN with .NET & .NET 2003!!!

    Check out my sites:
    http://www.filthyhands.com
    http://www.techno-coding.com


  5. #5
    Frenzied Member Technocrat's Avatar
    Join Date
    Jan 2000
    Location
    I live in the 1s and 0s of everyones data streams
    Posts
    1,024
    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:

    PHP Code:
    #pragma comment (lib, "SDL.lib")
    #pragma comment (lib, "SDLmain.lib")

    #include <stdlib.h> 
    #include "SDL.h"

    int mainint argccharargv[] )
    {
      
    // Body of the program goes here.
      
    return 0;

    And it compiles and a window pops up
    MSVS 6, .NET & .NET 2003 Pro
    I HATE MSDN with .NET & .NET 2003!!!

    Check out my sites:
    http://www.filthyhands.com
    http://www.techno-coding.com


  6. #6

    Thread Starter
    Lively Member
    Join Date
    Sep 2002
    Location
    Newfoundland
    Posts
    71
    Thanks. I'll try that
    - Adam Lundrigan

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Sep 2002
    Location
    Newfoundland
    Posts
    71
    It worked! Thanks a million!
    - Adam Lundrigan

  8. #8
    Frenzied Member Technocrat's Avatar
    Join Date
    Jan 2000
    Location
    I live in the 1s and 0s of everyones data streams
    Posts
    1,024
    Glad to help
    MSVS 6, .NET & .NET 2003 Pro
    I HATE MSDN with .NET & .NET 2003!!!

    Check out my sites:
    http://www.filthyhands.com
    http://www.techno-coding.com


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width