You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
librarymanager/creating.rstsuggests placing library related source code in the src directory. In the example, HelloWorld.cpp would typically contain definitions for forward declarations in HelloWorld.h. If you attempt to run unit tests on any of the definitions in the separate source file, it will fail with linker errors (undefined reference to ... because files in the src directory are not compiled when running unit tests by default.
librarymanager/creating.rst
suggests placing library related source code in thesrc
directory. In the example,HelloWorld.cpp
would typically contain definitions for forward declarations inHelloWorld.h
. If you attempt to run unit tests on any of the definitions in the separate source file, it will fail with linker errors (undefined reference to ...
because files in thesrc
directory are not compiled when running unit tests by default.To overcome this issue, you would have to enable
test_build_src
which, according toadvanced/unit-testing/structure/shared-code.rst
, is not recommended.It would seem that a better option is to place the files in the
lib
directory inside a module specific directory:Based on limited testing, the HelloWorld files must be in a sub-directory of
lib
, otherwise they wont be found by the Library Dependency Finder.The text was updated successfully, but these errors were encountered: