You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Friday, June 11th 2004, 8:29pm

get error: multiply-defined

hallo,

i believ the following error in unix.

g++ -o programm main.o visual.o vokalgui.o vokImpl.o au_laden.o audioprozess.o fft.o netz.o neuron.o neuronnetz.o
neuronschicht.o moc_visual.o moc_vokalgui.o moc_vokImpl.o -Wl,-R,/home/pub/lib/qt3/lib -L/home/pub/lib/qt3/lib
-L/usr/openwin/lib -lqt-mt -lXext -lX11 -lresolv -lsocket -lnsl
ld: fatal: symbol `NeuronSchicht::forward(double*)' is multiply-defined:
(file neuronnetz.o type=FUNC; file neuronschicht.o type=FUNC);
ld: fatal: symbol `NeuronSchicht::neuronschicht_zufall(int, TransferFkt)' is multiply-defined:
(file neuronnetz.o type=FUNC; file neuronschicht.o type=FUNC);
ld: fatal: symbol `NeuronSchicht::NeuronSchicht[in-charge]()' is multiply-defined:
(file neuronnetz.o type=FUNC; file neuronschicht.o type=FUNC);
ld: fatal: symbol `NeuronSchicht::NeuronSchicht[not-in-charge]()' is multiply-defined:
(file neuronnetz.o type=FUNC; file neuronschicht.o type=FUNC);
ld: fatal: File processing errors. No output written to programm
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `programm'

Can someone help me?
thanks first!

i have in neuronnetz: #include "neuronschicht.h"
and in neuornschicht.h: #ifndef NEURONSCHICHT_H
#define NEURONScHICHT_H
......
#endif

meng

djanubis

Beginner

Posts: 29

Location: Moulins France

Occupation: Software ingeneering

  • Send private message

2

Friday, June 11th 2004, 9:39pm

RE: get error: multiply-defined

Quoted

i have in neuronnetz: #include "neuronschicht.h"
and in neuornschicht.h: #ifndef NEURONSCHICHT_H
#define NEURONScHICHT_H
......
#endif

Look, is this a typo or:

Source code

1
2
3
#ifndef NEURONSCHICHT_H
#define NEURONScHICHT_H
               ^__ is this a typo ?
Never patch not working code. Rewrite it !
Never patch badly designed classes. Recreate them cleanly.
(Excerpts from Computing Bible)

Home of the Lab project

This post has been edited 1 times, last edit by "djanubis" (Jun 11th 2004, 9:39pm)


3

Saturday, June 12th 2004, 8:40am

RE: get error: multiply-defined

yes.
sorry, it is a typo just in mail. it is correct in file.

thanks
meng

djanubis

Beginner

Posts: 29

Location: Moulins France

Occupation: Software ingeneering

  • Send private message

4

Saturday, June 12th 2004, 9:21am

RE: get error: multiply-defined

The multiply defined is due to something wrong in your code. Could you post the class header and implementation. This could help tracing the problem.
Never patch not working code. Rewrite it !
Never patch badly designed classes. Recreate them cleanly.
(Excerpts from Computing Bible)

Home of the Lab project

5

Saturday, June 12th 2004, 10:23am

RE: get error: multiply-defined

thanks. have posted.

meng