Twinklebear / LPCGame

Working on a C++ tile based 'engine' using SDL
MIT License
18 stars 1 forks source link

Which version of SDL_Image are you using? #4

Closed btstevens89 closed 11 years ago

btstevens89 commented 11 years ago

Which version of SDL_image.h are you using?

I currently am using version 1.2, which doesn't have IMG_LoadTexture, so I can't build the project.

Version I'm using. http://www.libsdl.org/projects/SDL_image/

window.cpp error (line 106) tex = IMG_LoadTexture(mRenderer.get(), file.c_str()); 'IMG_LoadTexture': identifier not found

Twinklebear commented 11 years ago

Ah you need the SDL2.0 library and SDL2.0 versions of the extension libraries to use the SDL_Textures, unfortunately since SDL2.0 isn't yet released you need to compile the extension libraries yourself after downloading the source from their mercurial, http://www.libsdl.org/hg.php and follow the instructions for SDL2.0.

You can get the main SDL2.0 library pre-compiled, but the extensions you have to do yourself

As a side note, at the time I compiled the libs (a month or two back i should probably update) i was unable to compile the SDL_mixer 2.0 library due to some compiler errors, let me know if it works for you

I'll mark this closed if this works for you

btstevens89 commented 11 years ago

Great. I have SDL2 compiled now.

SDL_mixer built fine for me once I added the struct for SDL_Overlay to mpegfilter.h.

typedef struct{
    Uint32 format;
    int w, h;
    int planes;
    Uint16 *pitches;
    Uint8 **pixels;
    Uint32 hw_overlay:1;
} SDL_Overlay;

Compiled with Visual Studio 2012.

Last issue though. I've compiled luabind (0.9.1) over Lua (5.1) with boost's bjam. While Visual Studio is generating code, compiling LPCGame breaks on entity.obj.

Error 11 error LNK2001: unresolved external symbol "private: static unsigned int const luabind::detail::class_id_map::local_id_base" (?local_id_base@class_id_map@detail@luabind@@0IB) LPCGame\LPCGame\entity.obj LPCGame

luabind compiled to luabindd.dll and luabindd.lib. LPGGame requred the files be named luabind-d.dll and luabind-d.lib so I renamed my files but I'm still having errors.

Any help appreciated, I'd love to help with this project.

Twinklebear commented 11 years ago

Oh fantastic! I'll have to compile SDL_mixer now heh

Hmm yes, luabind was a pain to get working correctly. What I finally ended up doing was making a VS project, dumping all the code in there and linking it up against Boost and compiling it. I am also linking against static versions of the luabind libraries, although I'm not sure if that would really cause the problem.

Perhaps give it a try compiling the static library in VS and let me know.

In addition the library is named luabind-d.lib because it's the debug version, the release version would be called luabind.lib. Perhaps that could be the cause? I compiled both debug and release static libraries from VS.

I'm not sure about this error, I had a bunch of other issues with some pre-compiled version I found and couldn't get bjam running on windows so i compiled it from VS heh.

If you're interested in the project that's awesome! I'll have to get a properly organized todo list together heh.

Hopefully this works, then we could go over where the project is (still very young) and future plans for it

Twinklebear commented 11 years ago

It sounds like you've got it compiling, so I'll close this issue