error message

I

invincible

hi

I have a cpp application , which is getting compiled
but while linking I am getting error message " first defined here".

error line is pointing to class constructor

clDisplay::clDisplay()
{} -------->>>>> error pointing here.

did any one get this type of message

Mohan
 
H

hari4063

Are you sure that is link error? Mostly compiler will issue this error for
multiple declaration so "first defined here" will point to line where
first occurence of declaration is, and there will be another message where
is real error (duplicated declaration).

If this is linker error ...? I do not know. Which liker do you use?

Best,
Zaharije Pasalic
 
T

Thomas Matthews

invincible said:
hi

I have a cpp application , which is getting compiled
but while linking I am getting error message " first defined here".

error line is pointing to class constructor

clDisplay::clDisplay()
{} -------->>>>> error pointing here.

did any one get this type of message

Mohan

When asking about error messages, please quote the
exact output from the compiler, as well as the
source code.

Generally speaking, the compiler is telling you
that a method is being defined more than once and
it is showing you where the first definition is.
A simple example is defining a method inline in
the header file and also declaring it in the
source (not inlined).

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.comeaucomputing.com/learn/faq/
Other sites:
http://www.josuttis.com -- C++ STL Library book
http://www.sgi.com/tech/stl -- Standard Template Library
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,202
Messages
2,571,057
Members
47,661
Latest member
sxarexu

Latest Threads

Top