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

114 Views Asked by At

I am a student with a Mac, my school requires I send in vsproject's (Visual Studio) for my homework.
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).
I do have the new VS for Mac but that wont compile anything in C++ atm (at least I don't know how too).
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.

1

There are 1 best solutions below

1
On BEST ANSWER

You can't do this using CMake. CMake Depends heavily on VS to generate vsproject files. (And likewise, you can't generate an xcodeproj on Windows because it depends on Xcode.)

However, there is another build system that is able to cross-generate these called 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.