   Multiply defined symbols - don't understand why
  I added a new header file to my project called "identifier_string.h". Here it is in its entirety:#ifndef IDENTIFIER_STRING_H#define IDENTIFIER_STRING_H// Provides a database that is used to convert numerical// identifiers into strings, mainly for the purpose of logging.// Example of usage:// ---// unsigned char msg = GetMessageFromServer();// cout << "The message received from the server is: " << idMessageFromServer[ msg ].c_str();// ---// As an example, this can print: "The message received from the server is: LOG_IN_OK"// which is more preferable to "The message received from the server is: 250"#include <map>std::map< unsigned char, std::string > idActorTypes;std::map< unsigned char, std::string > idSkinColors;std::map< unsigned char, std::string > idShirtColors;std::map< unsigned char, std::string > idNoArmorFlags;std::map< unsigned char, std::string > idHairColors;std::map< unsigned char, std::string > idBootColors;std::map< unsigned char, std::string > idPantColors;std::map< unsigned char, std::string > idCapes;std::map< unsigned char, std::string > idHeads;std::map< unsigned char, std::string > idTypesOfWearableItems;std::map< unsigned char, std::string > idHelmets;std::map< unsigned char, std::string > idShields;std::map< unsigned char, std::string > idWeapons;std::map< unsigned char, std::string > idFrames;std::map< unsigned char, std::string > idColors;std::map< unsigned char, std::string > idForeignChars;std::map< unsigned char, std::string > idWindows;std::map< unsigned char, std::string > idActorCommands;std::map< unsigned char, std::string > idMessageFromServer;std::map< unsigned char, std::string > idMessageFromClient;std::map< unsigned char, std::string > idProtocolPlaces;std::map< unsigned char, std::string > idStats;std::map< unsigned char, std::string > idSounds;std::map< unsigned char, std::string > idChannels;#endif// IDENTIFIER_STRING_HObserve that include guards are used. There is only one file that directly includes this, called EL.h (snippet shown):#ifndef EL_H#define EL_H#include <conio.h>#include "Connection.h"#include "constants.h"#include "Log.h"#include "Message.h"#include "identifier_string.h"extern std::string login;extern std::string password;extern std::string guild;extern std::string admin;extern std::string quitMessage;extern std::string greetMessage;extern bool bDebug;extern bool bHailMaster;extern bool bHailEveryone;extern bool bHailGuild;extern Log log;extern unsigned char logged_in;class EL{// ...The only changes I made since the last working copy were the addition of identifier_string.h and the addition of its #include statement in EL.h.EL.h is included in two other files, EL.cpp and main.cpp. When the linker deals with linking main.obj, it yells at me that all the variables defined in identifier_string.h are already defined in EL.obj.Why does this happen if I used include guards?   
  EL.cpp includes EL.h which includes identifier_string.h which defines those variables.main.cpp includes EL.h which includes identifier_string.h which defines those variables.So, both main.cpp and EL.cpp contain the definitions.You've got the extern/non-extern backwards. Put the extern declarations in the header, and put the definitions in ONE .cpp file.Include guards have nothing to do with this since they only apply per compilation unit (.cpp file).;  You might want to take some time to read Organizing Code Files in C and C++.;  Then how can I make these variables global, but accessible to several files? Do I just define them in identifier_string.h as normal, never include identifier_string.h anywhere, and use extern in the files that I want to use them in?As for getting extern backwords - I actually defined all the variables you see there in main.cpp, and I'm trying to make then accessible to EL.h and EL.cpp. I just didn't clarify it. Or am I still wrong?EDIT: I found this problem addressed in the article you gave. (Sorry, I clicked "reply" before you made your second post).   ;  They should be declared extern in the header. Then any file that includes the header has access to them. They need to be defined in one single .cpp.In someheader.h:extern int myVariable;In somefile.cpp:int myVariazble;In any .cpp that wants to use myVariable:#include "someheader.h"...CallSomeFunction(myVariable); // or whatever you want to do with it;  Also, rather than just getting this single question answered and moving on, I would strongly encourage you to read the article I linked above. It will answer this question and many others and save you tons of head scratching and frustration.;  Yep, I saved the article. I just never ran into this problem since apparently I've been declaring only constants in my headers all my life [smile].   