简体   繁体   English

如何在Mac(C ++)上导出到vsproject?

[英]How can I export to a vsproject on my mac (C++)?

I am a student with a Mac, my school requires I send in vsproject's (Visual Studio) for my homework. 我是Mac的学生,我的学校要求我发送vsproject的(Visual Studio)做作业。
I have XCode and CLion as my two C++ IDE's I tried to export the CLion cmake file generated for VS but that wont work without the compiler (I think thats why it didn't work). 我有XCodeCLion作为我的两个C ++ IDE,我试图导出为VS生成的CLion cmake文件,但是如果没有编译器,该文件将不起作用(我认为这就是为什么它不起作用)。
I do have the new VS for Mac but that wont compile anything in C++ atm (at least I don't know how too). 我确实有Mac的新VS,但是不会在C ++ atm中编译任何东西(至少我也不知道如何编译)。
I am really hoping someone was able to figure this out by now cause its driving me nuts and really getting on my nerves, any help would be great. 我真的希望有人能够现在解决这个问题,让它使我发疯,并且真的让我感到不安,任何帮助都会很棒。
(I hope this is the right place to ask this sort of question too...) (我希望这也是提出此类问题的合适地点...)
EDIT: To clarify: I am using only basic std namespace in iostream, I do understand the issues as to why it might not work being OSX is Unix based and Windows is DOS based but I am hoping there is some way to get it done. 编辑:澄清一下:我在iostream中只使用基本的std名称空间,我确实理解了为什么OSX是基于Unix且Windows是DOS的原因,为什么它可能不起作用,但我希望有一些方法可以完成它。

You can't do this using CMake. 您无法使用CMake执行此操作。 CMake Depends heavily on VS to generate vsproject files. CMake严重依赖VS来生成vsproject文件。 (And likewise, you can't generate an xcodeproj on Windows because it depends on Xcode.) (同样,您不能在Windows上生成xcodeproj ,因为它取决于Xcode。)

However, there is another build system that is able to cross-generate these called Gyp . 但是,还有另一个构建系统可以交叉生成这些构建系统,称为Gyp It is not compatible with CMake files, but if your project isn't too large, you could migrate to Gyp where you can generate vsprojects while still developing on macOS. 它与CMake文件不兼容,但是如果您的项目不是太大,则可以迁移到Gyp,在那里您可以在仍然在macOS上进行开发的同时生成vsprojects。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM