I usually develop applications on OSX and iOS. I found that Objective-C is very useful for many tasks and can speed things up in many cases.
I would also like to port my applications to Windows systems. I realized (if you have other solutions, let me know!) That Qt can be a very useful tool! Creating a GUI with Qt is quick and easy. The problem is that Qt works with C ++, and OSX works with Objective-C.
I read that Qt can handle Objective-C sources, in fact you can find makefile OBJECTIVE_SOURCESand variables OBJECTIVE_HEADERS.
I was looking for how to configure Qt Creator to receive files .mm, but I could not get it to work.
Inside the file .pro, I have something like the following:
...
OBJECTIVE_SOURCES += \
test.mm
INCLUDEPATH += "C:\GNUStep\...\Headers"
LIBS += -L"C:\GNUStep\...\Libraries" -lobjc -lgnustep-base
QMAKE_CXXFLAGS += -fconstant-string-class=NSConstantString -std=c99
...
- (.h .cpp), main.cpp test.h test.mm. ++ Objective-C, "" ( Cocoa Objective-C ++), test.h (no Objective-C, ):
void testFunction( void );
:
#import <Foundation/Foundation.h>
void testFunction( void ) {
NSString* string;
string = @"This is a test string";
NSLog( @"%@", string );
}
:
...
#include "test.h"
...
testFunction();
...
"undefined testFunction". .o, .mm.
- , - , Qt Objective-C?
, : Objective-C, GNUStep Gorm, , , , Gorm, , Jaws NVDA, !