Error LNK2019 when creating element

  • biran4454
    25th Nov 2019 Member 0 Permalink

    I have just added a new element called TEST via. newelement.py. I followed all the instructions, tried to compile the program in VS, but get this error (there is alot of previous compile stuff, but I've omitted that. Also, I've omitted a section of a folder path because of privacy.

    Thanks!

  • LBPHacker
    25th Nov 2019 Developer 0 Permalink

    That means TEST.cpp isn't compiled, which is in turn caused by TEST.cpp not being in the project. newelement.py doesn't run vsproject.py (which generates the VS project, adding all .cpp files to it among other things) because the VS project isn't used on all platforms.

     

    In other words, the solution is to close VS, run vsproject.py, open VS and compile again. I'll check if this is mentioned in the wiki; if it's not, I'll fix it. EDIT: Just add TEST.cpp to the project yourself. I updated the wiki to suggest the same thing.

    Edited once by LBPHacker. Last: 25th Nov 2019
  • biran4454
    1st Dec 2019 Member 0 Permalink

    @LBPHacker (View Post)

     OK, thanks for your help!