Cross Platform Compliling

I

inkexit

What all does it take to compile a program written with visual studio
2003 as a Mac .exe and a linux .exe. Since OS X runs a form of unix
now, do I only have to worry about creating a unix .exe. If so, would
a Mac user have to open a unix console on OSX, or would the program run
automatically on any OSX Mac with an autostart on an inserted CDR?
Does Mac have an atuostart feature?
 
A

Andre Kostur

(e-mail address removed) wrote in @o13g2000cwo.googlegroups.com:
What all does it take to compile a program written with visual studio
2003 as a Mac .exe and a linux .exe. Since OS X runs a form of unix
now, do I only have to worry about creating a unix .exe. If so, would
a Mac user have to open a unix console on OSX, or would the program run
automatically on any OSX Mac with an autostart on an inserted CDR?
Does Mac have an atuostart feature?

Two items:

1) There's no C++ question in there... (which makes it off-topic for this
group)

2) Depends on what your application is doing. Does it use anything that
isn't Standard C++ (like anything resembling a graphical display?). If so,
you'll need to look for cross-platform libraries to perform those
functions....
 
V

Victor Bazarov

What all does it take to compile a program written with visual studio
2003 as a Mac .exe and a linux .exe. Since OS X runs a form of unix
now, do I only have to worry about creating a unix .exe. If so, would
a Mac user have to open a unix console on OSX, or would the program
run automatically on any OSX Mac with an autostart on an inserted CDR?
Does Mac have an atuostart feature?

You definitely need to ask in a newsgroup dedicated to the OS in which
you are going to use your executable (Mac OS?). I know that there are
libraries allowing you to create the same source code program that can
be then recompiled/relinked to run natively on different other systems,
but it has nothing to do with cross-compiling.

V
 
V

Viktor Prehnal

What all does it take to compile a program written with visual studio
2003 as a Mac .exe and a linux .exe. Since OS X runs a form of unix
now, do I only have to worry about creating a unix .exe. If so, would
a Mac user have to open a unix console on OSX, or would the program run
automatically on any OSX Mac with an autostart on an inserted CDR?
Does Mac have an atuostart feature?
wow, that's soft of complex topic. it depends what you use in your
program. standard c++ should not have problems, if you use intensivaly
templates, you may come accross problems if you use MFC and so on, you
have no chance to compile it on Linux, Mac.....
 
P

PINTS

You need to choose the compiler/editor for the different Os, like on
MAC you could use the one that is shipped with MAC OS X, XCode or use a
paid software CodeWarrior. And as others said if you have any
libariries that you use, you have to find cross platform versions for
them, like if you are using STL you have to use a version called
STLPort which behaves the same way on WIN and MAC.

Also for OS specific API's you either use a cross platform library or
write conditional code like the following,
#if MACOS
---- call MAC API
#else if WINOS
---- call WIN API
endif
 
D

deane_gavin

PINTS said:
You need to choose the compiler/editor for the different Os, like on
MAC you could use the one that is shipped with MAC OS X, XCode or use a
paid software CodeWarrior. And as others said if you have any
libariries that you use, you have to find cross platform versions for
them, like if you are using STL you have to use a version called
STLPort which behaves the same way on WIN and MAC.

No you don't. As long as you use a conforming compiler there is
absolutely no need to use the same vendor's implementation of the
standard library for each different platform. That is the whole point
of the standard library.

Gavin Deane
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top