问题标签 [cocotron]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
cocoa - cocotron - installCDT 安装帮助
我在安装最新的 installCDT 时遇到问题。当我这样做时sudo ./install.sh
,它似乎永远持续下去并且肯定是循环的(检查东西,然后安装东西,重复)。(如果我没有 sudo,它会在某些权限被拒绝后结束)。其他人经历过这种情况或知道出了什么问题吗?对不起,我是菜鸟:<
编辑:这里是下载和解压缩后不断重复的输出(没有意识到我把它放在这里之前出错了,因为它太长了)http://www.scribd.com/doc/52635397/installCDToutput
objective-c - Cocotron 是逆向工程的结果吗?
它是复制各种库的行为(因此调用完全相同)还是只是使用独特的优化和新方法从头开始编写它们的代码?
objective-c - 如何在 Web 服务器上运行 Objective-C 二进制文件?
好吧,我在这里有一个相当奇怪的问题。我觉得用 Objective-C 编写代码比任何其他语言都舒服。我最近不得不做一些服务器端编程,这需要我学习 PHP。它可以工作,是的,但是为了好玩,我想通过 Objective-C 来实现同样的目标。因此,我使用 Xcode 的 Foundation 预设创建了一个二进制文件。这是大部分二进制文件:
很基本的代码。它只是从我的服务器下载一些东西,然后我解析 JSON 结果并获取我想要使用的字符串。所以,我的问题是——如何在基于 Linux 的服务器上运行它?我知道这是可能的,也许使用 GNUStep(或 cocotron?),我不知道如何使用。有人有想法吗?
windows - Windows 上的 Foundation.h
我知道以前有人问过这些问题,但一切都建议使用 GNUStep。有没有办法在没有 GNUStep 的情况下使用 Foundation?这对我来说也是一个学习问题(比如是否可以通过链接文件或其他东西来完成)
我安装了 Cygwin 和 gcc。我从 CocoaTron 获得了所有库,如下所示:http ://code.google.com/p/cocotron/source/browse/
我将库文件夹添加到 OBJC_INCLUDE_PATH 和 C_INCLUDE_PATH 中,它不再抱怨找不到 Foundation.h。
但我收到其他错误,例如:
对于新手问题,我很抱歉,我只是对运行一些测试感兴趣并且不想安装 GNUStep。
我的意思是,一个非常简单的例子,比如:
是的,我知道这个例子不需要 objC ;) 我只是想跟着教程一起学习。
谢谢您的帮助!
objective-c - 如何使用 Cocotron 在 Xcode 中设置 Windows 构建?
我已经设置了 Cocotron,我已经为 Windows 编译了 Foundation,并且我已经设置了一个使用该 Foundation 的项目。不过,我无法为 Windows 编译该项目,也找不到这样做的指南。有人有什么想法吗?
objective-c - 使用 Cocotron 生成 EXE
在广泛寻找可以在 Windows 上编译我的 Obj-C OS X 应用程序的工具之后,我终于找到了 cocotron。这允许我(在复杂的安装和设置之后)将一些构建设置和规则添加到我复制的(对于 Windows)Xcode 目标中,然后构建。最终目标是能够运行我的 OS X 应用程序,交叉编译,然后在 Windows 上运行。问题是,当我构建和运行时,Xcode 只生成一个 APP 文件而不是一个 EXE。Xcode 甚至不会运行它,因为不支持“架构”:
我尝试将 APP 扩展名重命名为 EXE,但是当我在 Windows 中打开它时,它只会将其识别为文件夹而不是可执行程序。
我觉得我错过了什么。我认为 Cocotron 应该在正确完成后自动生成一个 EXE,我还需要做什么来生成一个 EXE?我认为 cocotron.org 上的文档还有更多内容,但它不完整且难以理解。
如何使用 Cocotron 生成 EXE?
任何事情都值得赞赏,因为官方的 Cocotron 文档很少……甚至是另一个更好的交叉编译器?
编辑:我下载了 Cocotron 的 TextEditor 示例项目,并完全复制了每个构建设置,就像它在 TextEdit 项目中一样(文件路径/名称除外)。完成此操作后,我尝试构建 windows 目标,在 .APP 包中再次没有生成任何 EXE 文件。
编辑 2:我现在已将所有实现文件添加到 Build Phases -> Compile Sources 部分,但我现在在 Windows 目标中有 130 个构建错误,现在它没有构建(当然,它会生成 130 个构建错误) . 但是,奇怪的是 4/5 的构建错误位于 Header 和 PCH 文件中。AppDelegate.m 中只有少数几个
我在 H 和 PCH 文件中始终只收到一些不同的错误消息:
*:No Such File or Directory FRAMEWORK NAME
Expected * before *
Cocotron 1.0 Windows i386 gcc default (4.3.1) Error...
除了以下内容之外,其中一些还出现在 AppDelegate.M 中:
Undeclared (First Use in this function)
cocotron - 试图理解为什么 Cocotron 不创建框架 DLL
我正在尝试使用 Cocotron 来构建 Foundation 框架。适用于 Windows 的 GCC 4.3.1 编译良好,它正在创建有效的 Windows 可执行文件,我通过制作“Hello, world”可执行文件确认了这一点。
所以我不明白为什么在 Xcode 5.0.2 中,当我使用 xcodebuild 或在 Xcode 本身中构建 Foundation 项目时,它不会创建 dll 文件。
objective-c - How can I use The Cocotron to build a simple app for Windows?
I'm having trouble getting The Cocotron to work. The web site has some instructions. Though, these are outdated and vague. Can anyone explain to me how to use The Cocotron to build a simple test app for Windows?
What I'd like to do is take the trivial Cocoa app that you get if you go to Xcode and create a new Cocoa application project, and then build that app for Windows.
Note: Yes, there are other SO questions about using Cocotron, but all are years old and none are relevant.
Start with Xcode 7.3 and OS X 10.11.5 because these are the current versions of the developer tools and operating system.
Create a simple Cocoa app by going to File > New Project and choosing "Cocoa Application." I want to start by porting this absolutely trivial app.
Installing the Cocotron is tricky due to outdated documentation. I've outlined the issues with this process here. I was able to get frameworks and the cross-compiler installed.
Follow the documentation to configure a new target for building on Windows. Unfortunately, the documentation is incorrect and outdated. Many of the settings it mentions such as "GCC_FAST_OBJC_DISPATCH" as simply not listed in Xcode at all. I've followed the documentation to the letter where it is possible to do so, ignored the build settings which do not exist, and tried to make intelligent guesses for the rest.
Results: When I do this and build my new target for Windows, I get a plethora of errors. These are listed on that blog post I linked above. The errors are mostly along the lines of "unrecognized command line option."