I have a code based on PCL 1.6, using functions as OrganizedFastMesh and Poisson, and it works well. But When I add this code to use GreedyProjectionTriangulation function VS2010 return this error:
*Error 51 error LNK2001: unresolved external symbol "private: virtual void __cdecl pcl::GreedyProjectionTriangulation::performReconstruction(class std::vector > &)" (?performReconstruction#?$GreedyProjectionTriangulation#UPointXYZ#pcl###pcl##EEAAXAEAV?$vector#UVertices#pcl##V?$allocator#UVertices#pcl###std###std###Z) C:...\pcl_surface.obj*
Does it need an additional file.lib to include?
Which ones? Or what else?
Thank you!
A few days ago,the same error occurred in my code (with two similar errors).
I added the lib file /lib/pcl_features_debug.lib to the linker-->input, and it works.
VS2010(X64) debug mode
Related
I have a Microsoft Visual 2010 project that runs fine in the Win-32 compilation setting. I am running on Windows 10. I am trying to use the x64 to build for 64-bit but that is when I encounter the LNK errors (examples below):
error LNK2028: unresolved token (0A00015D) "extern "C" unsigned char __cdecl
UcanDeinitCan(unsigned char)" (?UcanDeinitCan##$$J0YAEE#Z) referenced in function
"public: unsigned int __cdecl CAN::DeConfigDev(void)" (?DeConfigDev#CAN##$$FQEAAIXZ)
CAN.obj
error LNK2019: unresolved external symbol "extern "C" unsigned char __cdecl
UcanDeinitCan(unsigned char)" (?UcanDeinitCan##$$J0YAEE#Z) referenced in function
"public: unsigned int __cdecl CAN::DeConfigDev(void)" (?DeConfigDev#CAN##$$FQEAAIXZ)
CAN.obj
error LNK2001: unresolved external symbol __imp___glewGenBuffers Patient_GPU.obj
I've attempted to change the /clr function, as well as the calling convention (_cdecl ...) in an attempt to follow other solutions related to the LNK errors but neither has worked. Is there a different way to fix these errors, or get a better idea of what they actually mean? Any help would be greatly appreciated. Thank you so much!
You're probably linking UCAN static library from somewhere. You need to make sure that in 64bit configuration, you link to 64bit .lib file.
First thing to check is Additional dependencies config and check what libraries are linked into the project.
I would like to integrate Lua into my current C++ application I build with VisualStudio 2015 (x64 mode).
I grabbed a simple Lua wrapper from here, and the Lua binaries for windows x64 from here (the lua-5.1.5_Win32_dll14_lib.zip one).
Next, I added the include and library path to the project preferences. Works so far in the IDE. However, when I try to compile the code it throws 24 errors (like these first two):
1>LuaScript.obj : error LNK2019: unresolved external symbol "lua_close" referenced in function ""public: __cdecl LuaScript::~LuaScript(void)" (??1LuaScript##QEAA#XZ)".
1>LuaScript.obj : error LNK2019: unresolved external symbol "lua_gettop" referenced in function ""public: void __cdecl LuaScript::clean(void)" (?clean#LuaScript##QEAAXXZ)".
which tells me next to nothing. Seems that the linker is unable to find the library but the includes are working and the path to library is set, too. Any suggestions what I might have missed or should look into? Any hint would be appreciated!
I'm new to protobuf. I did the tutorials proposed by Google and everything was fine. I'm now trying to make my own application working and I get an error that I don't understand.
Error 1 error LNK2019: unresolved external symbol __imp__close referenced in function "public: bool __thiscall google::protobuf::io::FileInputStream::CopyingFileInputStream::Close(void)" (?Close#CopyingFileInputStream#FileInputStream#io#protobuf#google##QAE_NXZ) D:\Projets\bin\pb_decoder\libprotobuf.lib(zero_copy_stream_impl.obj) pb_decoder_pck
Error 2 error LNK2019: unresolved external symbol __imp__read referenced in function "public: virtual int __thiscall google::protobuf::io::FileInputStream::CopyingFileInputStream::Read(void *,int)" (?Read#CopyingFileInputStream#FileInputStream#io#protobuf#google##UAEHPAXH#Z) D:\Projets\bin\pb_decoder\libprotobuf.lib(zero_copy_stream_impl.obj) pb_decoder_pck
Error 3 error LNK2019: unresolved external symbol __imp__write referenced in function "public: virtual bool __thiscall google::protobuf::io::FileOutputStream::CopyingFileOutputStream::Write(void const *,int)" (?Write#CopyingFileOutputStream#FileOutputStream#io#protobuf#google##UAE_NPBXH#Z) D:\Projets\bin\pb_decoder\libprotobuf.lib(zero_copy_stream_impl.obj) pb_decoder_pck
I didn't use protobuf in my code for now. The only thing I wrote is
#include "helloworld.pb.h"
and my helloword.proto looks like that :
syntax = "proto3";
message Hello {
int32 id = 1;
string name = 2;
}
Any idea about the problem here ?
unresolved symbols sounds like a missing like error to me but the libs are actually here.
I found a post on groups.google which was pointing out a problem quite similar to my own issue, but it didn't work for me.
Problem with linking runtime libraries on Windows for C++
Context
protobuf version 3.0
IDE : Visual Studio 2013
My application is a RTMAPS diagram (sofware quite similar to simulink), in case someone heard about this :)
Thanks guys for your help !
EDIT :answer is in the question :)
The link I gave in my question is actually the answer to my question. I just didn't correct the files correctly.
It is however strange that I'm the only one getting this error on the last version of protobuf (3.0).
Here is the link once again :
Problem with linking runtime libraries on Windows for C++
I hope it will be helpful to someone !
I changed a workspace developed in VC 6.0 to VS 2008. When I tried to build the workspace I am getting the following error message. How can I correct the problem?
fatal error LNK1104: cannot open file 'LIBC.lib'
I am getting the following messages when I ignored libc.lib
Error 1 error LNK2019: unresolved external symbol "__declspec(dllimport) class CIHoTSimEngine * __cdecl CreateHoTSimEngine(void)" (__imp_?CreateHoTSimEngine##YAPAVCIHoTSimEngine##XZ) referenced in function "private: int __thiscall CHoTSimV2Doc::Init(void)" (?Init#CHoTSimV2Doc##AAEHXZ) HoTSimV2Doc.obj HoTSimV2
Error 2 error LNK2019: unresolved external symbol "__declspec(dllimport) class CIFABConnect * __cdecl CreateFabConnectServer(void)" (__imp_?CreateFabConnectServer##YAPAVCIFABConnect##XZ) referenced in function "private: int __thiscall CHoTSimV2Doc::Init(void)" (?Init#CHoTSimV2Doc##AAEHXZ) HoTSimV2Doc.obj HoTSimV2
Error 3 fatal error LNK1120: 2 unresolved externals D:\Projects\AsWorxSim\Bin\Release\HoTSim2.0.exe 1 HoTSimV2
Project Property -> Configuation Properties -> Linker -> Input -> Ignore Specific Library
Ignore the LIBC.LIB
Edit: I think once you remove the LIBC.lib as mentioned above, you are moving ahead with your linking and getting errors which exist in your app. You should try to look in these errors now. Think about it, if libc.lib was missing in the first place then how could it provide any linkage which seems to have appeared after you ignored it.
Command line option:
cl source.cpp /link /NODEFAULTLIB:LIBC.LIB
look here:
Discussion about libc on microsoft forum that's for vs2005 but for 2008 it is the same...
You need to "Rebuild All", to make sure you don't have any .obj files from VC6 hanging around.
We use Lua (www.lua.org) script to let users to customize our server software written in C++.
At the moment we are porting the 32 bits Windows version of our project to Visual Studio 2010.
Once everything works fine with VS 2008, we thought that we would have no problem on upgrade process.
Unfortunately whenever we tried to link the lualib (as dll) to our project in VS 2010, the lua functions could not be found by the linker (the error messages are displayed below).
It seems that some calling convention is wrong on 2010, like the application may be looking for the lua functions with a prefix '_'.
To access lua functions (written in C) from our project modules (C++) we use this:
extern "C" {
#include "lua/src/lua.h"
#include "lua/src/lualib.h"
#include "lua/src/lauxlib.h"
}
The same project compiles and links with lualib successfully on VS 2008 and Linux (g++).
Could anybody help me with this ?
1>dscscript.obj : error LNK2019: unresolved external symbol __imp__luaL_openlibs referenced in function "public: int __thiscall DsCScriptEngine::Init(void)" (?Init#DsCScriptEngine##QAEHXZ)
1>dscscript.obj : error LNK2019: unresolved external symbol __imp__luaL_newstate referenced in function "public: int __thiscall DsCScriptEngine::Init(void)" (?Init#DsCScriptEngine##QAEHXZ)
1>dscscript.obj : error LNK2019: unresolved external symbol __imp__lua_close referenced in function "public: void __thiscall DsCScriptEngine::Shutdown(void)" (?Shutdown#DsCScriptEngine##QAEXXZ)
1>dscscript.obj : error LNK2019: unresolved external symbol __imp__lua_pcall referenced in function "public: long __thiscall DsCScriptEngine::Execute(char const *)" (?Execute#DsCScriptEngine##QAEJPBD#Z)
etc.
The reported missing names are correct, this not a compile problem. You must be linking the wrong .lib. The name you use sounds wrong, it isn't "lualib", the current version of the import library is named lua5.1.lib (or lua51.lib, not sure what the difference is). Download it from here.