You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Swift doesn't support Objective-C on Linux (GNUStep or otherwise) for a handful of reasons. You should still be able to use C as an interoperability language with Python, but you'll have to deal with the fact that the Python headers live in different places on different OSs.
Additional Detail from JIRA
md5: 80887cc14a6363cd3558e7d1b3095507
Issue Description:
I'm trying to compile a swift program that uses code written in Objective-C on a VM running Linux (Ubuntu 16.0.4, Swift 4.0.3).
I get this error when compiling :
fatal error: 'Foundation/Foundation.h' file not found
#import <Foundation/Foundation.h>
On Mac OS
The same program works perfectly on Mac OS.
What have I tried ?
I've tried reverting to swift 3.1.1 (I remember this working on swift 3 a while ago).
I've googled the problem, extensively, and had no success.
I've followed instructions on how to install the Objective-C runtime on Linux and installed GNUStep (see http://www.techotopia.com/index.php/Installing_and_Using_GNUstep_and_Objective-C_on_Linux[1])
All with no success.
why am I using objective-C ?
(Anticipating this question).
I need to call a python script from the program. Python has a library for C, which I can only use with C or Objective-C.
In fact, commenting out the line `#import <Foundation/Foundation.h>` makes compilation fail when importing the Python library :
fatal error: 'Python/Python.h' file not found
{{ #include <Python/Python.h>}}
{{ ^}}
{{ 1 error generated.}}
[1]: http://www.techotopia.com/index.php/Installing_and_Using_GNUstep_and_Objective-C_on_Linux
The text was updated successfully, but these errors were encountered: