ElementClasses.h Issue (new to TPT)

  • Nick17
    2nd Jan 2014 Member 0 Permalink

    Hi. I used to compile PT a long time ago through visual studio, but yeah, that was a long time ago. I'm currently using Visual Studio Express C++ 2010. I've gone through the steps on the wiki thoroughly and have redone everything twice after trying to build the solution and coming up with quite a number of errors. Sorry to be a bother, and theres probably a really simply solution to this, but I seem to be getting an error like this for each element:

     

    C:\Users\Nick 2\Documents\My Programs\Powder Toy\src\src\simulation/Elements.h(60): fatal error C1083: Cannot open include file: 'ElementClasses.h': No such file or directory
    1> ANAR.cpp

     

    I've actually search the whole source for the header file 'ElementClasses.h', but couldn't find it.

     

    I'd appreciate the help a heap. Thanks.

  • mniip
    2nd Jan 2014 Developer 0 Permalink
    run generator.py
  • Nick17
    2nd Jan 2014 Member 0 Permalink

    Yep, did just that. Here's the error list:

    http://pastebin.com/VDnKwqam

  • GreenFireDragon
    2nd Jan 2014 Member 0 Permalink

    which python version do you use?

    if you use 3.x.x it won't work, if you use 2.7.4 then I don't know the problem

  • jacob1
    2nd Jan 2014 Developer 0 Permalink
    i'm not sure what your specific problem is, but "fatal error C1083: Cannot open include file: 'vector': No such file or directory" means something is very wrong. That isn't even part of the tpt source, visual studio should just know where it is.

    Either you installed visual studio wrong, or more likely there's some error in the guide that i've never gotten before. I will probably upload my project file sometime so people don't have to deal with following all the many steps exactly, and using the old 2010 version.
  • Nick17
    2nd Jan 2014 Member 0 Permalink

    Well I realised that I had python 3.3.2, so I uninstalled that, downloaded and installed 2.7.4, but it's giving me the very same error list, so...yeah. Anyway, I'm not overly worried about it, but thanks for the help. I got it compiled once before... haha, when I was in year 7 with......VS C++ 2010 Pro, I think it was, so would anyone recommend that I'd switch over to use that or would that not make a difference?

  • Nick17
    4th Jan 2014 Member 0 Permalink

    Well...I've unistalled Visual Studio C++ 2010 Express and I've installed Visual Studio Professional 2010, and I have to say, it's a lot better! I've only come up with one error:

     

    1>required libraries\generated\ElementClasses.cpp(74): error C3861: 'Element_HFLM': identifier not found

     

    This prevents me from compiling. I've run generator.py but that doesn't do anything. Does that error mean that there's no data for the element HFLM? I've looked for the HFLM element file but couldn't find it. Ha, I'm not even sure if it's a file. Is that a source code problem, or something I need to do? 

    Edited 2 times by Nick17. Last: 5th Jan 2014
  • jacob1
    4th Jan 2014 Developer 0 Permalink
    @Nick17 (View Post)
    weird, because HFLM was renamed to CFLM internally a long time ago, are you using the latest, freshly downloaded source? If so, probably the generator isn't working correctly. I can upload the correct generated files later if needed. The generator thing is sort of unnecessary really ...
  • Nick17
    4th Jan 2014 Member 0 Permalink

    Well I redid everything and got a completely clean source of Version 89.0 and this is what came up:

     

    1>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/OPT:ICF' specification
    1>LINK : fatal error LNK1181: cannot open input file 'shell32.lib'

     

    This prevents me from compiling as well, so yeah, I don't know. I've searched for shell.lib, but yeah, nothing came up. Does this mean that shell32.lib is missing in 'required libraries' or...? I'd appreciate if anyone could help. Thanks

    Edited 3 times by Nick17. Last: 5th Jan 2014
  • Nick17
    5th Jan 2014 Member 0 Permalink

    I took 'shell32.lib' out of the 'additional dependencies' section in properties, just to see what it would do, and it just said the very same error for the next library on the list..... Again, if anyone could help, I'd greatly appreciate it.