Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Visual Studio is a platform Independent??

Reply
Thread Tools

Visual Studio is a platform Independent??

 
 
James Kanze
Guest
Posts: n/a
 
      03-29-2007
On Mar 28, 8:09 pm, SasQ <(E-Mail Removed)> wrote:
> Dnia Tue, 27 Mar 2007 10:02:11 +0200, Ivan Vecerina napisa³(a):


> > You cannot use Visual Studio to compile applications for other
> > desktop platforms.
> > If you write your source code carefully, and only use standard
> > C++ and cross-platform libraries, the code that you write
> > with Visual Studio can be compiled and used on another platform.


> But what about C++ runtime and C++ implementation?


What about them? I have a lot of C++ code which works under
Solaris (Sparc), Linux (PC) and Windows (PC). Including some
complete "applications". As Ivan said, if you use only standard
components and cross-platform libraries, there's no reason why
it won't work. (I actually develop mostly under Unix, and port
to Windows, but there's no reason why the other direction won't
work just as well.)

> What about
> executable formats?


What about them? C++ almost always compiles to directly
executable code, which is platform specific. He'll obviously
have to recompile with a native compiler for each platform.

> Portable libraries isn't enough. Is VS linker
> able to produce executables for Linux? [ELF] Is it able to use
> other runtime C++ implementations than "MSVCRT & Co."?


Ivan clearly said that you have to rebuild your application for
each platform. You don't use VC++ to build for Linux, any more
than you'd use g++ to build a native application for Windows.
(In the case of g++, you can, of course, but VC++ works much
better on that platform.)

> I think better for OP is to use GCC, because of its port for
> Windows platform [MinGW and Win32 binutils].


My experience is that it is less well integrated into the
Windows environment, and that it is better to use VC++ under
Windows, g++ under Linux, and often, the native C++ compiler
under other Unices (although g++ sometimes has the edge there).

I would take a hard look at the build environment. I don't
think that a Visual Studios project is directly exportable, and
I'm not sure if their makefiles are compatible with anything
else. I find makefile compatibility to be a serious problem,
and I do install GNU make everywhere, originally for portability
reasons, but I've gradually come to use its more complex
features to create a complete build system. Similarly, I've
never written a real application where there wasn't some
automatically generated code, generally using AWK, so I'll also
install a Unix look-alike toolkit (MSys, or possibly UWin).

> Even on Linux
> it's impossible to use one compiler front-end to generate code
> for Windows


G++ uses the same front-end for all of its platforms.

> - one have to have separate binutils, compiler
> front-end and rutime library for Windows to generate Windows
> executables on Linux [it's called "cross-compiling"].


> I doubt MSVS could cross-compile for other platforms than Windows.


Visual Studios isn't sold as a cross-compiler.

--
James Kanze (GABI Software) email:(E-Mail Removed)
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

 
Reply With Quote
 
 
 
 
Marc Zinck
Guest
Posts: n/a
 
      03-29-2007
> Is there any chance of using my application created by vc in MAC or
> Linux.


I have been succesfully developing cross-platform applications for a
number of years (Linux/Windows and on good days Mac) using the
following tools and libraries:

Compiler: g++ / Visual Studio
Build system: Custom on linux & Mac / Visual Studio standard solution
for Win32
Source Control: Subversion
User Interface: FLTK (http://www.fltk.org/)
3d/2d graphics: OpenGL (www.opengl.org, www.nvidia.com, www.ati.com)
OpenGL extentions interface: Glew (http://glew.sourceforge.net/) /
Glee (http://elf-stone.com/glee.php)
Light weight Opengl API Interface(fltk also provides an Opengl
Context): GLUT (http://www.xmission.com/~nate/glut.html)
Threading : pthreads / pthreasWin32 (http://sourceware.org/pthreads-
win32/)
Dynamic Loading, runtime loading of shared objects/Dll's : libtools
http://www.gnu.org/software/libtool/manual.html & a custom libtools
for win32

You may also want to investigate other options such as cygwin(http://
cygwin.com/) and mingw(http://www.mingw.org/). Both provide Unix like
environments under Windows. Cygwin is heavy and full featured, mingw
is more light weight.

Good luck

Marc

 
Reply With Quote
 
 
 
 
Ivan Vecerina
Guest
Posts: n/a
 
      03-29-2007
"SasQ" <(E-Mail Removed)> wrote in message
news(E-Mail Removed)...
: I doubt MSVS could cross-compile for other platforms than Windows.

I'm pretty sure that the Microsoft XBox (1 & 360) development
environment is based on Visual Studio.

MSVS can use pluggable compilers, just as any other environment -- but
of course with a limited, Microsoft-driven selection.

--
http://ivan.vecerina.com/contact/?subject=NG_POST <- email contact form

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is Visual Studio 2005 complict with Visual Studio 2003 rockdale ASP .Net 1 08-23-2006 07:20 PM
Should I write Visual studio 2005 or Visual studio 2003 MCSD =?Utf-8?B?VmlqYXk=?= Microsoft Certification 14 06-30-2006 09:05 AM
Is Visual Studio Team System and Visual Studio Foundation Server are same?. Thirumalai ASP .Net 0 05-22-2006 08:48 AM
visual studio .net 2003 verses visual studio .net 2002 wh ASP .Net 2 01-16-2004 04:54 PM



Advertisments