I have a bit of a nagging problem. I've created a .cpp (myfuncs.cpp, no .h) file for my program. It contains several functions that are of use to different forms in the project.
myfuncs.cpp contains a global variable, 'String keywords'.
I #included the myfuncs.cpp in 2 different forms. When I compile the project it gives me a few linker warnings:
public symbol "_keywords" defined in both modual C:\...\form1.obj and C:\...\form2.obj
I know this problem spawns from my global variable, but I dont know what to do, because I have to have it and it's a waste to reinstate it with a different name in all 3 of the cpp's involved.
I know this is just a warning and is not really harmful, but I'd like to get it fixed. It's been an annoying little thorn in many of my projects and I don't know what to do to fix it. Does anyone else?
Decripit-
myfuncs.cpp contains a global variable, 'String keywords'.
I #included the myfuncs.cpp in 2 different forms. When I compile the project it gives me a few linker warnings:
public symbol "_keywords" defined in both modual C:\...\form1.obj and C:\...\form2.obj
I know this problem spawns from my global variable, but I dont know what to do, because I have to have it and it's a waste to reinstate it with a different name in all 3 of the cpp's involved.
I know this is just a warning and is not really harmful, but I'd like to get it fixed. It's been an annoying little thorn in many of my projects and I don't know what to do to fix it. Does anyone else?
Decripit-