Sign in to follow this  
ScopeDynamo

[.net] Tao Framework 'The sdl module was not found exception'

Recommended Posts

Hi, I got the dlls referenced ok, and build a test app that just initializes the sdl engine, but at runtime it throws an exception, referencing the sdl init function, telling me the module tao.sdl.dll could not be found. I've copied it to the same dir as my exe and the system32 folder but neither works, it still fails telling me the the dll could not be found. Any ideas why? I'm using Microsoft's VC2005 C# beta 2 if that makes any difference. Is there a default folder I need to install these to? I just copied them to my project folder and referenced them. Project source is
using System;
using System.Collections.Generic;
using System.Text;
using Tao.Sdl;
using Tao.OpenGl;
using Tao.DevIl;

namespace Vivid2D
{
    public class Engine
    {
        public IntPtr vidPtr;
        public Engine()
        {
        }
        public Engine(int width, int height, int depth)
        {
            OpenScreen(width, height, depth, false);
        }

        ~Engine()
        {

        }
        /// <summary>
        /// Opens a new window or full screen display
        /// and returns true on success.
        /// </summary>
        /// <param name="width">Width of the display</param>
        /// <param name="height">Height of the display</param>
        /// <param name="depth">Depth in bits of the display</param>
        /// <param name="fullscreen">True to open a full screen, false for a windowed display.</param>
        /// <returns>True on success, false if failed.</returns>
        public bool OpenScreen(int width, int height, int depth,bool fullscreen)
        {
            int flags;
            if (fullscreen == true)
            {
                flags = (Sdl.SDL_HWSURFACE | Sdl.SDL_DOUBLEBUF | Sdl.SDL_ANYFORMAT | Sdl.SDL_FULLSCREEN);
            }
            else
            {
                flags = (Sdl.SDL_HWSURFACE | Sdl.SDL_DOUBLEBUF | Sdl.SDL_ANYFORMAT);
            }
            int init = Sdl.SDL_Init(Sdl.SDL_INIT_EVERYTHING);
          
            return true;
        }
    }
}

and the example source that uses the above dll
using System;
using System.Collections.Generic;
using System.Text;
using Vivid2D;
using Tao.Sdl;

namespace Vivid2D_Example1
{
    class Program
    {
        
        static void Main(string[] args)
        {

            Engine meng = new Engine();
            meng.OpenScreen(640, 480, 16, true);
         
        }
    }
}

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this