PDA

View Full Version : multiple defination



phillip_Qt
11th December 2007, 11:53
Hi
while im trying to compile my programm having 3 header file and 2 .cpp file im getting more that 100 lines of errors like below.
i dont know what is going wrong.

release\LetzterDSLocal.o(.text+0x310):LetzterDSLoc al.cpp: first defined here
release\moc_TestLetzterDSLocal.o(.text+0x320):moc_ TestLetzterDSLocal.cpp: multiple definition of `Fi

can any body help me?

jacek
11th December 2007, 12:19
Check if you don't have multiple entries in the .pro file and post the whole first error you get.

phillip_Qt
12th December 2007, 04:02
No i dont ve multiple entries in .pro file.

.pro file contains the following


################################################## ####################
# Automatically generated by qmake (2.01a) Wed Dec 12 09:18:52 2007
################################################## ####################

INCLUDEPATH += ../include
INCLUDEPATH += ../interface
INLCUDEPATH += ../stubs
DEFINES += FILESYSTEMSBFR_EXPORTS
TEMPLATE = lib
TARGET =
DEPENDPATH += .
INCLUDEPATH += .

# Input
HEADERS += TestLetzterDSLocal.h
SOURCES += EBuLaException.cpp \
LetzterDSLocal.cpp \
StreamLocal.cpp \
TestLetzterDSLocal.cpp \
TestMain.cpp
but im getting multilple defines to all the function, which i ve defined in stream file. nAnd its showing all the functions are defined in another file. but in actual its not defined .

aamer4yu
12th December 2007, 06:11
are u including ur files more than once ??
Have u put the check -

#ifdef _HEADER_NAMER_
#define _HEADER_NAMER_
...
...
#endif

in ur header files ?

jacek
13th December 2007, 17:32
Do you include any .cpp files in other ones using #include directive?