VStudio - multiple definition of `xxxxx'

No definitions in header files. Also you have the classical include guards and then #pragma once in your header?

defines.h

#ifndef DEFINES_H
#define DEFINES_H

#include <jled.h>
#define BowlingLed 5
#define StatekLed 4
//declare the existence of this global variable.
extern int DebugX;

#endif

defines.cpp

#include "defines.h"

//define global var
int DebugX = 1;
2 Likes