Hello again Andreas! As i said before, the error was already solved.
In fact, the function header was declared, but the implementation in .cpp file was not using "Executor::" prefix, so the header declaration hadn't a proper implementation to the function. Additionally, i agree that was a mistake of my part: the string type was found, but no implementation to the function was provided. Again, thank you very much for your attention! On Tue, Apr 3, 2012 at 4:02 PM, Andreas Pakulat <ap...@gmx.de> wrote: > On 03.04.12 15:46:08, Mauricio Klein wrote: > > The complete error is the following: > > > > ---------------------------- > > CMakeFiles/MonitoraITSchedulerAgent.dir/SourceCode/src/Executor.cpp.o: In > > function `Executor::execute(Service*, unsigned int)': > > Executor.cpp:(.text+0x8c): undefined reference to > > `Executor::runCommand(char const*, unsigned int, std::basic_string<char, > > std::char_traits<char>, std::allocator<char> >&)' > > > CMakeFiles/MonitoraITSchedulerAgent.dir/SourceCode/src/ServiceProvider.cpp.o: > > In function `ServiceProvider::sendDiscovery()': > > ServiceProvider.cpp:(.text+0x9b6): undefined reference to > > `Executor::runCommand(char const*, unsigned int, std::basic_string<char, > > std::char_traits<char>, std::allocator<char> >&)' > > collect2: ld returned 1 exit status > > make[2]: *** [MonitoraITSchedulerAgent] Error 1 > > make[1]: *** [CMakeFiles/MonitoraITSchedulerAgent.dir/all] Error 2 > > make: *** [all] Error 2 > > ---------------------------- > > > > The function header that is generating the error is: > > > > ---------------------------- > > int runCommand(const char* command, unsigned int timeout, string& > output); > > ---------------------------- > > > > I've already included "<string>" and declared "using namespace std". > > I think you're mis-interpreting the error. The problem is not that it > cannot find the string class, it finds that alright. The problem is > rather that wherever the function is implemented, the file is not part > of the target thats being compiled. > > I'm guessing either you have some kind of mismatch between declaration > and implementation or the file is really not in the list of sources to > compile. If you can't find it and you can post the code, add the > Executor.h and Executor.cpp files to your next mail. > > Andreas > > -- > > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.cmake.org/mailman/listinfo/cmake > -- Best regards, MaurĂcio Souza Klein.
-- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake