@zhongdao
2020-08-14T16:40:52.000000Z
字数 4523
阅读 1481
未分类
在windows2016 64bit, window2008 64bit, windows7 32,64bit上分别运行ctorrent程序和ctapi,ctcs 让Java的TMS可以正常调用p2p的传输功能。
使用Makefile控制编译
https://tutorial.linux.doc.embedfire.com/zh_CN/latest/linux_app/makefile.html
简单谈谈Makefile和交叉编译工具链
https://blog.csdn.net/czg13548930186/article/details/73029468
make程序会根据Makefile中描述的目标与依赖关系,执行达成目标需要的shell命令。简单来说,Makefile就是用来指导make程序如何干某些事情的清单。
预处理(preprocessing)->编译(compilation)->汇编(assembly)->连接(linking)
编译:.c->.s 汇编:.s->.o 连接:多个.o合并成一个可执行文件。
在平常通过将上述四步统称为“编译”
Makefile中跟目标相关的语法:
要特别注意命令的开头要用“Tab”键,不能 使用空格代替
#Makefile格式
#目标:依赖
#Tab 命令1
#Tab 命令2
[目标1]:[依赖]
[命令1]
[命令2]
[目标2]:[依赖]
[命令1]
[命令2]
linux平台交叉编译Windows 程序
https://blog.csdn.net/zuihaobushi/article/details/90167362
i686-w64-mingw32-gcc -o hello.exe hello.c
i686-w64-mingw32-gcc -o hello.exe hello.c -m64
GCC编译器,适用于Windows。
https://jmeubank.github.io/tdm-gcc/articles/2020-03/9.2.0-release
vscode 如何设置c++编译
Download Cygwin1.dll for Windows 10, 8.1, 8, 7, Vista and XP (32 Bit and 64 Bit)
http://www.dlldownloader.com/cygwin1-dll/
https://cygwin.com/install.html
按照category选择安装。
Let me clarify terminology first.
Linux = operating system kernel
Linux distribution = Linux kernel + user-space utilities (bash, ifconfig etc.)
Windows = NT kernel + user-space utilities
Cygwin = user-space utilities
Because of fundamental differences between NT and Linux kernels you cannot count with your scripts working unmodified on Windows. Some things, which are less specific for OS kernel, work mostly the same way, and Bash is one of them. On the other hand, ifconfig is quite OS-specific and is a part of net-tools project, which hasn't been updated since 2001 and is deprecated since 2004. I believe, there is a cygwin version of ifconfig, and even though it most likely would not work to update configuration, it should work fine to print it. Bryan C. has pointed out how to make sure it is installed.
As for your second question, extension doesn't matter as long as you start your scripts from Bash (it relies on execute permission and shebang line). However, if you want to start them from outside Bash, you'd better make them end with .sh (see this answer for details).
安装apt-cyg
https://blog.csdn.net/lee244868149/article/details/52830968/
Cygwin64 Terminal 类linux开发环境打造之packages安装
https://www.cnblogs.com/hnhycnlc888/p/13026307.html
https://developer.moe/linux-cross-compile-toolchain-on-cygwin
https://stackoverrun.com/cn/q/10580184
windows server 添加开启自启动 不用登录用户自启设置步骤
https://www.cnblogs.com/m0488/p/12083361.html
mintty -e bash --login -c 'PATH=/usr/bin:${PATH}; nohup ~/soft/bftgroup.exe &; nohup ~/soft/ctcs2run.sh 11875 12500 >/dev/null 2>&1 &'
mintty -e bash --login -c 'PATH=/usr/bin:${PATH}; source /etc/rc.local'
下面测试通过:
mintty.exe -D -h always /bin/bash --login -c "source /etc/profile; /usr/bin/nohup /home/junli/soft/ctapi.pl & /usr/bin/nohup /home/junli/soft/ctcs2run.sh 11875 12500 >/dev/null 2>&1 & ~/soft/bftgroup.exe & /usr/bin/procps -ef; "
mintty.exe -D -h always /bin/bash --login -c "source /etc/profile; /usr/bin/nohup ~/soft/ctapi.pl & /usr/bin/nohup ~/soft/ctcs2run.sh 11875 12500 >/dev/null 2>&1 & ~/soft/bftgroup.exe & /usr/bin/procps -ef; "
测试通过:
startup.bat
@echo off
d:
chdir d:\cygwin64\bin
mintty.exe -h always /bin/bash --login -c "source /etc/profile; /usr/bin/nohup ~/soft/ctapi.pl & /usr/bin/nohup ~/soft/ctcs2run.sh 11875 12500 >/dev/null 2>&1 & ~/soft/bftgroup.exe & /usr/bin/procps -ef; " -
测试通过: (必须 /home/junli/ )
@echo off
d:
chdir d:\cygwin64\bin
mintty.exe -e /bin/bash --login -c "source /etc/profile; /usr/bin/nohup /home/junli/soft/ctapi.pl & /usr/bin/nohup /home/junli/soft/ctcs2run.sh 11875 12500 >/dev/null 2>&1 & /home/junli/soft/bftgroup.exe & /usr/bin/procps -ef; bash -i"
最终机器启动测试通过的脚本:
startup.bat
@echo off
d:
chdir d:\cygwin64\bin
mintty.exe -e /bin/bash --login -c "source /etc/profile; nohup /home/junli/soft/ctapi.pl >/dev/null 2>&1 & nohup /home/junli/soft/ctcs2run.sh 11875 12500 >/dev/null 2>&1 & /home/junli/soft/bftgroup.exe & /usr/bin/procps -ef; bash -i"
https://zhuanlan.zhihu.com/p/47006051
Windows 电脑的四种运行状态 ==
这四种运行状态(或称电源状态)是:
工作状态 (Working), S0
睡眠状态 (Sleep), S1 或 S3
休眠状态 (Hibernate), S4
关机状态 (Shutdown), S5
Windows 10 无视电源设置自动进入睡眠
https://answers.microsoft.com/zh-hans/windows/forum/all/windows-10/428670ca-f494-48fa-8c1e-609580cc4789
https://docs.microsoft.com/en-us/windows/wsl/install-win10
sudo cpan JSON
查找所有运行端口。
netstat -ano
netstat -aon|findstr "8081"
查看指定 PID 的进程
tasklist|findstr "2780"
结束进程
taskkill /T /F /PID 9088
cygwin里 ctorrent的下载速度