473,322 Members | 1,501 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Build Application For Macintosh

Hi Everyone,

I've been approached to develop an application that will run on Windows as
well as Apple Macintosh platforms. Being primarily a C/C++ programmer I would
prefer to use this language. I was hoping to use Visual C++ 2003 and build
the application for both platforms.

Is this possible? If so, what additional tools will I require?

Thanks heaps for any advice or direction
Nov 17 '05 #1
8 1438
>I've been approached to develop an application that will run on Windows as
well as Apple Macintosh platforms. Being primarily a C/C++ programmer I would
prefer to use this language. I was hoping to use Visual C++ 2003 and build
the application for both platforms.

Is this possible? If so, what additional tools will I require?


Back in MFC 4 days (I think), MS did have some support for building
MFC apps for the Mac. However, as far as I know, it's long been
abandoned. The best plan may be to isolate as much platform specific
code so your common C++ code is simply re-compiled for different
platforms, and if you want to try to keep common code for the UI
aspects, try a toolkit such as: http://www.wxwindows.org/

Dave
Nov 17 '05 #2
> Back in MFC 4 days (I think), MS did have some support for building
MFC apps for the Mac. However, as far as I know, it's long been
abandoned. The best plan may be to isolate as much platform specific
code so your common C++ code is simply re-compiled for different
platforms, and if you want to try to keep common code for the UI
aspects, try a toolkit such as: http://www.wxwindows.org/

Dave


Thanks Dave for you prompt reply and also directing my towards wxWidgets. I
heard that a while ago MS released "Visual C for Mac" which was a win32 app
and compiled mac binaries. Is there a compiler currently available that will
do this? Or will I need to invest in a product for Mac?

Thanks again.
Nov 17 '05 #3
KwiGibo wrote:
Hi Everyone,

I've been approached to develop an application that will run on Windows as
well as Apple Macintosh platforms. Being primarily a C/C++ programmer I would
prefer to use this language. I was hoping to use Visual C++ 2003 and build
the application for both platforms.

Is this possible? If so, what additional tools will I require?

Thanks heaps for any advice or direction

In the .NET world you can use Mono in Macintosh or even in Windows!

CLI Virtual Machines

..NET framework (Windows): http://msdn.microsoft.com/netframework

Mono (GNU/Linux, Unix, Mac OS X and Windows): http://www.mono-project.com

DotGNU (GNU/Linux, Mac OS X, Windows): http://www.gnu.org/projects/dotgnu

However current VC++ doesn't produce completely verifiable managed code, so C++ managed
code can not run as it is (the same .exe) under other CLI machines. Upcoming VC++ will be
able to produce 100% verifiable code with a new compiler option /clr:safe.
Currently if you use VB and VC#, you can make GUI programs that run in both platforms.
Mono also provides a C# compiler of its own.

Also Mono, apart from providing much of the same API of .NET for compatibility with .NET,
provides additional managed APIs of its own, like GTK#. So for example you can install
Mono in your Windows clients, and use GTK#. Or if your main targeting is .NET, you can use
..NET APIs and have your applications run under .NET in Windows and Mono under Linux, Mac
OS X and whatever else, with the same .exe. Of course, you can also install Mono alone
everywhere and use the .NET APIs that are provided by Mono and have also your applications
running on all platforms that Mono supports. But I see no particular reason for that, I am
just mentioning various combinations.

Interesting possibilities indeed. :-)
However for C++, this will be only possible with the upcoming VC++ 2005 and later.
Nov 17 '05 #4
Ioannis Vranos wrote:
In the .NET world you can use Mono in Macintosh or even in Windows!

CLI Virtual Machines

.NET framework (Windows): http://msdn.microsoft.com/netframework

Mono (GNU/Linux, Unix, Mac OS X and Windows): http://www.mono-project.com

DotGNU (GNU/Linux, Mac OS X, Windows): http://www.gnu.org/projects/dotgnu

However current VC++ doesn't produce completely verifiable managed code,
so C++ managed code can not run as it is (the same .exe) under other CLI
machines. Upcoming VC++ will be able to produce 100% verifiable code
with a new compiler option /clr:safe.
Currently if you use VB and VC#, you can make GUI programs that run in
both platforms. Mono also provides a C# compiler of its own.

Also Mono, apart from providing much of the same API of .NET for
compatibility with .NET, provides additional managed APIs of its own,
like GTK#. So for example you can install Mono in your Windows clients,
and use GTK#. Or if your main targeting is .NET, you can use .NET APIs
and have your applications run under .NET in Windows and Mono under
Linux, Mac OS X and whatever else, with the same .exe. Of course, you
can also install Mono alone everywhere and use the .NET APIs that are
provided by Mono and have also your applications running on all
platforms that Mono supports. But I see no particular reason for that, I
am just mentioning various combinations.

Interesting possibilities indeed. :-)
However for C++, this will be only possible with the upcoming VC++ 2005
and later.

Of course you can install Mono in Windows and make applications that use additional Mono
facilities like GTK# with VC++ 2002/2003. But these will run on Windows only since VC++
2002/2003 place some native calls.
Nov 17 '05 #5
Ioannis Vranos wrote:
Of course you can install Mono in Windows and make applications that use
additional Mono facilities like GTK# with VC++ 2002/2003.

Actually I am not sure about this one, I guess the IDE must be set up to access the
additional Mono libraries.
Nov 17 '05 #6
>Thanks Dave for you prompt reply and also directing my towards wxWidgets. I
heard that a while ago MS released "Visual C for Mac" which was a win32 app
and compiled mac binaries. Is there a compiler currently available that will
do this?


I'm not aware of one.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
Nov 17 '05 #7
KwiGibo wrote:
Back in MFC 4 days (I think), MS did have some support for building
MFC apps for the Mac. However, as far as I know, it's long been
abandoned. The best plan may be to isolate as much platform specific
code so your common C++ code is simply re-compiled for different
platforms, and if you want to try to keep common code for the UI
aspects, try a toolkit such as: http://www.wxwindows.org/

Dave


Thanks Dave for you prompt reply and also directing my towards
wxWidgets. I heard that a while ago MS released "Visual C for Mac"
which was a win32 app and compiled mac binaries. Is there a compiler
currently available that will do this? Or will I need to invest in a
product for Mac?


The compiler is the least of your worries. It's the libraries and the
significant differences in how your application interacts with the OS that
are a bigger concern.

Other vendors (e.g. Metrowerks) have compilers for both Windows and Mac -
you'd have to check with them to see if they have any cross-platform GUI
libraries, or if you have to use a thrid party/open-source library for that.

-cd
Nov 17 '05 #8
On Tue, 5 Apr 2005 00:39:01 -0700, "KwiGibo"
<Kw*****@discussions.microsoft.com> wrote:
Back in MFC 4 days (I think), MS did have some support for building
MFC apps for the Mac. However, as far as I know, it's long been
abandoned. The best plan may be to isolate as much platform specific
code so your common C++ code is simply re-compiled for different
platforms, and if you want to try to keep common code for the UI
aspects, try a toolkit such as: http://www.wxwindows.org/

Dave


Thanks Dave for you prompt reply and also directing my towards wxWidgets. I
heard that a while ago MS released "Visual C for Mac" which was a win32 app
and compiled mac binaries. Is there a compiler currently available that will
do this? Or will I need to invest in a product for Mac?


They did have one. I wasted a lot of money for it several years ago.
It cross-compiled for 68K & PowerPC on MacOS 7.1-8, and made simple
Windows code and resources work (somewhat) on Macs. There was a lot of
additional work required, though.

Microsoft used it for the Mac version of MS Office, and they continued
to upgrade the cross-compiler for internal use for a while after they
discontinued selling or supporting it. I doubt if they're still doing
it; it was pretty crappy.

Porting the GUI was OK, but resources were not stored as native Mac
resource. My ISO standard C modules compiled fine, but they are a
small percentage of my code.

Filesystem and database access essentially had to be done natively,
and there were many unsupported Win32 functions that had to be worked
around or coded natively. My code began to fill up with #ifdef MAC,
and I had to write several Mac-only modules.

Debugging was a nightmare. Mac OS did not have protected memory, so a
plain old application crash would usually bring the whole machine
down, like Windows 3.x. Rebooting took forever, even on a fast
machine.

I don't know a lot about other ways to port to Mac, but I've heard
decent things about WINE for porting to Linux, and it may work for Mac
OS X too.

--
Phillip Crews aka Severian
Microsoft MVP, Windows SDK
Posting email address is real
Nov 17 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Charles \Stretch\ Ledford | last post by:
Greetings, all. I'm trying to access a web page on my Macintosh, running OS-X. Using both IE and Safari browsers, I get the following message: "The Java Virtual Machine (JVM) installed on...
3
by: Roger Withnell | last post by:
My NavBar works with IBM/IE5.5 but does not work properly with Macintosh/IE5. The on page vertical NavBar has a button in each <td> The buttons are separated with a style="top:XXpx" in the td...
10
by: Douglas Buchanan | last post by:
I am using the following code instead of a very lengthly select case statement. (I have a lot of lookup tables in a settings form that are selected from a ListBox. The data adapters are given a...
1
by: Joerg | last post by:
I am in the process of creating an international GUI application with C# on ..NET1.1 (Win2k), which is supposed to implement a particular look/design. In order to achieve this, I plan amongst...
0
by: microcosmos | last post by:
We have developed a web-based "intranet" application using ASP.NET, C# and SQL Server 2000, session management with State Server. This application will not be used on internet, just an intranet...
1
by: Richard Ronnback | last post by:
I have an application that accepts opening various kinds of image files by dragging and dropping them on the application. Unfortunately, it is not a com-object, from what I can tell. Is there any...
3
by: Luqman | last post by:
Can we run Vb.Net Application on Apple Macintosh ? If so, what steps I have to take ? Best Regards, Luqman
9
by: dreamamit2001 | last post by:
Hi, I am new user to ASP.NET2.0? I would like to know can Macintosh users able to access ASP.NET 2.0 site ? I also want to know what are the features of ASP.NET2.0 which are not supported for...
16
by: Mathieu Maes | last post by:
I have developed a page with javascript which has a filmstrip look- alike bar and a slideshow: http://celtecbe.apache02.hostbasket.com/pdw/media.php?id=268 It uses a "onmousemove" event, which...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.