Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Overlap between Objective-C and MATLAB/Octave file extensions

Do Objective-C or MATLAB/Octave have source file extensions besides .m? I ask because I'm putting Hello World programs in a single folder and I can't have two hello.m files.

like image 480
mcandre Avatar asked Oct 20 '25 09:10

mcandre


1 Answers

The only way I see is to create subdirectories for each of the programs and put your files there. You can tell Obj-C to treat other extensions as Obj-C, but that would not solve the problem for the other programs.

Update

To compile any extension as Objective-C, use -x objective-c on the command line or Select Objective-C from "Compile Sources As" in the target build settings. Default is "According To File Type", which means that only .m files are compield as Objective-C.

FWIW, there are many subtle differences between Objective-C++ and Objective-C. I myself would use subfolders to separate the .m files, as I already said above.

like image 64
Rudy Velthuis Avatar answered Oct 22 '25 02:10

Rudy Velthuis



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!