Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
The language is the same, but the bytecode produced is different. Tooling and pathing are the biggest differences; but it’s been a very long time.
-
donuts236727y@bkwilliams biggest question I guess is if I learn VS C++, can I easily switch to the Linux one or will it be like Python 2 vs 3, Angular vs AngularJS?
-
@billgates only the OS calls will differ wildly. But things like Boost http://boost.org/doc/libs/... have headers for both OSs.
-
...
*cough* Win32 API/MFC (rofl) vs GTK+/QT (gtk - I mean ofc bindings, but what dumbass would be writing gtk apps in something but C/Vala)
*another, longer, cough* but std is pretty much same
*COUGH* also POSIX, but that's matters of C, not cpp -
They are the same in that they implement the standard. For the most part you can learn VS C++ and/or Linux c++ and use them interchangeably, but you might need to recompile to use it in different environments. But vs can compile c++ to be cli(clr?) compliant which I don't believe works on Linux, but not sure much anymore.
-
@projektaquarius CLR programming is a different thing though. And no, Mono afaik doesn't support C++
-
From my experience, code working on Linux will always be working on VS. If you use the visual studio compiler you kinda have more freedom (you can interpret paths both with / or \ while linux compilers like g++ only interpret /) or for example you can have in the same class definition functions defined with their class namespaces (unnecessary): VS will automatically fix that in compiling while g++ will throw an error.
I don't recall if Intel's compiler is closer to g++ or to vsxxx.
So based on my experience if you learn to code the way g++ wants you to do you can just work on VS and be kinda assured it will work on Linux. I suggest looking into makefiles if you are not confident (which VS Can help you write) in order to have a quick way to compile and run it in a Linux environment for testing. -
D--M22667ySimple answer: it's the same.
The only thing that changes is OS specific calls. (Which for 90% of your learning you dont actually care about.)
You can specify which compiler you want to use in visual studio... but there's no point unless you are developing cross platform. -
pain... sufferring... anguish... and finally capitulation... :) for c++ on cygwin :)
-
@isaacWeisberg it is but visual studio has an option that will let your c++ run managed and compliant with the CLR.
So looking to get started on c++ but have a noob question.
Is there a difference between c++ in Linux vs Visual Studio C++...
kinda don't want to install a Linux OS/cygwin to do it, takes too much space
question