I have the following struct to manage Camera State with
struct keyState
{
float x_rotation, y_rotation, z_rotation;
float x_rotation_rad, y_rotation_rad, z_rotation_rad;
float x_pos, y_pos, z_pos;
} state_manager;
This struct is located in my WalkingCameraManipulator.h class. WalkingCameraManipulator is implemented in WalkingCameraManipulator.cpp, and I have an #include "WalkingCameraManipulator" in my main class.
Error 1 error LNK2005: "struct keyState state_manager" (?state_manager@@3UkeyState@@A) already defined in main.obj Error 2 error LNK1169: one or more multiply defined symbols found
However, I am dealing with the following error message and need to find the best place for my struct. Any ideas on what I can do here? Thanks in advance.