SDL problem, Visual studio 2015

  • sander998
    13th Nov 2015 Member 0 Permalink

    Hello everyone!

     

    This is my first time playing with the code from powder toy

    I followed this tutorial: https://powdertoy.co.uk/Wiki/W/Compiling_tpt%2B%2B_with_Visual_studio.html

    I use Visual Studio 2015

    After I build the project I get this error:
    Error LNK2019 unresolved external symbol __imp____iob_func referenced in function _ShowError powdertoy C:\Documents\The-Powder-Toy-master\SDLmain.lib(SDL_win32_main.obj) 1

     

    I tried a lot of things I found on other forums like:

    -replacing all main() with main(int argc, char **argv)

    -changing the linker subsysten from "windows" to "Console

    But is still gives me the same error. Do you guys have any idea how to fix this?

  • Emperor_Bowserinator
    13th Nov 2015 Member 0 Permalink

    I'm assuming you used the pre-made project. Jacob1 forgot to add a lot of files (Like CMRC.cpp, Elements.h and stuff) and you also need to run generator.py first. It's probably the first one.

  • jacob1
    13th Nov 2015 Developer 0 Permalink
    I found some errors about this online, maybe you'll have to build SDL in Visual Studio 2015.

    You could also try putting this somewhere like Config.h: http://stackoverflow.com/a/32449318