if we have to define quite a number of constants, or global variables, it would be easier to use ultraedit to extract variable declaration from variable definitions.
copy variable definitions to ultraedit, eg, copy the following to ultraedit:
LPCTSTR aaa = _T("This");
LPCTSTR aa2 = _T("contributed");
LPCTSTR aa2 = _T("by www.fruitfruit.com");
choose menu of ultraedit Search-Replace,
Find What: %^(*^)=^(*^);
Replace With: extern ^1;
select "Regular Expression"
select "Replace All is From Top of File"
Replace Where: Current File
hit button "Replace All"