Static CMap object #2

Hi all,
Excuse but the other message is wrong

I've declared in my .h file the following CMap type :
typedef CMap<CString, CString&, MyClass*, MyClass*&> Map;
...
...
class AnotherClass
{
...
public:
static Map BuilderMap;
...
...
static void Register(CString name, MyClass* instance);
};

In one of my CPP file call the Register method as following:
AnotherClass::Register(_T("TEST"), this);

The code of Register method is :
void AnotherClass::Register(CString name, MyClass* instance)
{
AnotherClass::BuilderMap.SetAt(name, instance);
}

When linking my project there the following linker error :
LNK2001: unresolved external symbol "private: static class CMap<class 
CString,class CString &,class MyClass *,class MyClass * &> 
AnotherClass::BuilderMap"

Why ?

0
2/21/2006 2:17:30 PM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
1051 Views

Similar Articles

[PageSpeed] 45

Stefano Magni wrote:
> I've declared in my .h file the following CMap type :
> typedef CMap<CString, CString&, MyClass*, MyClass*&> Map;
> ..
> ..
> class AnotherClass
> {
> ..
> public:
> static Map BuilderMap;
> ..
> };
> 
> When linking my project there the following linker error :
> LNK2001: unresolved external symbol "private: static class CMap<class 
> CString,class CString &,class MyClass *,class MyClass * &> 
> AnotherClass::BuilderMap"

Put this in AnotherClass.cpp:

Map AnotherClass::BuilderMap;
0
mac1 (347)
2/21/2006 5:17:04 PM
Thanks, now is correct ..

"Mihajlo Cvetanović" wrote:

> Stefano Magni wrote:
> > I've declared in my .h file the following CMap type :
> > typedef CMap<CString, CString&, MyClass*, MyClass*&> Map;
> > ..
> > ..
> > class AnotherClass
> > {
> > ..
> > public:
> > static Map BuilderMap;
> > ..
> > };
> > 
> > When linking my project there the following linker error :
> > LNK2001: unresolved external symbol "private: static class CMap<class 
> > CString,class CString &,class MyClass *,class MyClass * &> 
> > AnotherClass::BuilderMap"
> 
> Put this in AnotherClass.cpp:
> 
> Map AnotherClass::BuilderMap;
> 
0
2/22/2006 6:56:28 AM
Reply:

Similar Artilces:

Incorporating detail of one sheet into another. #2
There are 2 excel worksheet. I would like to incorporate detail of sheet 2 into sheet1. e.g Sheet2 Contain the following details A B C D E F G Agent1 Agent2 Agent3 Agent4 Agent5 1 Apple Cycle 2 Mango Car 3 Banana Bus 4 Coconut Motor and so on in coloumn c , d , e,f and g. Now what I would like to do is If in sheet 1 If I select Agent 1 all the detail of sheet2 which has column as agent1 should appear exactly as it is in sheet2. And the same thing for Column B, c ...

reference OLE object's .Picture file/path
I have several ole image controls in a worksheet im working on. I would like to know the syntax for referring to this object's associated Picture filename (if i load "thisimage.bmp" into the picture property, it works, but when i reference .Picture it displays a long integer value instead of the path/filename im looking for) --- Message posted from http://www.ExcelForum.com/ ...

How to call a non static function from a static function
Hi I need to go to a non static function from a static function?can anybody suggest me how to do it?any kind of help will be greatly appreciated. You need to pass the object whose function you want to call. static void s_foo( A* a ); class A{ public: A(); ~A(); void funcA(); }; main() { ... A a; s_foo(&a); } static void s_foo( A* a ) { a->funcA(); } -Seetharam ...

SMTPSVC #2
Tipo evento: Errore Origine evento: SMTPSVC Categoria evento: Nessuno ID evento: 115 Data: 17/02/2006 Ora: 17.32.27 Utente: N/D Computer: SERVER Descrizione: Impossibile effettuare il binding dell'istanza 1. Il codice errore è nei dati. Per ulteriori informazioni, consultare la Guida in linea e supporto tecnico all'indirizzo http://go.microsoft.com/fwlink/events.asp. Dati: 0000: 40 27 00 00 @'.. On Fri, 17 Feb 2006 08:37:18 -0800, "daniele" <daniele@discussions.microsoft.com> wrote: >Tipo evento: Errore >Origine evento: SMTPSVC &...

ATL Object suspend Dialog main thread?
I make a dialog with a progress bar in it, and I create a Timer to change the progress's status. When some button pressed, a long term process is called in another work thread. In the work thread a ATL COM object's method is called, this method is the long term process. But it seemed the ATL COM object's method suspend the dialog's thread, and the OnTimer is never called until the work thread is finished. I found a article "OnTimer never gets called in the dialog box." yesterday, but it was not suit for me. the code is like this: class CMyDlg : public CDialog { ...

multi-databases Access 2.0 to 97 conversion
Hi, I have to convert ~100 access2.0 databases to access97 these databases contain only tables (no queries, no reports) somebody would have a solution, code example, to automate this process ? i try using the command line, but i don't know how to manage errors. Thanks for your help. TwoD dim dbe as dao.dbEngine if dir(sNewDBFullPath) <> "" then kill sNewDBFullPath dbe.CompactDatabase sOldDBFullPath, sNewDBFullPath, dao.dbLangGeneral, dao.dbVersion30 if dir(sNewDBFullPath) <> "" then kill sOldDBFullPath FileCopy sNewDBFullPath, sOldDBFullPath...

Can an appt. automatically be entered into 2 different calendars?
At work I have a shared group calendar and a personal calendar. My work blackberry only sees my personal calendar. Is there some way to have appts. I enter into the group calendar automatically go into my personal calendar so that I can see them on my blackberry? "Timberly" <Timberly@discussions.microsoft.com> wrote in message news:2174FE58-4C84-4FFA-83FF-D19B193928A8@microsoft.com... > At work I have a shared group calendar and a personal calendar. My work > blackberry only sees my personal calendar. Is there some way to have appts. > I enter into t...

Pages missing #2
I have an 8 page publication, now only one page appears, what happen? Can you see your status bar? -- JoAnn Paules MVP Microsoft [Publisher] ~~~~~ How to ask a question http://support.microsoft.com/KB/555375 "PETED73" <PETED73@discussions.microsoft.com> wrote in message news:21EFCC27-0E78-46B0-ADB7-AD397A9CE945@microsoft.com... >I have an 8 page publication, now only one page appears, what happen? PETED73 wrote: > I have an 8 page publication, now only one page appears, what happen? ================================ Which version of Publisher? -- John ...

PCCharge #2
Does anyone know where I can find a list of transaction processing errors from PCCharge? One of our stores received a 114/203 error while processing a check the other night and I have no idea what a 114/203 error is? I've contacted Verifone for a list but to no avail. Thank you in advance for any assistance. No, but I have PCCharge issues as well. Two of our stores need to archive data, but the feature comes up with a separate error in each store. I have error PCCWHIST.MDB Error 3343:Unrecognized database format 'C:\Program Files\Active-Charge\backup\pccwhist.mdb AND PCCWHIS...

Enhanced metafile #2
Hello, I'd like to know if it is possible with C++ to explose a EMF (Enhanced metafile) what I need to know is to import a EMF to my project, the image may contain test + image + lines + polylines , I need to be able to detach each object ... I need to read each line into the EMF Thanks ...

Picture Control #2
Hello, I got a Picture Control with a bitmap. I added a second bitmap to my ressources and now I want to switch between those two bitmaps. What do I have to do? SetBitmap and LoadBitmapA do not take the ressource-ID as parameter. Greetings Sven "Sven Eichenm�ller" <sven@eichenmueller.de> ha scritto nel messaggio news:fubapu$o6a$02$1@news.t-online.com... > SetBitmap and LoadBitmapA do not take the ressource-ID as parameter. You can create instances of CBitmap class, and use LoadBitmap method to associate the CBitmap instance to a particular bitmap resource. Note tha...

Open CRM Object from CRM Task in SFO
Hello Group! I can create a CRM Task in SFO and set a reminder. When the time comes, the task pops up in my outlook reminder window. From there I can open the task and the task is linked to a CRM object using the regarding field (e.g. to an account). Is there anyway to open the object (account) defined in regarding directly from the task? With kind regards Kai ...

Bizarre Behavior in Excel #2
Often now when I open an Excel 98 for MAC spreadsheet my date fields all display #####. I know it is supposed to be the indication that the column is too small. However, in the formula bar the contents are now shown as the old Lotus timeline value, e.g. 35237. When I attempt to format the cell using the Format/Cells/Date format it has no effect. If I try to enter a new date such as 1/5/05 (even in new cells), Excel does not automatically recognize it, and instead just treats it like a text string. Also, another thing that happens is that my spreadsheets will open with a number of initial ...

local variable inside static method
Hi all, I thought local variable inside static method is implicitly static but my test with threading say otherwise. Why is so? I had always been taught to declare the variable near its usage, but it is simply not so with static method. I think... static void StaticMethod() { string[] onetwothree = new[] { "one", "two", "three" }; // use onetwothree variable... } would be more elegant than static string[] onetwothree = new[] { "one", "two", "three" }; static void StaticMethod() { // use onetwoth...

552 Requested mail action aborted: exceeded storage allocation #2
A company is getting this error whenever they send email to my domain. I do not have any storage limits set nor am I having problems getting email from anywhere else. Any Ideas. Exchange 2003 sp1 on a 2003 server. In the last exciting episode, "Todd" <anonymous@discussions.microsoft.com> wrote: >A company is getting this error whenever they send email >to my domain. I do not have any storage limits set nor am >I having problems getting email from anywhere else. Any >Ideas. Exchange 2003 sp1 on a 2003 server. Improperly configured secondary Mx record? Hard t...

Bar chart & Category (x) axis labels #2
If you make a bar chart in Excel 2003, and have two columns of text as Category (x) axis labels, the first column is shown vertical and the text in the second column is shown horizontal in the chart. If you open/make the same chart in Excel 97, the text in both columns is shown horizontal. If there is a lot of text, it becomes unreadable when it's vertical. Is this by design or can it be fixed somehow? ...

Outlook 2003 restarts using PGP #2
I am running Windows XP SP2 Outlook 2003, Office 2000 (fully patched) and PGP 6.5.8. Once you compose an email then select PGP > encrypt on send, then send the email, PGP encrypting dialogue box appears then Outlook claims an error has occurred and restarts. I can see nothing in the event viewer. Any help would be much appreciated. ...

Missing screen colors in objects in Publisher 2003
Hi, I'm a tutor at a senior citizens computer club. Today one member created a birthday card on a club computer with Publisher 2003. When she opened the file at home, also Publisher 2003, colors of objects and Word Art are all missing on the screen. They are just plain white. Yet when she does a Print Preview the colors of the objects and Word Art are fine. Both PC's are fully patched XP as are the versions of Office. The colors in any photos on the card are fine. I created a new card and still the same problem. I checked screen resolution and number of displayed colors an...

Chart objects from C#
Hello all, I am having problems accessing a Chart object from C#. I guess this is related to my project's configuration... I am developing a PowerPoint Add-In using Visual Studio 2008 and C#. The Add-in inspects the slides of the current presentation when asking to do so, and access to different properties of their shapes. And I wanted to access to the properties of the graph the user has created. I have managed to get a Shape reference that, being a Placeholder, has a chart (the HasChart property is msoTrue, and the contained object of the placeholder is ...

portfolio performance #2
Hi, I recently converted a Quicken file to Money, and am trying to get my 401(k) account set up. I have all the funds/balances/shares correctly entered, and the performance report is correctly displaying my return rates for the period and year-to-date. My question is if there is a way to view the account information in a bar chart. I found a tab in the customize window that lets you select a chart, but it only displays one bar, with the account info as it stands right now. What I would like to see is a month-to-month display with historical information (this was easy to get in Qu...

Sheet Protection / Edit Objects 12-07-09
Help please, Problem 1: I have a spreadsheet with multiple objects that I'm trying to lock. My problem is I also have cells that I need to have comment insertion capabilites. When going to Tools/Protection/Protect Sheet and allow Edit Objects is checked I can insert a comment. However, it also allows the other objects on the sheet to be accessed. Is there a way to allow the Edit Objects option in a specified range of cells and still protect the sheet? Problem 2: I have a sort macro that works fine when the sheet is not protected but will not function (gives runtime error) ...

Hosting mail #2
I'm still very new at SBS and Exchange03. Is there almost a tutorial at hosting your own mail locally, I don't like our current pop3 connector setup, it takes way too long and seems very unreliable.. Thanks brian lowry brian.lowry@(yougottahatespam)wcem.org Brian Lowry wrote: > I'm still very new at SBS and Exchange03. Is there almost a tutorial > at hosting your own mail locally, I don't like our current pop3 > connector setup, it takes way too long and seems very unreliable.. > > Thanks > > brian lowry > brian.lowry@(yougottahatespam)wcem.org Goo...

Performance Monitoring for CRM 4.0 with SCOM or another tool? #2
Hi. As far as I can tell, the only performance monitoring pack for CRM 4.0 is for MOM; however we run Microsoft SCOM. I was wondering the following: 1. Could someone be nice enough to post the CRM MOM counters and thresholds so we can build our own perfmon script? 2. Could someone let me know if a monitoring pack for SCOM will someday be available? (either from MS or 3rd party) 3. Could someone let me know if there is an existing 3rd party utility I could use to monitor my CRM environment (I haven't seen one but maybe there is one). Thank you! ...

Task Pane #2
When I open Publisher 2007, the Task Pane automatically opens on the left side of the new document. Is there a way to permanently stop this from opening up every time rather than having to close it each time? I wish... You can tear it off and make it small. Drag it to a less intrusive area. Publisher will remember this maneuver the next time you open the program. -- Mary Sauer http://msauer.mvps.org/ "ItsAlwaysSomething" <ItsAlwaysSomething@discussions.microsoft.com> wrote in message news:BC3E06B4-1144-462D-B236-84C846C4293C@microsoft.com... > When I open Publisher ...

Static CMap object
Hi all, I've declared in my .h file the following CMap type : typedef CMap<CString, CString&, MyClass*, MyClass*&> Map; ... ... class AnotherClass { ... public: static TrainBuilderMap BuilderMap; ... ... static void Register(CString name, MyClass* instance); }; In one of my CPP file call the Register method as following: AnotherClass::Register(_T("TEST"), this); The code of Register method is : void AnotherClass::Register(CString name, MyClass* instance) { AnotherClass::BuilderMap.SetAt(name, instance); } When linking my project there the following linker error :...