Click here to Skip to main content
15,891,725 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Mouse selection Pin
Ivan Cachicatari18-Aug-04 11:31
Ivan Cachicatari18-Aug-04 11:31 
Questiona better strtok ? Pin
Maximilien18-Aug-04 8:30
Maximilien18-Aug-04 8:30 
AnswerRe: a better strtok ? Pin
gamitech19-Aug-04 12:26
gamitech19-Aug-04 12:26 
GeneralRe: a better strtok ? Pin
Maximilien19-Aug-04 14:24
Maximilien19-Aug-04 14:24 
GeneralVariant Types Pin
Grahamfff18-Aug-04 8:29
Grahamfff18-Aug-04 8:29 
GeneralRe: Variant Types Pin
Ivan Cachicatari18-Aug-04 11:22
Ivan Cachicatari18-Aug-04 11:22 
GeneralRe: Variant Types Pin
Grahamfff19-Aug-04 8:51
Grahamfff19-Aug-04 8:51 
QuestionHow to Save Fiels? Pin
Zero_One_ADO18-Aug-04 7:49
Zero_One_ADO18-Aug-04 7:49 
AnswerRe: How to Save Fiels? Pin
Carlos Antollini18-Aug-04 8:41
Carlos Antollini18-Aug-04 8:41 
AnswerRe: How to Save Fiels? Pin
David Crow19-Aug-04 3:07
David Crow19-Aug-04 3:07 
AnswerRe: How to Save Fiels? Pin
gamitech19-Aug-04 12:29
gamitech19-Aug-04 12:29 
QuestionAbout SetCursor? Pin
Zero_One_ADO18-Aug-04 7:47
Zero_One_ADO18-Aug-04 7:47 
AnswerRe: About SetCursor? Pin
vcplusplus18-Aug-04 8:28
vcplusplus18-Aug-04 8:28 
GeneralUnresolved external error: LNK2001 Pin
crushinghellhammer18-Aug-04 7:02
crushinghellhammer18-Aug-04 7:02 
I'm porting code written in C++ for a Motorola ColdFire chip to Visual C++.

In the original program I have two files which I will call Code.cpp and Code.h

Code.h has the class and member function declarations and Code.cpp has member function definitions and the operative code.

The main class for the program is, let's say, cMain, which has a bunch of nested classes.

Now in my Code.cpp file, after the declarations of the constants, I had the following line

extern cMain Main;

In Visual C++ (VS2003) this throws an LNK2001 error. If I remove the extern the program compiles without error.

Could somebody please explain why this is so? When should an object be instantiated using "extern" in VC++ (VS2003)?

Thanks!
GeneralRe: Unresolved external error: LNK2001 Pin
Mike K. Clark18-Aug-04 14:06
Mike K. Clark18-Aug-04 14:06 
GeneralLNK2005 Pin
фил18-Aug-04 7:00
фил18-Aug-04 7:00 
GeneralRe: LNK2005 Pin
Antony M Kancidrowski18-Aug-04 13:42
Antony M Kancidrowski18-Aug-04 13:42 
GeneralOwnerDrawn ComboBox & CDialogBar Pin
AJ12318-Aug-04 6:35
AJ12318-Aug-04 6:35 
GeneralRe: OwnerDrawn ComboBox & CDialogBar Pin
AJ12318-Aug-04 9:28
AJ12318-Aug-04 9:28 
GeneralDoc/View and CTRL+TAB Pin
Jay Carter18-Aug-04 6:05
Jay Carter18-Aug-04 6:05 
GeneralDoc/View and CTRL+TAB Pin
Jay Carter18-Aug-04 6:05
Jay Carter18-Aug-04 6:05 
GeneralNIIF_NONE Pin
BlackDice18-Aug-04 5:30
BlackDice18-Aug-04 5:30 
General#if (_WIN32_IE >= 0x0500) Pin
BlackDice18-Aug-04 5:45
BlackDice18-Aug-04 5:45 
GeneralRe: #if (_WIN32_IE >= 0x0500) Pin
Steve Thresher18-Aug-04 5:52
Steve Thresher18-Aug-04 5:52 
GeneralRe: NIIF_NONE Pin
Steve Thresher18-Aug-04 5:48
Steve Thresher18-Aug-04 5:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.