Arch Linux 天坑

升级chromium 后不能呼出 同法可解决问题

Archlinux让chromium支持 fcitx输入法

chromium中ctl加空格出不来fcitx,
需要安装fcitx-gtk3,因为chromium是基于gtk3的。
sudo pacman -S fcitx-gtk3解决

yay

https://blog.csdn.net/qq_41175951/article/details/102767671

https://blog.nanpuyue.com/2019/052.html

在 Arch Linux 下为 Windows 编译 Rust 程序

yay -S mingw-w64-crt-bin mingw-w64-binutils-bin mingw-w64-winpthreads-bin mingw-w64-headers-bin mingw-w64-gcc-bin

 

这些都是 aur 上的包,因为我不想自己再编译一遍,就偷懒安装了 *-bin

aurman

https://aur.archlinux.org/packages/aurman/

停更 新作yay  https://github.com/Jguer/yay

mingw

aurman -S --noedit --solution_way --pgp_fetch mingw-w64-gcc

 https://aur.archlinux.org/packages/mingw-w64-gcc/

https://wiki.archlinux.org/index.php/PKGBUILD

arch AUR INSTALL

https://linux.cn/article-12107-1.html

  1. git clone [package URL]
  2. cd [package name]
  3. makepkg -si
  1. git clone https://aur.archlinux.org/telegram-desktop-git.git
  2. cd telegram-desktop-git
  3. makepkg -si
  1. yay -S package_name
  2.  gpg --recv-key 465022E743D71E39
    1. pacman-key --recv-keys keyid
    2. pacman-key --lsign-key
    3. 
      

      https://wiki.archlinux.org/index.php/Pacman/Package_signing 

arch dns set

https://www.archlinux.org/packages/community/x86_64/dns-over-https/

https://wiki.archlinux.org/index.php/Domain_name_resolution_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)

 

cmake cmakelists.txt -DBOOST_ROOT="/mingw64/include" -DBOOST_LIBRARYDIR="/mingw64/lib"

set(BOOST_ROOT /mingw64/include) # full path just to figure this out

message(STATUS "BOOST_ROOT= ${BOOST_ROOT}")

include_directories(${BOOST_ROOT})

# Find and link boost components.

FIND_PACKAGE(Boost)

IF (Boost_FOUND)

  INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})

  ADD_DEFINITIONS( "-DHAS_BOOST" )

ENDIF()

target_link_libraries (${PROJECT_NAME} ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY})

archlinux下C++ boost库的使用方法

1. export -p 列出所有环境变量,查看boost库的环境变量$BOOST_ROOT是否为空。

    如果为空,设置该变量。

    export BOOST_ROOT=$BOOST_ROOT:/usr/include/boost

2.编写测试程序 例如boost-test.cpp

3.编译测试程序 

    g++ -I $BOOST_ROOT boost-test.cpp -o boost-test

4.运行程序

    ./boost-test

https://wiki.archlinux.org/index.php/Samba_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)

samba  gui客户端 smb4k 带扫描 可以扫windows

smbpasswd - a  root 密码设置

[share]
path=/share

;下面是允许root 访问
valid users = root
public = yes
;only guest = yes
writable = yes
printable = no

启动 包括重启 主要用于配置修改或者第一次安装后 必须执行

systemctl restart smb.service

重启依然服务

systemctl enable smb.service

ssh root 登录设置

etc/ssh/sshd_config

找 PermitRootLogin

PermitRootLogin yes

时区设置

timedatectl

ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
hwclock --systohc --utc

timedatectl

timedatectl set-ntp true

timedatectl

#命令 : "tzselect"  4 9 1 1 1

 1 一、查看和修改Linux的时区
 2 1. 查看当前时区
 3 
 4 命令 : "date -R"
 5 2. 修改设置Linux服务器时区
 6 方法 A
 7 
 8 命令 : "tzselect"
 9 方法 B 仅限于RedHat Linux 和 CentOS
10 
11 命令 : "timeconfig"
12 方法 C 适用于Debian
13 
14 命令 : "dpkg-reconfigure tzdata"
15 3. 复制相应的时区文件,替换系统时区文件;或者创建链接文件
16 
17 cp /usr/share/zoneinfo/$主时区/$次时区 /etc/localtime
18 
19 例如:在设置中国时区使用亚洲/上海(+820 
21 cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
22 
23 4.注意
24 
25 GMT(Greenwich Mean Time,格林威治标准时间):
26 是指位于英国伦敦郊区的皇家格林尼治天文台的标准时间,因为本初子午线被定义在通过那里的经线。
27 UTC(Universal Time/Temps
28 Cordonné 世界标准时间)
29 CST(Central Standard Time 國家標準時間,一說中原標準時間); 中国标准时间(China
30 Standard Time)
31 GMT + 8 = UTC + 8 = CST
32 
33 二、查看和修改Linux的时间
34 1date
35 
36 查看系统时间
37 
38 # date
39 
40 设置系统时间
41 
42 # date --set “07/07/06 10:19" (月/日/年 时:分:秒)
43 
44 将当前时间和日期写入BIOS,避免重启后失效
45 
46 命令 : "hwclock -w"
47 2、hwclock/clock
48 
49 查看硬件时间
50 
51 # hwclock --show
52 
53 或者 # clock --show
54 
55 设置硬件时间
56 
57 # hwclock --set --date="07/07/06 10:19" (月/日/年 时:分:秒)
58 
59 或者 # clock --set --date="07/07/06 10:19" (月/日/年 时:分:秒)
60 3、硬件时间和系统时间的同步
61 
62 按照前面的说法,重新启动系统,硬件时间会读取系统时间,实现同步,但是在不重新启动的时候,需要用hwclock或clock命令实现同步。
63 
64 硬件时钟与系统时钟同步:
65 
66 # hwclock --hctosys(hc代表硬件时间,sys代表系统时间)
67 
68 或者
69 
70 # clock --hctosys
71 
72 系统时钟和硬件时钟同步: # hwclock --systohc 或者 # clock --systohc
73 针对中国时区,修改操作如下
74 1.   修改文件 /etc/sysconfig/clock内容:
75 ZONE=Asia/Shanghai UTC=false ARC=false
76 2.     rm /etc/localtime
77 ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
78  
备查

 http://www.linuxdown.net/install/config/2016/0609/5832.html

中文 界面问题

输入 locale

出现

LANG=C
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8

再输入
locale-gen

相关目录 /etc/locale.conf
上不去网问题
ping -c 4 www.baidu.com
出错

#systemctl restart dhcpcd

 然后ip route  能看到信息了 重启问题依旧

systemctl enable dhcpcd.service

systemctl enable dhcpcd

上面两句总有一句生效   作用是  打开 dhcp  这样重启就能拿到IP了

中文问题

Arch Linux中文乱码解决

1.安装中文字体    

pacman -S wqy-zenhei ttf-fireflysung (flash乱码)   ---乱码的原因就是缺少中文字体的支持,下载文泉驿xx, OK了

    /etc/locale.gen 设置en_US.UTF8 UTF-8 zh_CN.UTF8 UTF-8

2.执行下面命令看看是否配置好了中文编码:

    locale-gen 

    locale

    locale -a

3.  /etc/rc.conf 中

    LOCALE=en_US.UTF-8

 4. 在google浏览器中设置中文字体。

https://wiki.archlinux.org/index.php/Localization/Simplified_Chinese_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)#%E5%AE%89%E8%A3%85%E4%B8%AD%E6%96%87locale

中文字体

安装字体

除了设置好locale,还需要安装中文字体。

常用的免费(GPL或兼容版权)中文字体有:

pacman -S community/fcitx
sudo pacman -S community/fcitx
sudo pacman -S community/fcitx-libpinyin
sudo pacman -S community/fcitx-googlepinyin
sudo pacman -S fcitx fcitx-configtool fcitx-googlepinyin fcitx-cloudpinyin fcitx-gtk2 fcitx-gtk3
sudo pacman -S sddm-kcm
sudo pacman -S xfce4-goodies
sudo pacman -S fcitx fcitx-googlepinyin fcitx-im fcitx-configtool kcm-fcitx

.xprofile
export LC_ALL="zh_CN.UTF-8"
export XMODIFIERS=@im=fcitx
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
fcitx -d

.xinitrc
export LC_CTYPE="zh_CN.utf8"
export XIM=fcitx
export XIM_PROGRAM=fcitx
export XMODIFIERS="@im=fcitx"
export GTK_IM_MODULE=xim
export QT_IM_MODULE=xim

# pacman -S syslinux # syslinux-install_update -iam

# nano /boot/syslinux/syslinux.cfg

https://www.cnblogs.com/bluestorm/p/5929172.html

https://www.cnblogs.com/bananafish/p/11826665.html

https://www.jianshu.com/p/3d3da6b930a1

LS

1、直接使用通配符百。

ls la*

这是最方便的一种方法,*表示匹配任何长度的任意字符,通过这样的方式就可以查找到所有以ls开头的文件,如果我们想查找文件名中含有la的文件,只需输入“ls *la*”即可。

2、可以使用管道,将ls输出送入grep这个程序来实现。

ls -1 | grep "^la"

-1选项表度示将列出的所有文件排成一列,方便grep的匹配(grep按行匹配)。

扩展资料:

ls 指令是Linux下最常用的指令之一。

ls 命令将每个问由 Directory 参数指定的目录或者每个由 File 参数指定的名称写到标准输出,以及您所要求的答和标志一起的其它信息。

运用举例:

1、列出具体文件 #ls -al //这个最常用,可是往往又不彻底符合要求,

2、列出一切子目录的文件:#ls -R //上个指令仅仅列出了本目录下的一切目录和文件,可是目录下的文件不会循环的列出。版

3、分屏权显现:#ls -l|more //能在当时屏退出,很有用,但不能一页一页翻屏

#ls -l|less //能用pgup,pgdw 翻页,但不能在当时方位退出。

https://linux.cn/article-9170-1.html

https://www.jianshu.com/p/3d3da6b930a1

https://man.linuxde.net/nano

https://my.oschina.net/wuzsheng/blog/1622254

https://bbs.archlinuxcn.org/viewtopic.php?id=1037

https://blog.csdn.net/ytingone/article/details/82819429

https://www.cnblogs.com/onlybobby/p/7018788.html

https://www.cnblogs.com/bluestorm/p/5929172.html

https://www.linuxidc.com/Linux/2014-02/96100.htm

https://wiki.archlinux.org/index.php/syslinux#Configuration

https://www.cnblogs.com/wurui1994/p/6279501.html

RAR

pacman -S thunar-archive-plugin xarchiver zip unzip p7zip arj lzop cpio unrar

/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text$_Z9get_filesPKc[_Z9get_filesPKc]+0x182): undefined reference to `boost::filesystem::path::parent_path() const'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text$_Z9get_filesPKc[_Z9get_filesPKc]+0x18d): undefined reference to `boost::filesystem::path::operator/=(boost::filesystem::path const&)'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text$_Z9get_filesPKc[_Z9get_filesPKc]+0x1c6): undefined reference to `boost::filesystem::path::stem() const'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text$_Z9get_filesPKc[_Z9get_filesPKc]+0x1ce): undefined reference to `boost::filesystem::path::remove_trailing_separator()'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text$_Z9get_filesPKc[_Z9get_filesPKc]+0x218): undefined reference to `boost::filesystem::path::replace_extension(boost::filesystem::path const&)'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text$_Z9get_filesPKc[_Z9get_filesPKc]+0x226): undefined reference to `boost::filesystem::path::parent_path() const'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text$_Z9get_filesPKc[_Z9get_filesPKc]+0x231): undefined reference to `boost::filesystem::path::operator/=(boost::filesystem::path const&)'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text$_Z9get_filesPKc[_Z9get_filesPKc]+0x2f9): undefined reference to `boost::filesystem::path::codecvt()'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text$_Z9get_filesPKc[_Z9get_filesPKc]+0x311): undefined reference to `boost::filesystem::path_traits::convert(char const*, char const*, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >&, std::codecvt<wchar_t, char, _mbstate_t> const&)'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text$_Z9get_filesPKc[_Z9get_filesPKc]+0x329): undefined reference to `boost::filesystem::path::codecvt()'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text$_Z9get_filesPKc[_Z9get_filesPKc]+0x33c): undefined reference to `boost::filesystem::path_traits::convert(char const*, char const*, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >&, std::codecvt<wchar_t, char, _mbstate_t> const&)'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text$_Z9get_filesPKc[_Z9get_filesPKc]+0x359): undefined reference to `boost::filesystem::path::codecvt()'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text$_Z9get_filesPKc[_Z9get_filesPKc]+0x36c): undefined reference to `boost::filesystem::path_traits::convert(char const*, char const*, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >&, std::codecvt<wchar_t, char, _mbstate_t> const&)'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text$_ZN5boost10filesystem4pathC1IA5_cEERKT_PNS_9enable_ifINS0_11path_traits11is_pathableINS_5decayIS4_E4typeEEEvE4typeE[_ZN5boost10filesystem4pathC1IA5_cEERKT_PNS_9enable_ifINS0_11path_traits11is_pathableINS_5decayIS4_E4typeEEEvE4typeE]+0x65): undefined reference to `boost::filesystem::path::codecvt()'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text$_ZN5boost10filesystem4pathC1IA5_cEERKT_PNS_9enable_ifINS0_11path_traits11is_pathableINS_5decayIS4_E4typeEEEvE4typeE[_ZN5boost10filesystem4pathC1IA5_cEERKT_PNS_9enable_ifINS0_11path_traits11is_pathableINS_5decayIS4_E4typeEEEvE4typeE]+0x76): undefined reference to `boost::filesystem::path_traits::convert(char const*, char const*, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >&, std::codecvt<wchar_t, char, _mbstate_t> const&)'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text$_ZN5boost15program_options25basic_command_line_parserIcEC1EiPKPKc[_ZN5boost15program_options25basic_command_line_parserIcEC1EiPKPKc]+0x12a): undefined reference to `boost::program_options::to_internal(std::string const&)'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text$_ZN5boost15program_options25basic_command_line_parserIcEC1EiPKPKc[_ZN5boost15program_options25basic_command_line_parserIcEC1EiPKPKc]+0x2e7): undefined reference to `boost::program_options::detail::cmdline::cmdline(std::vector<std::string, std::allocator<std::string> > const&)'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text$_ZN5boost15program_options25basic_command_line_parserIcE12extra_parserENS_9function1ISt4pairISsSsERKSsEE[_ZN5boost15program_options25basic_command_line_parserIcE12extra_parserENS_9function1ISt4pairISsSsERKSsEE]+0x41): undefined reference to `boost::program_options::detail::cmdline::set_additional_parser(boost::function1<std::pair<std::string, std::string>, std::string const&>)'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text$_ZN5boost15program_options25basic_command_line_parserIcE3runEv[_ZN5boost15program_options25basic_command_line_parserIcE3runEv]+0x2a): undefined reference to `boost::program_options::detail::cmdline::get_canonical_option_prefix()'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text$_ZN5boost15program_options25basic_command_line_parserIcE3runEv[_ZN5boost15program_options25basic_command_line_parserIcE3runEv]+0x57): undefined reference to `boost::program_options::detail::cmdline::run()'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text$_ZN5boost15program_options18parse_command_lineIcEENS0_20basic_parsed_optionsIT_EEiPKPKS3_RKNS0_19options_descriptionEiNS_9function1ISt4pairISsSsERKSsEE[_ZN5boost15program_options18parse_command_lineIcEENS0_20basic_parsed_optionsIT_EEiPKPKS3_RKNS0_19options_descriptionEiNS_9function1ISt4pairISsSsERKSsEE]+0x2f): undefined reference to `boost::program_options::detail::cmdline::set_options_description(boost::program_options::options_description const&)'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text$_ZN5boost15program_options18parse_command_lineIcEENS0_20basic_parsed_optionsIT_EEiPKPKS3_RKNS0_19options_descriptionEiNS_9function1ISt4pairISsSsERKSsEE[_ZN5boost15program_options18parse_command_lineIcEENS0_20basic_parsed_optionsIT_EEiPKPKS3_RKNS0_19options_descriptionEiNS_9function1ISt4pairISsSsERKSsEE]+0x46): undefined reference to `boost::program_options::detail::cmdline::style(int)'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text.startup+0x70): undefined reference to `boost::program_options::options_description::options_description(std::string const&, unsigned int, unsigned int)'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text.startup+0x8d): undefined reference to `boost::program_options::options_description::add_options()'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text.startup+0xbc): undefined reference to `boost::program_options::options_description_easy_init::operator()(char const*, boost::program_options::value_semantic const*, char const*)'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text.startup+0xdf): undefined reference to `boost::program_options::options_description_easy_init::operator()(char const*, boost::program_options::value_semantic const*, char const*)'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text.startup+0xf5): undefined reference to `boost::program_options::options_description_easy_init::operator()(char const*, char const*)'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text.startup+0x10b): undefined reference to `boost::program_options::options_description_easy_init::operator()(char const*, char const*)'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text.startup+0x121): undefined reference to `boost::program_options::options_description_easy_init::operator()(char const*, char const*)'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text.startup+0x129): undefined reference to `boost::program_options::variables_map::variables_map()'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text.startup+0x165): undefined reference to `boost::program_options::store(boost::program_options::basic_parsed_options<char> const&, boost::program_options::variables_map&, bool)'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text.startup+0x1ea): undefined reference to `boost::program_options::options_description::print(std::ostream&, unsigned int) const'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text.startup+0x332): undefined reference to `boost::program_options::notify(boost::program_options::variables_map&)'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text.startup+0x3e2): undefined reference to `boost::filesystem::detail::status(boost::filesystem::path const&, boost::system::error_code*)'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text.startup+0x479): undefined reference to `boost::filesystem::path::replace_extension(boost::filesystem::path const&)'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text.startup+0x49c): undefined reference to `boost::filesystem::detail::status(boost::filesystem::path const&, boost::system::error_code*)'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.text.startup+0x4ce): undefined reference to `boost::filesystem::path::stem() const'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.rdata$_ZTVN5boost15program_options11typed_valueISscEE[_ZTVN5boost15program_options11typed_valueISscEE]+0x38): undefined reference to `boost::program_options::value_semantic_codecvt_helper<char>::parse(boost::any&, std::vector<std::string, std::allocator<std::string> > const&, bool) const'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.rdata$.refptr._ZN5boost15program_options19options_description21m_default_line_lengthE[.refptr._ZN5boost15program_options19options_description21m_default_line_lengthE]+0x0): undefined reference to `boost::program_options::options_description::m_default_line_length'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.rdata$.refptr._ZTVN5boost15program_options13variables_mapE[.refptr._ZTVN5boost15program_options13variables_mapE]+0x0): undefined reference to `vtable for boost::program_options::variables_map'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/main.cpp.o:main.cpp:(.rdata$.refptr._ZN5boost15program_options3argE[.refptr._ZN5boost15program_options3argE]+0x0): undefined reference to `boost::program_options::arg'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/tds_parser.cpp.o:tds_parser.cpp:(.text+0x21): undefined reference to `boost::filesystem::detail::current_path(boost::system::error_code*)'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/tds_parser.cpp.o:tds_parser.cpp:(.text+0x37): undefined reference to `boost::filesystem::detail::canonical(boost::filesystem::path const&, boost::filesystem::path const&, boost::system::error_code*)'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/tds_parser.cpp.o:tds_parser.cpp:(.text+0x47): undefined reference to `boost::filesystem::path::generic_path() const'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/tds_parser.cpp.o:tds_parser.cpp:(.text+0x49e): undefined reference to `boost::filesystem::path::codecvt()'/usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../x86_64-pc-msys/bin/ld: CMakeFiles/tds2pdb.dir/src/tds_parser.cpp.o:tds_parser.cpp:(.text+0x4b1): undefined reference to `boost::filesystem::path_traits::convert(wchar_t const*, wchar_t const*, std::string&, std::codecvt<wchar_t, char, _mbstate_t> const&)'collect2: 错误:ld 返回 1make[2]: *** [CMakeFiles/tds2pdb.dir/build.make:119:tds2pdb.exe] 错误 1make[1]: *** [CMakeFiles/Makefile2:97:CMakeFiles/tds2pdb.dir/all] 错误 2make: *** [Makefile:104:all] 错误 2

原文地址:https://www.cnblogs.com/marklove/p/10802270.html