Hi , everyone.
I am learning objective-c recently.and I have compiler problem with this
Yestoday I read a blog post , that provide a method could compile his
application with corefoundation.dll which is port form Darwin platform named
CoreFoundation.framework.it's also one of Cocoa's basic Framewoks.
While I found it,I also found many interesting things.some of them are:
That means apple port some parts of cocoa framework to windows platform to
develop their application:iTunes.
So, I think if I could use these dll. I could build a greate private
learning environment to study Objective-c language and Cocoa Framework(of
course no appkit.framework support).
My compile environment is :
Mingw64-x86 precompiled package
Mingw64-x86 clang toolchain precompiled package
Mingw64-x86 MSYS environment precompiled package
I only copy apple's objective-c runtime library objc.dll to /lib and use
pexports make objc.def , use lib.exe(from visual studio) make objc.lib.
I wrote a very simple objective-c source code named test.m
Then,use clang compile it. Apple's runtime is nextstep style , default
option will make linker could not find many method in objc.dll.i use these:
Clang -fnext-runtime -lobjc test.m
Linker work fine.but assembler could not understand clang created .s file. A
guy tell me this .s file is darwin style assembler file. I try gcc:
Gcc -fnext-runtime -lobjc test.m
Gcc could create test.exe . But the app run crash.
My question is
1. Why clang create out a Darwin style assembler file.
2. How to fix clang create out assembler file format problem.to make a right
one.in rider to made a windows x86 application(objc.dll seem like a win32
x86 dll,because iTunes still x86 version(not x86_64 version).
3. Why gcc could compile source code correct . But order application still
That's all. Thank you very much.