Summary
Key Points:
Nguyên văn
You have been permanently redirected here from the old URL (https://www.vanirsystems.com/danielsblog/2008/01/02/mac-os-x-mono-eclipse-and-virtuoso/).
The StepsTo get:
Mono set up on Mac OS X
a Mono Environment working through Eclipse (on Mac OS X)
Hello World in C# working on Mono on Mac OS X via Eclipse
To build the OpenLink Software VirtuosoClient.NET to work through Mono as setup above: https://virtuoso.openlinksw.com/wiki/main/Main/VOSBldMono
Play with the build developed in (4)
The structure
In this post I’ll be going through steps 1,2 and 3. So we should have a simple running “Hello, World!” application developed in C#, via Eclipse, on Mac OS X.
My setup
So just so you know my setup:
Hardware: Apple MacBook, 2GHz Intel Core 2 Duo, 1GB RAM
Software: Mac OS X 10.5.1, Mac OS X Developer tools (XCode, GCC etc…. its available on the Leopard DVD), Eclipse IDE
But this should work on Mac OS X 10.4.x and other Apple models.
Step 1: Setup Mono on Mac OS X
Quite a simple step.
Download is available: https://www.mono-project.com/Downloads
Simply download the .dmg, open it up, and run the installer. Done, mono has been installed.
To test, go to Terminal and type:
mono --version
and you should get something like:
Copyright (C) 2002-2007 Novell, Inc and Contributors. www.mono-project.com
TLS: normal
GC: Included Boehm (with typed GC)
SIGSEGV: normal
Notification: Thread + polling
Architecture: x86
Disabled: none
Bingo! It has been installed.
Step 2: A Mono Environment working through Eclipse
I had a look at some of the Eclipse plugins, and I couldn’t find anything better than the Emonic Plug-in.
The Emonic Plug-In website is available: https://emonic.sourceforge.net which contains a load of documentation and information about the plug-in and how to use it. It is easy to install through the Eclipse Update System (Emonic update site: https://emonic.sourceforge.net/updatesite/ovh/site.xml ). Quick run through: Help > Software Updates > Find and Install > Search for New Features to Install > New > Input a name and the Update site > Finish.
Once that has been installed and Eclipse has restarted you should be able to go:
Window > Open Perspective > Other > .NET
And we are now in Mono/.NET mode. We aren’t quite setup though, you’ll need to go into preferences:
Eclipse > Preferences > .NET > Installed Frameworks
Right, now hop out of Eclipse for the moment… turn to Terminal and type:
which mono
You should get a response something like:
/usr/bin/mono
This is what you will need to put into Eclipse, so copy it and then come back to Eclipse. Click the “add” button, and Paste what you copied into the Framework Home Directory text box, delete mono off of the end because you need to put “mono” into the Framework Name text box. So my implementation looks like:
Framework Name: mono
Framework Home Directory: /usr/bin/
Click OK, and there we have it. Mono through Eclipse is now setup. Not too hard really.
Step 3: A C# Hello World, via Eclipse, on Mac OS X
3.1: New Project
In Eclipse:
File > New > .NET Project
Then add the Project Name: HelloWorld.
Change the Target Framework to Mono-2.0 (lets use the newest version).
Click Finish.
3.2: New Source File
Control-Click (or Right-Click if you have a 2 button mouse) on the src folder of your new project. Go: New > C# Class.
Put both the name and target name as: HelloWorld
Click Finish
3.3: The Hello World Code
In your new file make it looks like:
class HelloWorld{
static void Main()
{
System.Console.WriteLine("Hello, world!");
}
}
Save it, open up the bin folder in Eclipse… and you’ll see:
HelloWorld.exe
That is our Mono application. You can run it by Control-Click (or right-click) > Run As > .NET Application. Your result is:
Hello, World!
Quan điểm mới
Nhớ lại cách đây vài năm, khi tôi viết bài hướng dẫn này, cảm giác lúc đó thật sự rất thú vị. Lúc đó, tôi đang khám phá cách tích hợp Mono với Eclipse trên Mac OS X, và cảm thấy như mình đang mở ra một thế giới mới. Tôi nhớ rõ cái cảm giác hồi hộp khi từng bước cài đặt Mono, rồi tìm cách để nó hoạt động trơn tru trong Eclipse. Đó là một quá trình vừa thử thách vừa đầy hứng khởi.
Tôi cũng nhớ lúc tìm kiếm plugin phù hợp cho Eclipse. Emonic là lựa chọn tốt nhất lúc đó, và việc cài đặt nó cũng khá suôn sẻ. Cảm giác khi thấy mọi thứ hoạt động đúng như mong đợi, từ việc tạo project đến chạy chương trình "Hello, World!" đầu tiên, thật sự rất đã. Nó giống như một chiến thắng nho nhỏ trong hành trình coding của mình.
Bài viết đó không chỉ là một hướng dẫn kỹ thuật, mà còn là một phần kỷ niệm của tôi. Tôi viết nó với hy vọng giúp đỡ những người khác đang gặp khó khăn tương tự, và cũng để ghi lại những gì mình đã học được. Đến giờ nghĩ lại, tôi vẫn cảm thấy vui vì đã chia sẻ kiến thức của mình, dù đó chỉ là một bài viết nhỏ.
Có lẽ, điều tôi thích nhất là cảm giác khi thấy mọi thứ hoạt động trơn tru, từ câu lệnh đầu tiên trong Terminal đến kết quả "Hello, World!" hiện lên trên màn hình. Nó nhắc nhở tôi rằng, dù công nghệ có phức tạp đến đâu, chỉ cần kiên nhẫn và từng bước một, chúng ta đều có thể làm được.
Nếu có cơ hội, tôi vẫn muốn quay lại và viết thêm những bài như thế này. Không chỉ để chia sẻ kiến thức, mà còn để lưu giữ lại những khoảnh khắc đáng nhớ trong hành trình của mình.
Extended Perspectives Comparison:
Reference Articles
Chuyên đề bồi dưỡng học sinh giỏi THPT theo chủ đề kèm ...
Chuyên đề bồi dưỡng học sinh giỏi THPT theo chủ đề kèm bài tập (có đáp án) cho sinh viên tham khảo, ôn tập chuẩn bị cho kì thi sắp tới. Mời bạn đọc đón xem!
Source: docx.com.vnvocab.txt
... và của các có là trong cho được với đã người không công một [UNUSED_252] ... Văn triệu điện tỷ mặt đổi lần quyền phố nhiên thủ trung chế bằng ảnh đoàn ...
Source: Hugging FaceUnboxing Jhin's Gaming Setup in League of Legends
Source: TikTok · Tử DuSan Diego Public Library
Call #. Author. Title. FIC/ABRAMS. Abrams, Douglas Carlton. The lost diary of Don Juan. FIC/ADDIEGO. Addiego, John. The islands of divine music. FIC/ADLER.
Source: City of San Diego (.gov)
Related Discussions