Bonjour,
J'ai un problème de compilation. Je suis en train de réaliser un programme qui utilise Qt pour l'interface graphique et Pandore pour manipuler et faire du traitement d'image.

Qt comme pandore utilise des makefiles particuliers, et bien qu'il ne semble pas y avoir d'erreur à la compilation, il y a un problème au moment de linker les objets créés.

Quand je compile l'appli qt tout seul ça marche
Quand je compile l'appli utilisant pandore sans qt ça marche aussi, mais dés que j'essaye de combiner les 2 ds un seul programme, ça foire.


Voici l'erreur que j'obtiens :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
...
build/moc_mainwindow.o:(.bss+0x48): multiple definition of `pgif2pan::Code'
build/main.o:(.bss+0x48): first defined here
build/moc_mainwindow.o:(.bss+0x60): multiple definition of `pgif2pan::InCode'
build/main.o:(.bss+0x60): first defined here
build/moc_mainwindow.o:(.bss+0x58): multiple definition of `pgif2pan::CurCode'
build/main.o:(.bss+0x58): first defined here
build/moc_mainwindow.o:(.bss+0x5c): multiple definition of `pgif2pan::OldCode'
build/main.o:(.bss+0x5c): first defined here
build/moc_mainwindow.o:(.bss+0x6c): multiple definition of `pgif2pan::FinChar'
build/main.o:(.bss+0x6c): first defined here
...


voici à quoi ressemble mon qmake
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# # # # # # # # # # # # # # # # # # # # # # # # # # #
# Sources et ressources
 
PANDOREHOME=/home/ikit/TRAVAIL/M2/Vision_robot/pandore6.1.3
SRC          = src
 
 
SOURCES = $$SRC/main.cpp \
          $$SRC/mainwindow.cpp \
          $$SRC/pandoretools.cpp
 
 
HEADERS = $$SRC/mainwindow.h \
          $$SRC/pandoretools.h
 
INCLUDEPATH += $$SRC
 
 
# # # # # # # # # # # # # # # # # # # # # # # # # # #
# Pandore
 
TEMPLATE     = app
LIBS        += -lpandore -L$$PANDOREHOME/lib
INCLUDEPATH += $$PANDOREHOME/include $$PANDOREHOME/src/operatorsP0
CONFIG      += qt thread release warn_off
 
DEFINES += MAIN
 
 
# # # # # # # # # # # # # # # # # # # # # # # # # # #
# Results of compilation
 
OBJECTS_DIR = build
UI_DIR      = build/ui
MOC_DIR     = build/moc
RCC_DIR     = build/rcc
TARGET      = mimocam
voici à quoi ressemble le makefile pour coder des appli avec pandore
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#
# @(#)Makefile
#
# PANDORE
#
# GREYC IMAGE
# 6 Boulevard Maréchal Juin
# F-14050 Caen Cedex France
#
# This file is free software. You can use it, distribute it
# and/or modify it. However, the entire risk to the quality
# and performance of this program is with you.
#
# Please email any bugs, comments, and/or additions to this file to:
# Regis DOT Clouard AT greyc DOT ensicaen DOT fr
# http://www.greyc.ensicaen.fr/~regis
#
 
#
# (C)Régis Clouard - 2001-04-25
# 
 
 
#.SILENT:
.IGNORE:
.PRECIOUS: %.cc %.cpp
 
# X11 directory
X11_PATH= /usr/X11R6/
 
# X11 linker options
LDX11FLAGS=-L${X11_PATH}/lib -lX11 -lpthread 
 
# Command names.
PERL=perl # Use by the Pandore PreProcessor.
 
CC=g++
 
RM=rm -f
 
CCFLAGS=-Wall -I${PANDOREHOME}/include -I${PANDOREHOME}/src/operatorsP0 -DMAIN
 
LDFLAGS= -L${PANDOREHOME}/lib -lpandore -lm ${LDX11FLAGS}
 
PPP=${PERL} -I${PANDOREHOME}/etc/macros ${PANDOREHOME}/etc/macros/template.pl ${PANDOREHOME}/etc/macros/pand_macros
 
# Target : How to compile a .cc file.
% : %.cc
	$(CC) $(CCFLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
 
% : %.cpp
	$(CC) $(CCFLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
 
# Target : How to compile a .cct file (Use the Pandore Pre-Processor)
%.cpp : %.cct
	$(PPP) $< > $@ || $(RM) $@

Si vous voulez jetez un coup d'oeil aux libs pandore, elles sont dispos ici

Voici les différentes sources de mon projet :
- le main
- la fenetre qt (cpp) (header)
- la classe qui doit faire les opérations pandore (cpp) (header)

voilà si vous n'avez ne serait-ce qu'une piste ça m'intéresse.