Objective-C和MATLAB/Octave文件扩展名之间的重叠 [英] Overlap between Objective-C and MATLAB/Octave file extensions

查看:160
本文介绍了Objective-C和MATLAB/Octave文件扩展名之间的重叠的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

.m之外,Objective-C或MATLAB/Octave是否具有源文件扩展名?我问是因为我将Hello World程序放在一个文件夹中,而我不能有两个hello.m文件.

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.

推荐答案

一种解决方法是将.mm用于Objective-C. .mm用于Objective-C ++源文件,它是Objective-C的超集,因此应该可以很好地编译.

A workaround would be to use .mm for Objective-C. .mm is used for Objective-C++ source files and it is a superset of Objective-C so it should compile fine.

这绝不是一个干净的解决方案.更好的方法是按照Ruddy Velthuis的建议将文件夹重新组织为子文件夹,或者只是将源文件命名为hello-objective-c.mhello-matlab.m.

This is by no mean a clean solution. A much better way would be to reorganize your folder into subfolders as suggested by Ruddy Velthuis, or simply to call your source files hello-objective-c.m and hello-matlab.m.

这篇关于Objective-C和MATLAB/Octave文件扩展名之间的重叠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆