简体   繁体   English

Xcode 12 使用 SDL2 和 c++(命令行工具)MacOS 11.2.3 时构建文档文件而不是 Unix 文件

[英]Xcode 12 builds Document file instead of Unix file when using SDL2 and c++ (command line tool) MacOS 11.2.3

Hello I am working on simple game engine with SDL2 and c++ in Xcode 12.4 (command line tool).您好,我正在使用 Xcode 12.4(命令行工具)中的 SDL2 和 c++ 开发简单的游戏引擎。 My Problem is that when I include SDL and run the project, the Product is a Document file instead of a Unix file.我的问题是,当我包含 SDL 并运行项目时,产品是文档文件而不是 Unix 文件。 Xcode runs the project with no problems but I cant use it. Xcode 运行项目没有问题,但我不能使用它。 When I tested it without SDL, it compiled to a unix file.当我在没有 SDL 的情况下对其进行测试时,它编译为 unix 文件。 I set Xcode to default but that changed nothing.我将 Xcode 设置为默认值,但这并没有改变。

I found the mistake.我发现了错误。 I may have named my project "Engine 1.1", which means that the compiled file was also called "Engine 1.1".我可能将我的项目命名为“Engine 1.1”,这意味着编译后的文件也称为“Engine 1.1”。 As a result, the file extension ".1" was not recognized.结果,无法识别文件扩展名“.1”。 Since the Unix files have no extensions in MacOS, I didn't notice that.由于 Unix 文件在 MacOS 中没有扩展名,我没有注意到这一点。 So when you create a project in Xcode, just don't use dots.所以当你在 Xcode 中创建项目时,不要使用点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM