I checked and it seems that it is not the three cases you said

This is the content of doipcommon layer CMakelists. The configuration information is the same as that of doipserver. include files are configured in the top layer CMakelists.
An undefined function was reported while compiling the library file with CMakelists.
< div class = "aw - list - img >
The libdoipcommon library is successfully compiled, but the libdoipserver library is faulty. I am a little confused about why this error is reported. When generating the library, there is no need to link the dependency library and.cpp file, just need to declare it.
compile environment is under the Windows run on qt
0 Answer
I checked and it seems that it is not the three cases you said
This is the content of doipcommon layer CMakelists. The configuration information is the same as that of doipserver. include files are configured in the top layer CMakelists.
The following reasons may cause an error with undefined functions when generating library files:
target_include_directories(doipcommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../include)
>
但是对于 doipserver,没有添加 include 路径,需要将其添加:
>
```bash
target_include_directories(doipserver PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../include)
这家伙很懒,什么都没留下...