Original date:2019-06-01 22:09:02 Edited by: Icy_Viking Subject: Re: Bad Routine Number

Ok, I figured out it was a 32-bit DLL I'm using, so that is correct. However, not I'm not getting the -1 error anymore. However nothing shows up when the basic program is executed. I ran it from the command line as well and no errors are coming up.

atom sdl2 
ifdef WIN32 then 
  sdl2 = open_dll("SDL2.dll") 
 elsifdef LINUX or FREEBSD then 
  sdl2 = open_dll("") 
end ifdef 
if sdl2 < 1 then --this has been changed from -1 
	puts(1,"Failed to load SDL2.dll!\n") 
end if 
--EuSDL2 Basic Window Example 
include std/machine.e 
include EuSDL2.ew 
include flags.e 
atom width = 640, height = 480 
--Init SDL2 
if SDL_Init(SDL_INIT_EVERYTHING) < 1 then 
	puts(1,"Could not init SDL2!\n") 
end if 
--Window creation 
atom win = SDL_CreateWindow("Basic Window - Will close after 3 Seconds",SDL_WINDOWPOS_CENTERED,SDL_WINDOWPOS_CENTERED,width,height,SDL_WINDOW_SHOWN) 
if win < 1 then 
	puts(1,"Failed to create window!\n") 
end if 
SDL_Delay(3000) -- make the window appear for three seconds 
Not Categorized, Please Help


Quick Links

User menu

Not signed in.

Misc Menu