473,385 Members | 1,320 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

VC2005 - Basic_MFC_app.obj : error LNK2001: unresolved external symbol "public: static wchar_t * CTest::m_static00" (?m_static00@CTest@@2PA_WA)

Hi All,

I have come across a problem with a bog std MFC app linking to bog std MFC
extension dll - both generated by the wizards. The code is set out below.

The trouble is with the static member variable of CTest.

Can anyone help?

Thanks

Sam

// test.hpp

// CTest

class AFX_CLASS_EXPORT CTest : public CWnd

{

DECLARE_DYNAMIC(CTest)

public:

CTest();

virtual ~CTest();

protected:

DECLARE_MESSAGE_MAP()

public:

TCHAR * m_test00;

static TCHAR * m_static00;
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!

};

// end of test.hpp

// test mfc extension dll code

// Test.cpp : implementation file

//

#include "stdafx.h"

#include "Test.hpp"

// CTest

IMPLEMENT_DYNAMIC(CTest, CWnd)

CTest::CTest()

: m_test00(_T("m_test00 OK"))

{

}

CTest::~CTest()

{

}

TCHAR * CTest::m_static00(_T("m_static00 OK"));

BEGIN_MESSAGE_MAP(CTest, CWnd)

END_MESSAGE_MAP()

// end Test.cpp

// test mfc app code

#include "test.hpp"

CTest test;

MessageBox(0, CTest::m_static00, test.m_test00, MB_OK);

// end of test mfc extension code

Error message:

Basic_MFC_app.obj : error LNK2001: unresolved external symbol "public:
static wchar_t * CTest::m_static00" (?m_static00@CTest@@2PA_WA)


Apr 25 '06 #1
0 1388

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: We need more power captain | last post by:
Hi, I know less than a noob, I've been asked to do some compiles in VC++ 6 without knowing too much at all. (I'm a COBOL program normally so this is all too much for me) I open VC++6, open...
2
by: Faith | last post by:
hi guys, As you can understand from the subject the problem is the: error LNK2001: unresolved external symbol _errno Whats so wierd is that when i build the project "A" alone it works with no...
1
by: Alek Davis | last post by:
I am trying to build a DLL in VS.NET 2003 and it works fine in Debug mode. However, if I try to build it in Release mode, I get the following link error in several .obj files: error LNK2001:...
2
by: jpeters | last post by:
Just installed Service Pack 5 for Visual C++ 6.0. Now I'm getting an error when linking as follows: inking... LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16...
0
by: Franky | last post by:
Tried to build in VS2005 a program that builds OK in VS2003 and get errors like the following: Error 57 error LNK2001: unresolved external symbol _WinMainCRTStartup AnnGame Error 58 error...
3
by: Ed Dana | last post by:
Greetings, all. :) I'm familiar with other object oriented programming tools, such as Java & REBOL. In an effort to become more familiar with C++, I decided to write an object oriented BlackJack...
1
by: Vishu7 | last post by:
Hi, I am porting my code which is written in VC2005( c++) to WinCE 5.0. When i build my project i get this error AACDec.def : error LNK2001: unresolved external symbol DllCanUnloadNow ...
0
by: =?Utf-8?B?TWF0ZXVzeiBSYWpjYQ==?= | last post by:
Hi! How can I fix this error? Error 1 error LNK2001: unresolved external symbol "extern "C" long __stdcall SHFlushClipboard(void)" (?SHFlushClipboard@@$$J10YGJXZ) UnmanagedTest.obj Basically...
5
by: bonnielym84 | last post by:
Im new here..didnt noe whether is this the rite way to post my problem..Really need help here..i've been stucked in this error from last wk..My problem is like this..Im using VC++ 6.0 to compile my C...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.