Missing std:: in Visual studio solution.

  • Jack-Punter
    13th May 2018 Member 0 Permalink

    SOLVED:
    So I just followed the steps here:
    https://powdertoy.co.uk/Wiki/W/Compiling_tpt%2B%2B_with_Visual_studio.html
    to get the source code into Visual studio so that I could contribute to the development of The Powder Toy.

    I was going to start by removing some of the C arrays from:
    https://github.com/ThePowderToy/The-Powder-Toy/issues/570
    and for some reason, working in the data/shaders.h file

    when i do #include <string> i dont get any errors. But for some reason when i do std:: intellisense only pops up with std::nullptr_t and for some reason doesn't find anything else inside the std namespace.

    Am i doing something wrong or just being stupid.

     

    FIX:
    Ok fixed the issue. for some reason in Configuration Properties > C/C++ > Language, there was nothing set for C++ Language Standard... Set that to ISO C++ Latest draft and it found the STL agian :)

    Edited once by Jack-Punter. Last: 13th May 2018
  • jacob1
    13th May 2018 Developer 0 Permalink
    I'm not really sure, intellisense can be really buggy sometimes. You may want to google it, probably you would have to delete some files and have it regenerate the intellisense database.

    Also, we want to use the new String class, not std::string, because String supports unicode and that's more difficult in an std::string

    Edit: oh you already fixed it, great
    Edited once by jacob1. Last: 13th May 2018
  • Jack-Punter
    13th May 2018 Member 0 Permalink

    I'll take a look when I get stuff to work. had a PC crash which corrupted the files :| so I tried reinstalling and had loads of issues so now I'm following the "compiling for windows with scons" guide. and I got to the end. it compiles but when I try to run I get this error:

    "

    The procedure entry point
    _ZNKSt7__cxx1112basic_stringlcSt11char_traitslcESalcEE13find_

    first_ofERKS4_i could not be located in the dynamic link library
    D:\Programming\C++\ThePowderToy\build\Poweder.exe

    "


    Ill make this a new post

    Edited 2 times by Jack-Punter. Last: 13th May 2018
  • jacob1
    13th May 2018 Developer 0 Permalink
    @Jack-Punter (View Post)
    It would be nicer to just keep using this post

    Also why are you using scons now? You just said visual studio works. Is that error you posted for visual studio, or for scons?