?
Solved

About my "error LNK2001: unresolved external symbol"

Posted on 2003-02-25
2
Medium Priority
?
294 Views
Last Modified: 2010-04-01
HI,

  In my VC++6 DLL, class CARD and SERIAL are defined in diffrent files, and I want to use an external varible of SERIAL, so I declair "extern SERIAL pCom" in CARD.CPP, but when I try to build the DLL, error output like this: CARD.OBJ : error LNK2001: unresolved external symbol "class Serial  pCom" (?pCom@@3VSerial@@A).
  What's happens to me?


thks to any answer
0
Comment
Question by:cyclops-wolf
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
iRBIs earned 200 total points
ID: 8015163
extern declaration means that you have external variable in another module - you have to declare it. So put
SERIAL pCom;
in SERIAL.CPP
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question