Would you mind elaborating a bit on that, CookiesGaming? I am a complete noob to powder toy development and to the C++ language, just downloaded and installed VB C++ 2010 yesterday. I do have some experience with other programming languages, mainly the Arduino language.
I was trying to create a new element with the coding tutorial on the powder toy wiki. Before I tried to make my own element, I compiled the unmodified source code and it sucessfully compiled. I ran the newly compiled .exe file and it ran like a charm.
After doing this, I followed all of the instructions in the coding tutorial to the letter, but I am getting the following error when I try to compile the solution:
LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/OPT:ICF' specification
ElementClasses.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall Element_HETR::~Element_HETR(void)" (??1Element_HETR@@UAE@XZ) referenced in function "class std::vector<class Element,class std::allocator<class Element> > __cdecl GetElements(void)" (?GetElements@@YA?AV?$vector@VElement@@V?$allocator@VElement@@@std@@@std@@XZ)
ElementClasses.obj : error LNK2019: unresolved external symbol "public: __thiscall Element_HETR::Element_HETR(void)" (??0Element_HETR@@QAE@XZ) referenced in function "class std::vector<class Element,class std::allocator<class Element> > __cdecl GetElements(void)" (?GetElements@@YA?AV?$vector@VElement@@V?$allocator@VElement@@@std@@@std@@XZ)
C:\Documents and Settings\Eddie\Desktop\TPT Modding stuff\The-Powder-Toy-master\Build\Argentum's Mod.exe : fatal error LNK1120: 2 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I have no idea what this means or what is going wrong. The new element file I used was the one that was linked to in the tutorial (the HETR one). I did not modify the file: I just dragged and dropped it into the src\simulation\elements folder.
Is there a step I missed or did wrong? Again I am a complete n00b and if someone could provide some idiot-proof help, it would really be appreciated!
Hmm, maybe there's an error in the code you wrote?
I dont think so. I didnt change anything about the HETR file.
Okay Im trying it and will report back
They are exactly the same file.
thanks for the link nucular
There was something I noticed but forgot to post here. Even after I removed the HETR file from the elements folder, I still got the same error, even after I closed the solution and opened it again.
I deleted my solution and started over with the unmodified source code from github. I followed the visual studio compiling instructions and I sucessfully got a fully functional copy of the powder toy.
Im hoping that adding the HETR element wont do anything wierd to it.
Update: Here is the exact procedure in which I did things.
LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/OPT:ICF' specification
ElementClasses.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall Element_HETR::~Element_HETR(void)" (??1Element_HETR@@UAE@XZ) referenced in function "class std::vector<class Element,class std::allocator<class Element> > __cdecl GetElements(void)" (?GetElements@@YA?AV?$vector@VElement@@V?$allocator@VElement@@@std@@@std@@XZ)
ElementClasses.obj : error LNK2019: unresolved external symbol "public: __thiscall Element_HETR::Element_HETR(void)" (??0Element_HETR@@QAE@XZ) referenced in function "class std::vector<class Element,class std::allocator<class Element> > __cdecl GetElements(void)" (?GetElements@@YA?AV?$vector@VElement@@V?$allocator@VElement@@@std@@@std@@XZ)
C:\Documents and Settings\Eddie\My Documents\Visual Studio 2010\Projects\The Powder Toy\Copy of The-Powder-Toy-master\Build\the powder toy master.exe : fatal error LNK1120: 2 unresolved externals
I just don't get what is going on!
when you say running it by hand, do you mean double clicking it?
Thats what I did when I added the HETR c++ file to the solution files.
Anyway I followed your instructions and the build worked again! I think it must be the HETR file. I will check it for typos and report it
Here is a pastebin for the code of the HETR element file. In the meantime, I am going to try to create a new element from scratch and see if I get the same error.