LNK2019 error using Nite and OpenNI - openni

I haven't ever seen the error of LNK 2019 before and now I encounter it when i try to link the code that i get from Nite.
The error is...
1>kinect.obj : error LNK2019: unresolved external symbol __imp__niteShutdownHandTracker referenced in function "public: void __thiscall nite::HandTracker::destroy(void)" (?destroy#HandTracker#nite##QAEXXZ)
1>kinect.obj : error LNK2019: unresolved external symbol __imp__niteStartHandTracking referenced in function "public: enum nite::Status __thiscall nite::HandTracker::startHandTracking(class nite::Point3f const &,short *)" (?startHandTracking#HandTracker#nite##QAE?AW4Status#2#ABVPoint3f#2#PAF#Z)
1>kinect.obj : error LNK2019: unresolved external symbol __imp__niteReadHandTrackerFrame referenced in function "public: enum nite::Status __thiscall nite::HandTracker::readFrame(class nite::HandTrackerFrameRef *)" (?readFrame#HandTracker#nite##QAE?AW4Status#2#PAVHandTrackerFrameRef#2##Z)
1>kinect.obj : error LNK2019: unresolved external symbol __imp__niteHandTrackerFrameRelease referenced in function "public: void __thiscall nite::HandTrackerFrameRef::release(void)" (?release#HandTrackerFrameRef#nite##QAEXXZ)
1>kinect.obj : error LNK2019: unresolved external symbol __imp__niteStartGestureDetection referenced in function "public: enum nite::Status __thiscall nite::HandTracker::startGestureDetection(enum nite::GestureType)" (?startGestureDetection#HandTracker#nite##QAE?AW4Status#2#W4GestureType#2##Z)
1>D:\AcerUser\Documents\Visual Studio 2013\Projects\kinect\Debug\kinect.exe : fatal error LNK1120: 11 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
how to solve it?
Thanks

If you get error LNK2019 from Visual Studio Console output, you might building your project for Win32 platform on your 64bit Windows, try swiching to x64.
IF you are Using Visual Studio GO TO ->Build --> (thats where you change or create win32/x64
Configuration Manager

Are you sure your application is being linked against the corresponding libraries?
Somewhere in your OpenNI and Nite installation, there must be a folder containing .lib files. You have to specify this path in the additional library directories in your project's property page. If it still doesn't work afterwards, you should add the names of these libraries in the additional dependencies.

Related

SFML no longer working

Following a complete reformat and an upgrade from Visual Studio 2012 to 2015, my program will not compile and spits linker errors at me. I have looked at the paths, linker and whatnot, and it looks just as it should for it to work, I have looked at my code as well in the referenced classes, but they are all set up with proper includes and namespaces too.
All files, including the SFML libraries and my own source code, was kept on my dropbox before i reformatted, so no files have changed folders, which i have double-checked as well.
Entire project is written in C++
1>------ Build started: Project: Starfall, Configuration: Debug x64 ------
1>AnimatedSprite.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class sf::RectangleShape & __cdeclsf::RectangleShape::operator=(class sf::RectangleShape &&)" (__imp_??4RectangleShape#sf##QEAAAEAV01#$$QEAV01##Z) referenced in function "public: __cdecl AnimatedSprite::AnimatedSprite(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct HandlerContainer *)" (??0AnimatedSprite##QEAA#V?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##PEAUHandlerContainer###Z)
1>DynamicSprite.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class sf::RectangleShape & __cdecl sf::RectangleShape::operator=(class sf::RectangleShape &&)" (__imp_??4RectangleShape#sf##QEAAAEAV01#$$QEAV01##Z)
1>CuboidDrawable.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class sf::ConvexShape & __cdecl sf::ConvexShape::operator=(class sf::ConvexShape &&)" (__imp_??4ConvexShape#sf##QEAAAEAV01#$$QEAV01##Z) referenced in function "public: __cdecl CuboidDrawable::CuboidDrawable(class CuboidShape,struct HandlerContainer *)" (??0CuboidDrawable##QEAA#VCuboidShape##PEAUHandlerContainer###Z)
1>C:\Users\Riilu\Dropbox\Starfall\Code and shit\Starfall\x64\Debug\Starfall.exe : fatal error LNK1120: 2 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Did you also upgrade SFML libraries to VS2015? Read here - "You must download the package that matches your version of Visual C++. ... If there's no SFML package compiled for your version of Visual C++, you will have to build SFML yourself"

Trouble compiling gloox library project in Visual Studio 2010

I'm having trouble compiling gloox in VS 2010. I'm getting followinng error report:
1>------ Build started: Project: gloox-1.0, Configuration: Release Win32 ------
Creating library C:\Install\gloox-1.0.13\Release\gloox-1.0.lib and object C:\Install\gloox-1.0.13\Release\gloox-1.0.exp
1>adhoc.obj : error LNK2001: unresolved external symbol "public: virtual class gloox::IOData * __thiscall gloox::IOData::clone(void)const " (?clone#IOData#gloox##UBEPAV12#XZ)
1>adhoc.obj : error LNK2001: unresolved external symbol "public: virtual class gloox::Tag * __thiscall gloox::IOData::tag(void)const " (?tag#IOData#gloox##UBEPAVTag#2#XZ)
1>adhoc.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall gloox::IOData::~IOData(void)" (??1IOData#gloox##UAE#XZ)
1>adhoc.obj : error LNK2001: unresolved external symbol "public: __thiscall gloox::IOData::IOData(class gloox::Tag const *)" (??0IOData#gloox##QAE#PBVTag#1##Z)
1>C:\Install\gloox-1.0.13\Release\gloox-1.0.dll : fatal error LNK1120: 4 unresolved externals
Could someone help me, what am I missing here? I'm new to C++ programming and new VS user so any help would be highly appreciated.
Right click project > add > Existing File.
Then Add iodata.cpp and iodata.h.
This solved my problem.

error LNK2019: unsolved external symbol?

I'm working with Cplex and visual studio 2010. I have added the include and linked the .lib. I have a lot of errors like the following:
Error 1
error LNK2019: unresolved external symbol "public: void __thiscall IloAlgorithm::extract(class IloModel)const "
(?extract#IloAlgorithm##QBEXVIloModel###Z) referenced in function
_main C:\Users\yasmine\Documents\Visual Studio 2010\Projects\NursesAllocation\NursesAllocation\NursesAllocation.obj
Error 2
error LNK2019: unresolved external symbol "public: __thiscall IloCplex::IloCplex(class IloEnv)"
(??0IloCplex##QAE#VIloEnv###Z) referenced in function
_main C:\Users\yasmine\Documents\Visual Studio 2010\Projects\NursesAllocation\NursesAllocation\NursesAllocation.obj
Please, can you help me to solve this problem?
I had the same problem and I solved it including ilocplex.lib to the additional dependencies.
However, I have Cplex for Visual Studio 2008.

Linking to V8 does not work in release mode

I built the v8 libraries on visual studio 2005 in release mode, put the resulting .lib files (in release mode) and compiled my project against them.
While everything is working fine in debug mode (compiling and running correctly), in release mode I get the following link errors (as if the lib files are not there).
error LNK2001: unresolved external symbol "public: class v8::Local<class v8::Boolean> __thiscall v8::Value::ToBoolean(void)const " (?ToBoolean#Value#v8##QBE?AV?$Local#VBoolean#v8###2#XZ)
error LNK2001: unresolved external symbol "public: bool __thiscall v8::Value::IsInt32(void)const " (?IsInt32#Value#v8##QBE_NXZ)
error LNK2001: unresolved external symbol "public: bool __thiscall v8::Value::IsNumber(void)const " (?IsNumber#Value#v8##QBE_NXZ)
error LNK2001: unresolved external symbol "public: bool __thiscall v8::Value::IsBoolean(void)const " (?IsBoolean#Value#v8##QBE_NXZ)
error LNK2001: unresolved external symbol "public: bool __thiscall v8::Value::IsObject(void)const " (?IsObject#Value#v8##QBE_NXZ)
error LNK2001: unresolved external symbol "public: bool __thiscall v8::Value::IsArray(void)const " (?IsArray#Value#v8##QBE_NXZ)
error LNK2001: unresolved external symbol "public: bool __thiscall v8::Value::IsFunction(void)const " (?IsFunction#Value#v8##QBE_NXZ)
error LNK2001: unresolved external symbol "public: bool __thiscall v8::Value::IsNull(void)const " (?IsNull#Value#v8##QBE_NXZ)
My linker properties have the following additional depencies.
msvcrt.lib ntstc_msvcrt.lib Psapi.lib winmm.lib Ws2_32.lib $(SolutionDir)\external_libs\release\v8.lib
and my $(SolutionDir)\external_libs\release folder containst the files:
v8.lib, v8_base.lib, v8_snapshot.lib
Any help would be appreciated.
In Visual Studio the build options are separate for debug and release builds. You probably set everything up properly for debug mode, but not for release mode, hence the errors.
I forget exactly how things are layed out in VS2005, but in VS2008, there is a combobox at the top of the solution properties dialog that lets you choose between debug/release/all configurations.
In other words, you will have to add the additional dependencies to the linker properties section in release mode. Alternatively, in the future, make all changes with the configuration set to All configurations.
Likely cause: The command switches and defines you used to build the v8 lib don't match those that you are using to build the code consuming it.
As an aside, if you are using the vs2005 CRT, you don't need this: ntstc_msvcrt.lib
Martyn

VC++ 6 Linker Errors

Basically, what's happening is this: I have a VC6 workspace (contains 3 projects total), and after NOT being able to succesfully port it into VS2010, I installed XP on a virtual machine (Win 7 on host machine), and installed VS6 on the devbox.
From there, I was able to get past compilation errors, and land headfirst into a whole slew of linker errors...
and I have no idea what's wrong. If anyone could help me with this it would be tremendously appreciated!
(an excert from the build log, there's 41 linker errors total...)
>Linking...
MainFrm.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall ReportMenuBuilder::~ReportMenuBuilder(void)" (??1ReportMenuBuilder##UAE#XZ)
MainFrm.obj : error LNK2001: unresolved external symbol "public: __thiscall ReportMenuBuilder::ReportMenuBuilder(void)" (??0ReportMenuBuilder##QAE#XZ)
MainFrm.obj : error LNK2001: unresolved external symbol "public: bool __thiscall ReportMenuBuilder::Build(bool)" (?Build#ReportMenuBuilder##QAE_N_N#Z)
MainFrm.obj : error LNK2001: unresolved external symbol "public: int __thiscall CReportMultiDocTemplate::GetDocumentCount(void)const " (?GetDocumentCount#CReportMultiDocTemplate##QBEHXZ)
MainFrm.obj : error LNK2001: unresolved external symbol "public: class CString __thiscall ReportMenuBuilder::GetFilespecGivenID(unsigned int)const " (?GetFilespecGivenID#ReportMenuBuilder##QBE?AVCString##I#Z)
Only thing I can think of is apparently the projects are having trouble seeing the necessary files from the other projects, but I don't know why.
My first guess would be you haven't added the .lib file to the additional imports of the other projects. If you have dumpbin the binaries and see if you see the export.