I tried to get the logitech sdk running in my ue4 project. I plan to use it to interface with my g27 steering wheel and a project based off of the vehicle template (c++ version). The sdk itself is just a bunch of cpp and .h files, no .lib files or dlls to include.
So, I tried to just add the code to my project like i would normally do in visual studio…copy the sdk source folder to the project, in vis studio, add existing, select the source code etc. I also notice that i can just drop in the code to the project, and it would still be “included” but I’m sure thats more of the ue4 build stuff, not nesc visual studio integrating it to the project. Anyway, once the sdk was in place, the code wouldn’t compile because of the conflicts with “INT” “DWORD” and other windows typedefs. I tried to follow the advice of this ue4 answer:
and this forum post:
but, no dice. No matter how I ordered the includes, it would not compile. I would either get the “no nested includes allowed” error, or the error that states “the premade header for this project must be first.”
since there are a lot of files in the logitech sdk, I decided to remove that code (once i did, it would build no problem) add my own vanilla c++ code instead, hoping that I can figure it all out with simple code.
So i made a header file:
#ifndef MY_TEST_H_INCLUDED_
#define MY_TEST_H_INCLUDED_
#include "carTest.h" //the name of the project. i also tried having this under the AllowWindowsPlatformTypes...no luck
#include "AllowWindowsPlatformTypes.h"
class testClass
{
public:
int x,y;
int someMethod();
};
#endif //MY_MAIN_H_INCLUDED_
#include "HideWindowsPlatformTypes.h" //i had this up above as the last include as well, no luck
and this class implementation
#include "carTest.h"
#include "AllowWindowsPlatformTypes.h"
#include "testClass.h"
int testClass::someMethod()
{
return x + y;
}
#include "HideWindowsPlatformTypes.h"
but, I’m still getting the same issues, and my google-fu is failing me. I’m not sure how to fix this, so any help is appreciated.
Thanks