Bonjour à tous.
J'ai créé une librairie statique contenant entre autres une classe NaoShell. Les symboles associés sont bien présents dans la librairie :
Problème, lorsque j'essaie de linker du code utilisant cette librairie, ld m'affirme qu'il ne trouve pas les symboles dont il a besoin :nm -C ../lib/libNaoShell.a | grep NaoShell
NaoShell.o:
00000f46 t global constructors keyed to _ZN8NaoShellC2ESsi
00000748 T NaoShell::getPlugins()
00000922 T NaoShell::loadPlugin(std::string)
00000cf8 T NaoShell::getCommands()
00000358 T NaoShell::execute_line(char const*)
00000bca T NaoShell::rebuildCommandsVector()
00000d22 T NaoShell::getArgs(char*)
00000000 T NaoShell::NaoShell(std::string, int)
00000000 T NaoShell::NaoShell(std::string, int)
Pourtant, il connaît bien cette librarie, car quand j'efface le fichier libNaoShell.a, il dit :[***]/NaoShell-file.cpp:29: undefined reference to `NaoShell::NaoShell(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int)'
[***]/NaoShell-file.cpp:38: undefined reference to `NaoShell::execute_line(char const*)'
collect2: ld a retourné 1 code d'état d'exécution
Je n'ai pas la moindre idée de ce qui se passe, les symboles dont il a besoin sont présents et pourtant il ne les trouve pas.../usr/bin/ld: cannot find -lNaoShell
Toute piste ou idée est la bienvenue.
Merci d'avance.
Partager