gpt4 book ai didi

为 PuTTYTray 创建预制项目

转载 作者:太空宇宙 更新时间:2023-11-04 04:36:50 25 4
gpt4 key购买 nike

我正在尝试使用 Premake 4 为 PuTTYTray 创建 VS2013 项目文件.

最初我只是尝试构建 putty.exe,但我希望能够基于原始项目文件构建原始套件。

solution "PuTTYTray"
configurations {"Debug", "Release"}

project "PuTTY"
kind "ConsoleApp"
language "C++"

files {
"*.h",
"*.c",
"windows/**.c",
"windows/**.h"
}

excludes {
"pscp.c",
"be_all.c",
"psftp.c",
"be_all_u.c",
"be_none.c",
"be_nos*",
"be_ssh.c",
"nocproxy.c",
"puttytel*",
"notiming.c",
"noterm.c",
"noprint.c",
"noshare.c",
"pproxy.c",
"windows/wincons.c",
"cmdgen.c",
"time.c",
"windows/winnojmp.c",
"windows/winplink.c",
"windows/winsftp.c",

}

defines {
"_WINDOWS",
"NO_GSSAPI",
"WIN32",
"SECURITY_WIN32",
"_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1",
"_CRT_SECURE_NO_WARNINGS=1"
}

links {
"advapi32",
"comctl32",
"imm32",
"winmm"
}

includedirs {"windows","unix","."}

我相信我的配置设置与原始配置类似,但我收到以下错误:

Error   34  error C1083: Cannot open include file: 'termios.h': No such file or directory   D:\Git\Other\PuTTYTray\windows\cthelper\ptyfork.c   2   1   PuTTY
Error 15 error C1083: Cannot open include file: 'unistd.h': No such file or directory D:\Git\Other\PuTTYTray\windows\cthelper\buffer.c 4 1 PuTTY
Error 16 error C1083: Cannot open include file: 'unistd.h': No such file or directory D:\Git\Other\PuTTYTray\windows\cthelper\cthelper.c 4 1 PuTTY
Error 17 error C1083: Cannot open include file: 'unistd.h': No such file or directory d:\git\other\puttytray\windows\cthelper\ourhdr.h 10 1 PuTTY
Error 35 error C1083: Cannot open include file: 'unistd.h': No such file or directory d:\git\other\puttytray\windows\cthelper\ourhdr.h 10 1 PuTTY
Error 22 error C2059: syntax error : ')' d:\git\other\puttytray\windows\cthelper\mm.h 7 1 PuTTY
...
Error 19 error C2061: syntax error : identifier 'len' d:\git\other\puttytray\windows\cthelper\mm.h 7 1 PuTTY
Error 30 error C2061: syntax error : identifier 'len' d:\git\other\puttytray\windows\cthelper\mm.h 10 1 PuTTY
Error 24 error C2061: syntax error : identifier 'nmemb' d:\git\other\puttytray\windows\cthelper\mm.h 9 1 PuTTY
Error 29 error C2081: 'ssize_t' : name in formal parameter list illegal d:\git\other\puttytray\windows\cthelper\mm.h 10 1 PuTTY
Error 18 error C2146: syntax error : missing ')' before identifier 'len' d:\git\other\puttytray\windows\cthelper\mm.h 7 1 PuTTY
Error 28 error C2146: syntax error : missing ')' before identifier 'len' d:\git\other\puttytray\windows\cthelper\mm.h 10 1 PuTTY
Error 23 error C2146: syntax error : missing ')' before identifier 'nmemb' d:\git\other\puttytray\windows\cthelper\mm.h 9 1 PuTTY

我该怎么做才能更接近目标?我不太明白我在这里做错了什么。

最佳答案

问题是我没有正确的排除列表 - 可以通过在源代码的根目录中运行 perl 脚本来生成原始项目文件。

通过正确的排除和一些额外的库导入,我可以成功地创建和使用解决方案。

@ostrokarch 的注释在这里为我指明了正确的方向。

关于为 PuTTYTray 创建预制项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29940531/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com