Tag Archives: Program problem

Error lnk1120: 2 unresolved external commands: vtkrenderingopengl_ Autoinit (construct, destroy), which is referenced in

PCLS minimum bounding box calculation, using the https://blog.csdn.net/WillWinston/article/details/80196895 program.
In PCL1.8.0 + VS2013 + Win10 environment, debug error report:
(1) ERROR LNK1120: 2 external commands that cannot be resolved;
(2) ERROR LNK2019: Unable to parse the external symbol “VTKRENDERINGOPGL_AUTOINIT (CONSTRUCT)” at….. Is cited in;
(3) error LNK2019: Unable to resolve external symbol “vtkRenderingOpenGL_AutoInit(Destruct)” at….. Is referenced in.
Search the problem’s reason said: there is a header file, but can’t find the implementation (https://blog.csdn.net/ydc_ss/article/details/53227732) :
(1) contains only the header files, only the function of statement that does not contain the function implementation (implemented generally in the CPP file). So only through the compile, the connection is not successful.
(2) another reason is the function of the declarations and implementations in the header file, generally want to put the declarations in the header file, implementation in the CPP file. Each #include header file will have an implementation of the function. When connecting, the linker will not know which implementation to connect to and will report an error.
Therefore, I searched the file vtkrenderingOpenGL in the installed file and found that I was using vtkrenderingOpenGL2, so I could not find it. After modification, I reported an error to solve the problem.