Is this a library that has built successfully before with another build system? Has this application been built successfully before?
For instances where the actual implementation is in the .h file, you usually must make sure you #include that header file in a cpp in your own application (the app linking against libraryname). .h files are not compiled on their own: when included in other cpp files, however, their contents are compiled and available to that object file. My hunch is you aren't #include-ing the .h files that contain these implementations. Ryan On Tue, Nov 16, 2010 at 1:03 PM, David Doria <daviddo...@gmail.com> wrote: > I am trying to use ADD_LIBRARY to create a .lib file from a collection > of .cpp and .h files. > > If I do: > ADD_LIBRARY(LibraryName AllOfTheCPPFiles.cpp) > > and then try to link against that library, I get many missing-function > type linker errors. I looked in the .h files and many of them have > actual function definitions: > > (an example): > class UdpTransmitSocket : public UdpSocket{ > public: > UdpTransmitSocket( const IpEndpointName& remoteEndpoint ) > { Connect( remoteEndpoint ); } > }; > > I tried to tell CMake to compile the .h files into the library as well > by doing this: > > set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS ${CMAKE_CXX_SOURCE_FILE_EXTENSIONS} h) > ADD_LIBRARY(LibraryName AllOfTheCPPFiles.cpp AllOfTheHFiles.h) > > but it didn't seem to change anything. Is there a way this is typically > handled? > > Thanks, > > David > _______________________________________________ > 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 > -- Ryan Pavlik HCI Graduate Student Virtual Reality Applications Center Iowa State University rpav...@iastate.edu http://academic.cleardefinition.com Internal VRAC/HCI Site: http://tinyurl.com/rpavlik
_______________________________________________ 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