Can´t use ofxKinectForWindows2 AND ofXml at the same time

So i´ve been using ofxKinectForWindows2 as my main addon for working with the kinectV2.

from here :

and Im using a ofXml to save my values from the gui.

The thing that is happening to me is the same one as this previuos post : Unable to compile using ofxKinectForWindows2 using version of_v0.10.1_vs2017release

BUT i´ve discover that it wasn´t a ofxGuiExtended problem rather than a ofXml and kinect2 incompatibility.

This is my ofApp.h file :

#pragma once
#include "ofMain.h"
#include "ofxKinectForWindows2.h"

class ofApp : public ofBaseApp{

		void setup();
		void update();
		void draw();

		ofxKFW2::Device kinect;
		ofXml xml;

AND im getting this error :

Severity	Code	Description	Project	File	Line	Suppression State
Error	C1047	The object or library file 'D:\of_v0.10.1_vs2017_release\libs\openFrameworksCompiled\project\vs\\..\..\..\..\\libs\pugixml\lib\vs\Win32\pugixml.lib' was created with an older compiler than other objects; rebuild old objects and libraries	ShaderVisualizer_3	D:\of_v0.10.1_vs2017_release\apps\myApps\ShaderVisualizer_3\LINK	1

IF I comment the line :

ofxKFW2::Device kinect;

OR the line :

`ofXml xml;`

it works.

BUT if I leave both , then the program crashes showing that weird error.

The thing is that I need to use both KINECT and SAVE MY DATA TO THE PC.

So im kind of stuck on how to accoplish this.

Any suggestions ?

There is a problem in the xml library we use in the visual studio version. as the error says it seems we compiled with an old version, i’ll look into it and add it to the next release.

Meanwhile, someone already compiled the new libraries and linked them here Pugixml.lib error in VS2017 (version 15.8.4)

1 Like

lol, I just had this error and google led me here. I followed the link and realized I’m the someone who recompiled Pugixml. Saved my own butt!