LNK Errors?

  • cat
    2nd Jul 2016 Member 0 Permalink

    pastebin: http://pastebin.com/DU1X156G

    Says something about .obj files but I can't find any? I have no idea. I just used the already precompiled source available and apparently it has to give me errors.

  • boxmein
    2nd Jul 2016 Former Staff 1 Permalink
    @cat (View Post)
    LNK (or linker) errors mean that the program that puts all the compiled C++ files together can't find some function names that a C++ file depends on. In this case, the Favorite.cpp file defines a few favorites menu functions and some other code in the UI tries to call them but then can't find them anywhere - Favorite.cpp isn't compiled with the rest of the code.

    Make sure to add Favorite.cpp to your project via the right click -> Add -> Existing File option.
  • cat
    2nd Jul 2016 Member 0 Permalink

    @boxmein (View Post)

     Thanks!

     

    I still seem to be getting these errors though:

     

    LNK4217 locally defined symbol _fprintf imported in function _ShowError The-Powder-Toy++ C:\Users\Richie\Documents\Visual Studio 2015\Projects\TCT\SDLmain.lib(SDL_win32_main.obj) 1 Build


    LNK1120 1 unresolved externals The-Powder-Toy++ C:\Users\Richie\Documents\Visual Studio 2015\Projects\TCT\Build\Powder.exe 1 Build


    LNK2019 unresolved external symbol __imp____iob_func referenced in function _ShowError The-Powder-Toy++ C:\Users\Richie\Documents\Visual Studio 2015\Projects\TCT\SDLmain.lib(SDL_win32_main.obj) 1 Build

     

    A

  • jacob2
    5th Jul 2016 Member 0 Permalink
    @cat (View Post)
    For unknown reasons, SDL 1.2 stopped working with visual studio 2015. You'll either have to compile SDL yourself in vs 2015, or use VS 2013.

    Or use mingw, but only --static works in the latest versions of that ...
  • cat
    7th Jul 2016 Member 0 Permalink

    @jacob2 (View Post)

     Thanks! I just installed VS 2013 instead, made my life a lot easier.