我的项目中有一个可执行文件和一个共享库.共享库使用boost库.可执行文件使用olny共享库.
tilenet/ <-- Project
ttest/ <-- Test (executable)
CMakeLists.txt
tilenet/ <-- The shared library
CMakeLists.txt
CMakeLists.txt <-- Root CMake-file
Run Code Online (Sandbox Code Playgroud)
Root Cmake文件:
cmake_minimum_required(VERSION 2.6)
project(tilenet)
set(Boost_USE_STATIC_LIBS OFF) # I've already tried ON
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
find_package(Boost 1.49 COMPONENTS system filesystem REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})
add_subdirectory(test)
add_subdirectory(tilenet)
Run Code Online (Sandbox Code Playgroud)
t检验/的CMakeLists.txt
add_executable(ttest test.cpp)
target_link_libraries(ttest tilenet ${BOOST_LIBRARIES})
Run Code Online (Sandbox Code Playgroud)
tilenet /的CMakeLists.txt
include_directories("include")
set(tilenet_src "src/tilenet.cpp" ...)
add_library(tilenet SHARED ${tilenet_src})
target_link_libraries(tilenet
${SFML_LIBRARIES}
${BOOST_LIBRARIES}
)
Run Code Online (Sandbox Code Playgroud)
(我削减了一些不重要的东西)
在Windows上它工作正常(但我使用VisuelStudio没有CMake),但在Linux上我得到以下链接错误:
../../lib/libtilenet.so: undefined reference to `boost::filesystem3::path_traits::convert(wchar_t const*, wchar_t const*, std::string&, std::codecvt<wchar_t, char, __mbstate_t> const&)'
../../lib/libtilenet.so: undefined …Run Code Online (Sandbox Code Playgroud) 是否可以从 Visual Studio 中删除所有 Key-Shortcuts,以便我可以从头开始分配它们?我的意思不是将它们重置为默认值,而是重置为无。
所以显然有命令和注册命令的参数
vscode.commands.registerCommand("bla", (arg1: any, arg2: any) => {});
Run Code Online (Sandbox Code Playgroud)
带来arg1一个只包含一个键的奇怪物体,那个context; 一个包含一些信息的对象 - 你猜对了 - 上下文.
用户也无法指定参数.不是通过命令调色板而不是键绑定.
这些参数仅针对内部内容,还是应该由扩展开发人员使用?
当我进入:t 4ghci时,我得到了
Prelude> :t 4
4 :: Num t => t
Run Code Online (Sandbox Code Playgroud)
我理解为什么4不仅仅是一个Int或一个整数,而且它是自下而上的,但我不明白为什么4没有显示为这样Ord t => t或更正确的东西:
4 :: (Ord t || Num t) => t
Run Code Online (Sandbox Code Playgroud)
因为4既是Ord和Num,但Ord并Num没有连接...
那么为什么:t 4只输出Num?