In this example, the Client
program includes the VFS program functionality for working with the network stack (see the figure below).
VFS component libraries in a program
The client.c
implementation file is compiled and the vfs_local
, vfs_implementation
and dnet_implementation
libraries are linked:
CMakeLists.txt
project (client)
include (platform/nk)
# Set compile flags
project_header_default ("STANDARD_GNU_11:YES" "STRICT_WARNINGS:NO")
# Generates the Client.edl.h file
nk_build_edl_files (client_edl_files NK_MODULE "client" EDL "${CMAKE_SOURCE_DIR}/resources/edl/Client.edl")
add_executable (Client "src/client.c")
add_dependencies (Client client_edl_files)
# Linking with VFS libraries
target_link_libraries (Client ${vfs_LOCAL_LIB} ${vfs_IMPLEMENTATION_LIB} ${dnet_IMPLEMENTATION_LIB}
In case the Client
program uses file systems, you must link the vfs_local
and vfs_fs
libraries, and the libraries for implementing these file systems. In this case, you must also add a block device driver to the solution.