IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Linux Discussion :

problème avec la librairie


Sujet :

Linux

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre averti
    Inscrit en
    Mai 2009
    Messages
    53
    Détails du profil
    Informations forums :
    Inscription : Mai 2009
    Messages : 53
    Par défaut problème avec la librairie
    Bonsoir à tous,
    Je suis un peu débutante avec Lunix. j'ai un algorithme contenant un ensemble de classe en C++ à compiler sous Linux. Une des classes utilise une librairie svm-2.82.
    Mon problème c'est que lorsque je compile j'obtiens des erreurs lièe à cette librairie comme suit:

    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
    anne@anne-desktop:~/Bureau/paradiseo-1.2.1/paradiseo-eo/build/tutorial/Application$ make
    [ 31%] Built target eoutils
    [ 45%] Built target eo
    [ 77%] Built target es
    [ 93%] Built target ga
    Linking CXX executable AppEA
    CMakeFiles/AppEA.dir/AppEA.cpp.o: In function `loocv_svm_classifier(std::vector<bool, std::allocator<bool> > const&, double&)':
    AppEA.cpp:(.text+0xcee): undefined reference to `svm_check_parameter'
    AppEA.cpp:(.text+0xd02): undefined reference to `svm_train'
    AppEA.cpp:(.text+0xd43): undefined reference to `svm_cross_validation'
    AppEA.cpp:(.text+0xd9e): undefined reference to `svm_predict'
    AppEA.cpp:(.text+0xe8e): undefined reference to `svm_destroy_model'
    collect2: ld a retourné 1 code d'état d'exécution
    make[2]: *** [tutorial/Application/AppEA-1.02] Erreur 1
    make[1]: *** [tutorial/Application/CMakeFiles/AppEA.dir/all] Erreur 2
    make: *** [all] Erreur 2
    Je ne sais pas vraiment ou devrais je mettre la librarie et est ce que je dois écrire quelque chose dans le Makefile ou CMakeLists.txt ou je ne sais pas afin que mon programme reconnait cette librairie?
    Svp j'ai vraiment besoin de votre aide!
    Merci d'avance .
    Cordialement, Anne Sophie de Carbonnière.

  2. #2
    Rédacteur
    Avatar de CedrX
    Inscrit en
    Avril 2007
    Messages
    1 111
    Détails du profil
    Informations forums :
    Inscription : Avril 2007
    Messages : 1 111
    Par défaut
    Dans ton Makefile il ne manquerait pas un
    Parce que là d'après ce qui en ressort il ne trouve pas de références aux fonctions typiques à la librairie svm.

  3. #3
    Membre averti
    Inscrit en
    Mai 2009
    Messages
    53
    Détails du profil
    Informations forums :
    Inscription : Mai 2009
    Messages : 53
    Par défaut
    Bonjour,
    j'ai ajouté à mon makefile ce que vous m'avez dit comme suit:

    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
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
     
     
    # CMAKE generated file: DO NOT EDIT!
    # Generated by "Unix Makefiles" Generator, CMake Version 2.6
     
    # Default target executed when no arguments are given to make.
    default_target: all
    .PHONY : default_target
     
    #=============================================================================
    # Special targets provided by cmake.
     
    # Disable implicit rules so canoncical targets will work.
    .SUFFIXES:
     
    # Remove some rules from gmake that .SUFFIXES does not remove.
    SUFFIXES =
     
    .SUFFIXES: .hpux_make_needs_suffix_list
     
    # Suppress display of executed commands.
    $(VERBOSE).SILENT:
     
    # A target that is always out of date.
    cmake_force:
    .PHONY : cmake_force
     
    #=============================================================================
    # Set environment variables for the build.
     
    # The shell in which to execute make rules.
    SHELL = /bin/sh
     
    # The CMake executable.
    CMAKE_COMMAND = /usr/local/bin/cmake
     
    # The command to remove a file.
    RM = /usr/local/bin/cmake -E remove -f
     
    # The top-level source directory on which CMake was run.
    CMAKE_SOURCE_DIR = /home/anne/Bureau/paradiseo-1.2.1/paradiseo-eo
     
    # The top-level build directory on which CMake was run.
    CMAKE_BINARY_DIR = /home/anne/Bureau/paradiseo-1.2.1/paradiseo-eo/build
     
    #=============================================================================
    # Targets provided globally by CMake.
     
    # Special rule for the target edit_cache
    edit_cache:
    	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..."
    	/usr/local/bin/cmake -i .
    .PHONY : edit_cache
     
    # Special rule for the target edit_cache
    edit_cache/fast: edit_cache
    .PHONY : edit_cache/fast
     
    # Special rule for the target rebuild_cache
    rebuild_cache:
    	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
    	/usr/local/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
    .PHONY : rebuild_cache
     
    # Special rule for the target rebuild_cache
    rebuild_cache/fast: rebuild_cache
    .PHONY : rebuild_cache/fast
     
    # Special rule for the target test
    test:
    	@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running tests..."
    	/usr/local/bin/ctest --force-new-ctest-process $(ARGS)
    .PHONY : test
     
    # Special rule for the target test
    test/fast: test
    .PHONY : test/fast
     
    # The main all target
    all: cmake_check_build_system
    	cd /home/anne/Bureau/paradiseo-1.2.1/paradiseo-eo/build && $(CMAKE_COMMAND) -E cmake_progress_start /home/anne/Bureau/paradiseo-1.2.1/paradiseo-eo/build/CMakeFiles /home/anne/Bureau/paradiseo-1.2.1/paradiseo-eo/build/tutorial/Application/CMakeFiles/progress.make
    	cd /home/anne/Bureau/paradiseo-1.2.1/paradiseo-eo/build && $(MAKE) -f CMakeFiles/Makefile2 tutorial/Application/all
    	$(CMAKE_COMMAND) -E cmake_progress_start /home/anne/Bureau/paradiseo-1.2.1/paradiseo-eo/build/CMakeFiles 0
    .PHONY : all
     
    # The main clean target
    clean:
    	cd /home/anne/Bureau/paradiseo-1.2.1/paradiseo-eo/build && $(MAKE) -f CMakeFiles/Makefile2 tutorial/Application/clean
    .PHONY : clean
     
    # The main clean target
    clean/fast: clean
    .PHONY : clean/fast
     
    # Prepare targets for installation.
    preinstall: all
    	cd /home/anne/Bureau/paradiseo-1.2.1/paradiseo-eo/build && $(MAKE) -f CMakeFiles/Makefile2 tutorial/Application/preinstall
    .PHONY : preinstall
     
    # Prepare targets for installation.
    preinstall/fast:
    	cd /home/anne/Bureau/paradiseo-1.2.1/paradiseo-eo/build && $(MAKE) -f CMakeFiles/Makefile2 tutorial/Application/preinstall
    .PHONY : preinstall/fast
     
    # clear depends
    depend:
    	cd /home/anne/Bureau/paradiseo-1.2.1/paradiseo-eo/build && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
    .PHONY : depend
     
    # Convenience name for target.
    tutorial/Application/CMakeFiles/AppEA.dir/rule:
    	cd /home/anne/Bureau/paradiseo-1.2.1/paradiseo-eo/build && $(MAKE) -f CMakeFiles/Makefile2 tutorial/Application/CMakeFiles/AppEA.dir/rule
    .PHONY : tutorial/Application/CMakeFiles/AppEA.dir/rule
     
    # Convenience name for target.
    AppEA: tutorial/Application/CMakeFiles/AppEA.dir/rule
    .PHONY : AppEA
     
    # fast build rule for target.
    AppEA/fast:
    	cd /home/anne/Bureau/paradiseo-1.2.1/paradiseo-eo/build && $(MAKE) -f tutorial/Application/CMakeFiles/AppEA.dir/build.make tutorial/Application/CMakeFiles/AppEA.dir/build
    .PHONY : AppEA/fast
     
    # Convenience name for target.
    tutorial/Application/CMakeFiles/AppLibEA.dir/rule:
    	cd /home/anne/Bureau/paradiseo-1.2.1/paradiseo-eo/build && $(MAKE) -f CMakeFiles/Makefile2 tutorial/Application/CMakeFiles/AppLibEA.dir/rule
    .PHONY : tutorial/Application/CMakeFiles/AppLibEA.dir/rule
     
    # Convenience name for target.
    AppLibEA: tutorial/Application/CMakeFiles/AppLibEA.dir/rule
    .PHONY : AppLibEA
     
    # fast build rule for target.
    AppLibEA/fast:
    	cd /home/anne/Bureau/paradiseo-1.2.1/paradiseo-eo/build && $(MAKE) -f tutorial/Application/CMakeFiles/AppLibEA.dir/build.make tutorial/Application/CMakeFiles/AppLibEA.dir/build
    .PHONY : AppLibEA/fast
     
    AppEA.o: AppEA.cpp.o
    .PHONY : AppEA.o
     
    # target to build an object file
    AppEA.cpp.o:
    	cd /home/anne/Bureau/paradiseo-1.2.1/paradiseo-eo/build && $(MAKE) -f tutorial/Application/CMakeFiles/AppEA.dir/build.make tutorial/Application/CMakeFiles/AppEA.dir/AppEA.cpp.o
    .PHONY : AppEA.cpp.o
     
    AppEA.i: AppEA.cpp.i
    .PHONY : AppEA.i
     
    # target to preprocess a source file
    AppEA.cpp.i:
    	cd /home/anne/Bureau/paradiseo-1.2.1/paradiseo-eo/build && $(MAKE) -f tutorial/Application/CMakeFiles/AppEA.dir/build.make tutorial/Application/CMakeFiles/AppEA.dir/AppEA.cpp.i
    .PHONY : AppEA.cpp.i
     
    AppEA.s: AppEA.cpp.s
    .PHONY : AppEA.s
     
    # target to generate assembly for a file
    AppEA.cpp.s:
    	cd /home/anne/Bureau/paradiseo-1.2.1/paradiseo-eo/build && $(MAKE) -f tutorial/Application/CMakeFiles/AppEA.dir/build.make tutorial/Application/CMakeFiles/AppEA.dir/AppEA.cpp.s
    .PHONY : AppEA.cpp.s
     
    AppLibEA.o: AppLibEA.cpp.o
    .PHONY : AppLibEA.o
     
    # target to build an object file
    AppLibEA.cpp.o:
    	cd /home/anne/Bureau/paradiseo-1.2.1/paradiseo-eo/build && $(MAKE) -f tutorial/Application/CMakeFiles/AppLibEA.dir/build.make tutorial/Application/CMakeFiles/AppLibEA.dir/AppLibEA.cpp.o
    .PHONY : AppLibEA.cpp.o
     
    AppLibEA.i: AppLibEA.cpp.i
    .PHONY : AppLibEA.i
     
    # target to preprocess a source file
    AppLibEA.cpp.i:
    	cd /home/anne/Bureau/paradiseo-1.2.1/paradiseo-eo/build && $(MAKE) -f tutorial/Application/CMakeFiles/AppLibEA.dir/build.make tutorial/Application/CMakeFiles/AppLibEA.dir/AppLibEA.cpp.i
    .PHONY : AppLibEA.cpp.i
     
    AppLibEA.s: AppLibEA.cpp.s
    .PHONY : AppLibEA.s
     
    # target to generate assembly for a file
    AppLibEA.cpp.s:
    	cd /home/anne/Bureau/paradiseo-1.2.1/paradiseo-eo/build && $(MAKE) -f tutorial/Application/CMakeFiles/AppLibEA.dir/build.make tutorial/Application/CMakeFiles/AppLibEA.dir/AppLibEA.cpp.s
    .PHONY : AppLibEA.cpp.s
     
    make_App.o: make_App.cpp.o
    .PHONY : make_App.o
     
    # target to build an object file
    make_App.cpp.o:
    	cd /home/anne/Bureau/paradiseo-1.2.1/paradiseo-eo/build && $(MAKE) -f tutorial/Application/CMakeFiles/AppLibEA.dir/build.make tutorial/Application/CMakeFiles/AppLibEA.dir/make_App.cpp.o
    .PHONY : make_App.cpp.o
     
    make_App.i: make_App.cpp.i
    .PHONY : make_App.i
     
    # target to preprocess a source file
    make_App.cpp.i:
    	cd /home/anne/Bureau/paradiseo-1.2.1/paradiseo-eo/build && $(MAKE) -f tutorial/Application/CMakeFiles/AppLibEA.dir/build.make tutorial/Application/CMakeFiles/AppLibEA.dir/make_App.cpp.i
    .PHONY : make_App.cpp.i
     
    make_App.s: make_App.cpp.s
    .PHONY : make_App.s
     
    # target to generate assembly for a file
    make_App.cpp.s:
    	cd /home/anne/Bureau/paradiseo-1.2.1/paradiseo-eo/build && $(MAKE) -f tutorial/Application/CMakeFiles/AppLibEA.dir/build.make tutorial/Application/CMakeFiles/AppLibEA.dir/make_App.cpp.s
    .PHONY : make_App.cpp.s
     
    # Help Target
    help:
    	@echo "The following are some of the valid targets for this Makefile:"
    	@echo "... all (the default if no target is provided)"
    	@echo "... clean"
    	@echo "... depend"
    	@echo "... AppEA"
    	@echo "... AppLibEA"
    	@echo "... edit_cache"
    	@echo "... rebuild_cache"
    	@echo "... test"
    	@echo "... AppEA.o"
    	@echo "... AppEA.i"
    	@echo "... AppEA.s"
    	@echo "... AppLibEA.o"
    	@echo "... AppLibEA.i"
    	@echo "... AppLibEA.s"
    	@echo "... make_App.o"
    	@echo "... make_App.i"
    	@echo "... make_App.s"
    .PHONY : help
     
     
     
    #=============================================================================
    # Special targets to cleanup operation of make.
     
    # Special rule to run CMake to check the build system integrity.
    # No rule that depends on this can have commands that come from listfiles
    # because they might be regenerated.
    cmake_check_build_system:
    	cd /home/anne/Bureau/paradiseo-1.2.1/paradiseo-eo/build && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
    .PHONY : cmake_check_build_system
    LDFLAGS = "-L /home/anne/Bureau/paradiseo-1.2.1/paradiseo-eo/src/libsvm-2.82/"

    mais l'erreur persiste encore:

    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
     
    anne@anne-desktop:~/Bureau/paradiseo-1.2.1/paradiseo-eo/build/tutorial/Application$ make
    -- Configuring done
    WARNING: Target "AppEA" requests linking to directory "/home/anne/Bureau/paradiseo-1.2.1/paradiseo-eo/src/libsvm-2.82".  Targets may link only to libraries.  CMake is dropping the item.
    WARNING: Target "AppLibEA" requests linking to directory "/home/anne/Bureau/paradiseo-1.2.1/paradiseo-eo/src/libsvm-2.82".  Targets may link only to libraries.  CMake is dropping the item.
    -- Generating done
    -- Build files have been written to: /home/anne/Bureau/paradiseo-1.2.1/paradiseo-eo/build
    [ 31%] Built target eoutils
    [ 45%] Built target eo
    [ 77%] Built target es
    [ 93%] Built target ga
    [ 95%] Building CXX object tutorial/Application/CMakeFiles/AppEA.dir/AppEA.cpp.o
    Linking CXX executable AppEA
    CMakeFiles/AppEA.dir/AppEA.cpp.o: In function `loocv_svm_classifier(std::vector<bool, std::allocator<bool> > const&, double&)':
    AppEA.cpp:(.text+0xcee): undefined reference to `svm_check_parameter'
    AppEA.cpp:(.text+0xd02): undefined reference to `svm_train'
    AppEA.cpp:(.text+0xd43): undefined reference to `svm_cross_validation'
    AppEA.cpp:(.text+0xd9e): undefined reference to `svm_predict'
    AppEA.cpp:(.text+0xe8e): undefined reference to `svm_destroy_model'
    collect2: ld a retourné 1 code d'état d'exécution
    make[2]: *** [tutorial/Application/AppEA-1.02] Erreur 1
    make[1]: *** [tutorial/Application/CMakeFiles/AppEA.dir/all] Erreur 2
    make: *** [all] Erreur 2
    je ne sais pas quoi faire?est ce que la librairie doit être placer dans un emplacement particulier pour que ça marche?aidez moi SVP.Merci infiniment.

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Problèmes avec des librairies (.a et .so)
    Par André K dans le forum C
    Réponses: 2
    Dernier message: 23/10/2006, 15h58
  2. Problème avec la librairie POI
    Par clement42 dans le forum Documents
    Réponses: 3
    Dernier message: 18/11/2005, 19h11
  3. [GD] Problème avec la librairie GD et les header !!
    Par jesspepette dans le forum Bibliothèques et frameworks
    Réponses: 2
    Dernier message: 15/10/2005, 12h09
  4. Problème avec la librairie rfunc sous Firebird
    Par yayelix dans le forum SQL
    Réponses: 4
    Dernier message: 17/05/2005, 16h49
  5. Problème avec les librairies ZLIB et LIBPNG
    Par VenusX117 dans le forum Bibliothèques
    Réponses: 1
    Dernier message: 14/03/2005, 14h49

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo