gnustep

【Objective-C系列】之零:(转)Windows下的Objective-C集成开发环境IDE搭建实践

自作多情 提交于 2020-04-25 08:04:57
DATE: 2019-2-23 前言     学习Objective-C语言,上机调试首先需要有开发环境,有苹果电脑的同学可以采用xCode进行Mac/iOS App的开发,没有的话可以采用CodeBlocks IDE+GNUStep的方式在Windows平台上搭建开发环境,本文旨在讲述在Windows平台下搭建OC语言开发的集成开发环境IDE的两种主要方法。 1、参考 https://www.cnblogs.com/yc-755909659/p/4698969.html https://blog.csdn.net/littlebrain4solving/article/details/49150535 https://www.cnblogs.com/linyawen/archive/2012/04/10/2441040.html 2、Windows平台下搭建OC开发环境 Objective-C是苹果软件的编程语言,想要上机学习、调试,有一个集成开发环境(IDE)方便很多。有三类方法搭建Objective-C的集成开发环境: 1). 使用苹果的平台,集成开发环境使用Xcode。但如果没有苹果平台,想在Windows环境下学习Objective-C,可以采用以下两种方法: 2). 在Windows环境下设置一个苹果虚拟机,但这对个人电脑的性能要求较高,不是所有个人电脑都可以

Linux Clang and Objective-C base library

会有一股神秘感。 提交于 2020-01-14 01:45:29
问题 I have been experimenting with Objective-C using GCC + GNUstep on an Ubuntu system. Now regarding the LLVM Clang compiler, what kind of *step library does it offer? Does it use the GNUstep on the Apple Cocoa? I am mostly interested in the base library - collections, streams, etc. The website doesn't give much information. 回答1: LLVM Clang is a compiler. It is completely independent from the Cocoa / Cocoa Touch frameworks on OS X / iOS, or any other frameworks or platform, for that matter. 回答2:

Segmentation fault when attemping to print NSString as UTF8String

大城市里の小女人 提交于 2020-01-02 19:20:31
问题 I have the following objective-c snippet in my hello world example: //hello.m #import <Foundation/Foundation.h> #import "hello.h" void sayHello() { #ifdef FRENCH NSString *helloWorld = @"Bonjour Monde!\n"; #else NSString *helloWorld = @"Hello World\n"; #endif printf("%s", [helloWorld UTF8String]); } //main.m #import <Foundation/Foundation.h> #import "hello.h" int main (int argc, const char * argv[]) { sayHello(); return 0; } building this stuff on osx works fine and runs as expected. But when

coregraphics on gnustep ubuntu

依然范特西╮ 提交于 2019-12-25 10:55:47
问题 so im thinking about porting some logic written for my ios app to the server. I am building a view hierachy and then rasterizing it to bitmaps I have used chameleon to successfully port the relevant bits to mac os. and now I would like to try porting this to ubuntu using since GNUstep has an open implementation on AppKit. I managed to get the hello world app working. However, It seemed strange to me than the following throws errors on compiling. #import <Foundation/Foundation.h> #import

why after executing “[pool drain]”, it never return back to caller?

那年仲夏 提交于 2019-12-25 09:44:40
问题 here is my code template: int main(int argc, char *argv[]) { // create an autorelease pool NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; // make sure the application singleton has been instantiated NSApplication * application = [NSApplication sharedApplication]; // instantiate our application delegate AppDelegate * applicationDelegate = [[[AppDelegate alloc] init] autorelease]; // assign our delegate to the NSApplication [application setDelegate:applicationDelegate]; // call

Compiling Objective-C app for Linux (API coverage)

不羁的心 提交于 2019-12-21 19:55:10
问题 I might be asking something strange here, but I'm unsure where to begin. The thing is that I am considering writing a command line tool on a Mac using Obj-C and the Foundation classes. But there is a very big risk that I would like to be able to compile it for different Linux distributions to run as a server app in the future. I understand that it is not a problem in itself to compile Objective-C for Linux, but what I don't understand is the API coverage. As I have understood it so far I can

GNUStep Getting Started

青春壹個敷衍的年華 提交于 2019-12-19 07:11:41
问题 I downloaded GNUStep and installed it, however I am not sure where I can find an IDE. does anyone know what programs serve as a GNUStep IDE/where to get them? Failing that, does anyone know of a tutorial on how to create and compile a basic GNUStep program? 回答1: Well my experiences with that are devastating. ProjectCenter the IDE distributed for GNUstep does not work here at all the debugger intergration is well not existant. But that's what you get with GNUstep. There is Gorm as interface

How does one use Obj-C 2.0 with GNUstep?

吃可爱长大的小学妹 提交于 2019-12-18 13:23:13
问题 I'm aware of the existence of libobjc2, and I gather that I'll need to use clang rather than GCC, but I can't find any basic instructions of what's different about the compilation process. Can anyone give explicit, step-by-step instructions on acquiring, configuring, compiling, and using GNUstep with Objective-C 2.0 in Ubuntu ? 回答1: Since the GNUStep ObjC2 FAQ has already been referenced, I'll assume you've had a look. I would like to point this out, however: For more advanced features,

what was the second parameter in “id (*IMP)(id, SEL, …) ” used for?

对着背影说爱祢 提交于 2019-12-18 05:24:11
问题 my question as the title says.obviously, the first parameter was used for this pointer , in some taste of c++.what about the second one? thak you. 回答1: The signature of objc_msgSend() is: id objc_msgSend(id self, SEL op, ...); Every method call is compiled down to a call to this function. I.e., if you call: [anArray objectAtIndex:42]; That will be compiled as if it were: objc_msgSend(anArray, @selector(objectAtIndex:), 42); Now, to your question, why do methods get compiled down to a function

How to parse an object to obtain keys values (attribute/value) in Objective-C? [closed]

て烟熏妆下的殇ゞ 提交于 2019-12-12 04:56:31
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . I want to get the values of all attributes of an object in Objective-C. For example I have an instance of my class Client , named Client1 . I would like to have a method which get this object as a parameter and