Xcode programming - visual-studio

I wrote my programs in Visual Studio. now i have an mac and i want to program there like visual-studio. but there are differences between them. Is there any solution that i can write a code in Xcode that it is compatible in Visual Studio and works without any errors?

Is there any solution that i can write
a code in Xcode that it is compatible
in visual-Studio and works without any
errors?
Write standard portable source code. Xcode uses the GCC toolchain, VS uses MS's cl compiler. They are different. Xcode does have the notion of projects and solutions and allows configurations. However, they are a bit complicated (so beware). Also, the Xcode debugger is buggy and the editor is not as feature-rich as the VS2005/VS2008 IDE.
You can build Cocoa/Carbon based applications on Xcode but these won't compile/run on VS. Similarly, you can build Win32 applications on VS which won't run/compile on Xcode.
All in all, Xcode is your best shot at an IDE if you're not a vim/emacs fan.

You can easily write portable low level code in C/C++, but any GUI code or code which calls the OS will be non-portable.

Java would be also a good solution for platform independency. NetBeans would be my choice.

Would in theory be possible to have a vs template so you go project structure and intellisense then when you build have a build script export to the mac or source repository then build on mac
Either way Xcode needs to be run on a Mac.

You can use Mono and MonoDevelop, then the programs you create on Mac can run on Windows also. I use Visual Studio on my job, but my spare time I like to play around with mono on my mac. http://www.mono-project.com/

Related

I have a small Vulkan project in VS C++ that runs on Windows. Can I make it run on Android in the same solution, supporting both Windows and Android?

I want my project to run on windows, and I want the ability to also run on Android. Basically one project that can run on two (or more) targets.
If not in VS, is there another way to accomplish this?
If you want a project that can be built both for Windows and Android, I suggest you look into creating a CMake project. CMake can be integrated both with VS and with Android Studio.
However, if you haven't done any Android NDK development, I suggest you start out with some Android-only examples first.
As an example, I work with a fork of Sascha Willem's Vulkan examples. In my fork I have a cmake file that is used both to generate Visual Studio projects, and also referenced by the Gradle build file for the Android build.
EDIT: removed incorrect statement about VS not supporting Android at all.

Use Mono for android on with Mono

It looks really easy to switch MonoDevelop's compiler to Mono tools instead of .NET – you just need to pick a different framework under settings of the IDE.
However, after switching to Mono and getting the project compiling by Mono tools, Mono for android no longer seems to be an available framework (i.e. the reference to it in the Android project turns red). Obviously, the build fails with tons of errors like Android.XXX.YYY is not a class or namespace name, etc.
Is there a way to install Mono for android on a Windows machine so that it is available to Mono tools and usable from Monodevelop running on Mono?
No. Mono for Android uses the MSBuild build system, and installs custom build tasks and frameworks into the MSBuild extension directories. Mono's implementation of MSBuild (xbuild) has separate extension directories. It might be possible to copy the targets and extensions across but you'd probably run into other issues, as it's completely untested.
In general on Windows I'd recommend using the MS/.NET toolchain in MonoDevelop unless you have a really good reason to use the Mono toolchain. Note that you can run with Mono even if you compile with .NET, using the Run->Run with... menu.

Is there an easy way to migrate a Qt 4.8 VS2010 project to a Qt project using xcode on mac?

I currently have a VS2010 project that uses the Qt 4.8 framework. We needed to have some native libraries for video on windows and we will develop the same for the mac. We are now migrating the project over to the Mac Os so we can release on that OS also. I am brand new to Mac, last friday being the first time i have even fooled around with one, let alone xcode. Most of my dev experience has been in the Visual Studio world so i am not too familiar with "make" projects. We do have some pro files but they are more than a year out of date. What is the best way to migrate the projects between the platforms? Any tips or tricks? Any help would be appreciated.
Thanks
If you're going to the effort of migrating from Windows to Mac, I'd definitely recommend using CMake.
It has many advantages over using hard-coded project files/makefiles. This answer points to some CMake tutorials.
There are some conversion tools which are meant to be able to convert between other buildsystems and CMake, but I have no personal experience of these.
The CMake documentation sometimes leaves a little to be desired, but the mailing list is usually an excellent place to get help and advice.

Import VS project in Xcode

I've a project made in VS2010 for windows using C++. Now I want to port it to MAC so that the code base remains constant as much as possible. I used QT for GUI for the same reason. But I couldn't find a simple way like import VS project along with project settings or some such thing in Xcode to get started quickly on mac part. Any Ideas?
AFAIK, there is no convertor.
Alternative approach: You can use each IDE as a front-end for another tool, like CMake or qmake.
You could also try Qt Creator, Eclipse, or...

Qt Creator vs Xcode for Qt development on the Mac

I'm about to start a Qt project on the Mac and I'm not sure which IDE to choose between:
Qt Creator
Xcode
Which are the advantages/disadvantages of these two IDEs for Qt development on the Mac?
Personally I'm using QtCreator in order to have the same on all platforms. The main advantage I give to it is that it have been developed for Qt.
The main advantage I give to XCode is its integration to MacOSX.
Now for you it depends:
If you always use XCode, You should continue using it for Qt to keep your marks
If you always use QtCreator, you should continue using it
If you start developing on MacOSX (or you've never used XCode) you should use QtCreator
Then my advice is: use the IDE you prefer to use
Qt Creator has much better integration with Qt in code editing, UI designing, and debugging. And it's the same across platform.
My issue with Creator on the Mac is it's debugging facility is not on a par with other platform. The python script-able debugger is not as functioning as, say Windows version of Creator. This is not Qt/Nokia's fault since the gcc/gdb on Mac are versions behind. Apple switched its focus to LLVM and left gcc tool chain, eh, to its natural death on the platform.
I actually do much of my developing on a Windows VM. Only switch to Mac for building and debugging something that's only Mac-specific.
Both options have issues. Qt Creator has problems with projects that have complicated project hierarchies (complicated in terms of folder structure.)
With Xcode, there are issues if you want to have some objective-c source in your project and if you want to be able to step into Qt source while debugging.
Most of my development is done on the Mac using Xcode and BBEdit. I switch over to Developer Studio on Windows for testing or if I need to be able to step into Qt while debugging.
Given the amount of time we all spend working working in these environments, you should try both and use what suits you best.
You also need to consider eclipse. I have spent the last week using Qt Creator and being a long-time eclipse user (for both Java and C++) I find it inferior. Once (if) Xcode 4 support is added to Qt, this might change, but at the moment my vote goes with eclipse even without the 'Qt Integration' available (i.e. just using the 'C++ Makefile project with existing sources').

Resources