Skip to main content
Inspiring
February 22, 2024
Answered

SDK User defined class

  • February 22, 2024
  • 1 reply
  • 299 views

Hi

 

I'm building a C++ plugin and I'm trying to setup a user defined class that I can then use in my main cpp file. I'm using Visual Studio.

I'm testing this with a small project based on Skeleton sample project.

I have made a completly basic class with a header and a cpp file like this: https://learn.microsoft.com/en-us/cpp/cpp/header-files-cpp?view=msvc-170 

The header file is located in the folder called "Header Files", just like the other header files. The cpp file is in the root along side the main cpp file.

 

I get this intelligense error:

"Severity Code Description Project File Line Suppression State
Error (active) E1696 cannot open source file "my_class.h" TestPlugin"

 

If I try to build I get this error:

"Severity Code Description Project File Line Suppression State
Error C1083 Cannot open include file: 'my_class.h': No such file or directory TestPlugin"

 

Is there anything I need to do to create my own custom headers and classes?

 

Thanks,

Jakob

This topic has been closed for replies.
Correct answer Jakob Wagner 2048

Oh no. After posting I found out that when I add a new item in VS it creates the item in the "win" folder, not the root folder along with the main cpp. I guess this is purely a VS topic then, sorry for disturbing the forum.

1 reply

Jakob Wagner 2048AuthorCorrect answer
Inspiring
February 22, 2024

Oh no. After posting I found out that when I add a new item in VS it creates the item in the "win" folder, not the root folder along with the main cpp. I guess this is purely a VS topic then, sorry for disturbing the forum.