Codelite For Mac

CodeLite is a free, open-source, cross-platform IDE for the C/C programming languages using the wxWidgets toolkit. To comply with CodeLite's open-source spirit, the program itself is compiled and debugged using only free tools ( MinGW and GDB ) for Mac OS X, Windows, Linux and FreeBSD, though CodeLite can execute any third-party compiler. I had this issue from the beginning when i got Codelite. I could not debug from the start. I use Codelite 12.0. Failed to locate gdb! At 'gdb' it says when i,m trying to debug. I was searching for a solution and the ordinary tip is to use the LLDB debuger for Mac OS.

CodeLite is an open source, free, cross platform IDE for the C/C programming languages which runs best on all major Platforms. To comply with CodeLite's open source spirit, the program itself is compiled and debugged using only free tools (MinGW and GDB) for Mac OS X, Windows, Linux and FreeBSD, though CodeLite. 1) CLION – Best C IDE for Mac. One of the famous company JetBrains has developed Clion. It is one of the best IDE to compile and run c /c codes. It has a smart editor and embedded terminal. It has various languages and standard such as C11, libc,JavaScript, boost, HTML, CSS and XML.

Below is a list of all IDEs that have been known to work with wxWidgets. Please keep discussion of the various IDEs listed here on the discussion page. See the Tools page for other RAD tools (XRC editors, dialog designers, etc) that don't have support for building/compiling.


Cross-platform

CLion Commercial C / C++ integrated development environment from JetBrains Software. CLion utilizes a CMake build system.
  • Tutorial - A quick-start guide to configuring CMake and compiling wxWidgets' samples with CLion.
Code::Blocks An open-source cross-platform C/C++ IDE written in wxWidgets. Its pluggable architecture enables it to be extended easily by the use of external plugins (most of its functionality is provided by plugins). Supported compilers are GNU GCC, MS Visual C++ Free Toolkit 2003, Digital Mars, and Borland C++ Compiler 5.5.
  • wxSmith - A wxWidgets RAD plugin for Code::Blocks.
CodeLite Open-source, cross platform (Windows, Linux & Mac OS) C/C++ IDE written with wxWidgets and released under the GPL license. Features context sensitive help, auto-completion, refactoring, and a full debugging GUI. CodeLite is based on plugins so it can be extended very easily.
  • wxCrafter - A free wxWidgets RAD plugin for codelite
DialogBlocks Commercial dialog editor for wxWidgets from Anthemion Software Ltd. written by wxWidgets developer Julian Smart. Besides being a RAD tool with C++ and XRC support, it also supports most common compilers and can generate makefiles and MSVC project files.
Eclipse with its CDT (C/C++ Development Tools) project (see the C/C++ development with the Eclipse Platform article at developerWorks).
NetBeans C/C++ Development Pack Sun's answer to eclipse. Open-Source (CDDL). Supports at least GNU GCC and suncc (Sun Studio Compiler).
MinGW Developer Studio IDE for Linux and MinGW ports of the GNU GCC compiler.
SPE (Stani's Python Editor) Python IDE with wxGlade integrated, and Blender support.

Windows Only

Borland C++ Builder Borland's commercial IDE
  • wxForms - Proprietary RAD plugin for Borland / Code Gear C++ Builder. $30-$50 single-user license. Works with the free C++ Builder 6.0 Personal Edition.
Dev-C++ Free IDE that works well with wxWidgets and MinGW.
  • wxDev-C++ - Extension for Dev-C++ with built-in form designer for wxWidgets.
Microsoft Visual C++ Microsoft's Visual C++ (some editions are free)
  • Some tips & tricks for MS Visual Studio (6 and .NET) from wxVisualSetup which can help fix autocomplete problems with wxWidgets.
  • Visual Studio Express 2008 download is here: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a22341ee-21db-43aa-8431-40be78461ee0
  • Unofficial project wizards:
    • internal wizards: wxWinWizard, wxWinWizDotNet, wxVCExpressIntegration, wxVisualIntegration
    • external: wxWiz
  • wxVS2008Integration - Proprietary wxWidgets Project wizard and Plugin for Visual Studio.NET 2008.
VisualWX Freeware IDE and RAD tool with support for MinGW, C++, wxPython, wxPerl, wxRuby, and wxLua.
Philasmicos Entwickler Studio Proprietary IDE written by Philasmicos. Free home edition available. German-speaking support (Forum DE/EN). Works well with wxWidgets and MinGW.
Zeus IDE Proprietary C/C++ IDE for Windows. Can be configured to do wxWidgets code completion and class browsing.

Mac OS Only

XcodeApple's official IDE for Mac OS X.

Linux Only

Anjuta Open-source IDE built on GTK.
CodeForge Proprietary IDE, $295 for commercial use, $95 for private use.
KDevelop Open-source IDE built on Qt.

External Links

  • IDEs for Linux - Rick Moen's list of Linux IDEs.
  • TextEditors - List of text editors, some of which have IDE like power.
Retrieved from 'https://wiki.wxwidgets.org/index.php?title=List_of_Integrated_Development_Environments&oldid=11563'

Codelite Mac 10.7

In my previous post I described how Retro68 can be used to compile 68K Macintosh apps from your modern Linux distribution and also explored how Retro68 together with CodeLite and pce/macplus emulator can form a very good 68k development environment. In this post, I will provide the details of how such a development environment can be created based on Ubuntu, a common Linux distribution. For those who do not have the time to set up everything from scratch, towards the end of the post I will also provide links to download a VirtualBox image with Retro68, CodeLite, pce/macplus and other necessary components in a single Ubuntu installation.

Pre-requisites

Before we start, you should already have Retro68, pce/macplus and optionally Basilisk II installed on your preferred Linux distribution, for example by using sudo apt-get install basilisk2 and sudo apt-get install codelite. Although any version of CodeLite will work for our purposes, if you have the time, try to install CodeLite from the latest source code as some older versions of CodeLite might have autocompletion issues which will manifest when used with the Retro68 SDK.

Preparing the build environment

As our objective is to be able to compile and run Retro68 apps within CodeLite, preferably with some debugging support, the first task is to write bash scripts to automate various tasks. For our purposes, we only need the following scripts (refer to the download links at the end of the article for the complete source code):

  • build.sh: build the specified project
  • build_and_run.sh: build the specified project and runs in in the specified emulator. This script will call build.sh and once done, start the selected Mac OS emulator.
  • clean.sh: remove all build output for the selected project.

Building Retro68 apps as well as starting the pce/macplus emulator from command line is trivial. However, there is a challenge of copying the compiled executable to the selected emulator, to be started by the user once the emulator has finished booting. Fortunately, Retro68 produces build output in both BinHex (.BIN) or 800k disk image (.DSK). You can simply rename the .DSK output to .image and mounted it as a 800k floppy drive with pce/macplus. Alternatively, you can use hformat, hmount and hcopy, part of the hfsutils package, to create a HFS disk image with the .BIN file as well as any other input files from your application, and mount it with pce/macplus. The HFS image will appear as a Hard Disk 20 disk drive and can be read on the Macintosh Plus and later with the stock ROM, or on a Macintosh 128K/512K with the Macintosh Plus ROM.

Our first CodeLite 68k project is now ready to be created. We will use CodeLite’s C++ template and add different project configuration for different types of Mac OS emulators:

For each project configuration, we will configure our bash scripts under Workspace > Open Active Project Settings. In General settings, configure the script to build and run the project with our selected emulator:

The parameters for our build_and_run.sh script indicates the project to be built and the emulator to run it on, which need to be specified correctly in program arguments. The working directory also needs to be set correctly. Remember to tick “This program is a GUI application” otherwise the emulator won’t start. Under Customize > Custom Build, specify the command to build and run the project:

Under Code Completion, specify the path to the Macintosh Programmer’s Workshop C headers, in particular the CInludes and RIncludes folders, for autocomplete to work:

These folders will also need to be specified under Global Settings > Additional Include Paths:

Also add these folders to Settings > Code Completion > CTags > Search Paths:

As MPW uses .r files that are written in a language similar to C, for dialog resources, we should also add *.r in the list of C++ file extensions. You can do this in Settings > Colours and Fonts > Customize > C++:

Of course you might also want to tweak autocompletion and other editor settings to suit your needs. Repeat the above steps for each of the project configuration and remember to change the command line parameters to indicate the Mac OS emulator to run the project on. Once done, choose Workspace > Parse Workspace and restart CodeLite. You will notice that method signatures can now be detected and autocomplete can work:

With this setup, common CodeLite tasks such as build, run and clean should now work properly. The following screenshot shows CodeLite running the MenuSample example on System 6.0.8 under pce/macplus:

The MenuSample app can be started from the emulated Test Apps disk:

To get pce/macplus to boot from the existing hard disk with System software and not from the HFS disk we created with just the compiled code, it is important to set a value of around 3-5 seconds for the insert_delay parameter in pce configuration. Otherwise, the emulator will attempt to boot from this HFS disk and fail since our HFS disk is obviously not bootable.

Adding debug support

Codelite For Mac Mojave

There is some support for debugging in pce/macplus, but its integrated debugger can only work at assembly language level and will not suit our purposes. And although Retro68 produces GDB debug symbols, making use of these symbols to debug our 68K apps via pce/macplus will not be trivial due to the emulation layer involved. The only simple way I can think of is to write debug messages to the Macintosh serial port, and configure redirection of serial output to a text file on disk. This can be done using the following configuration entry:

The above configuration will redirect all serial output to a file named serial.out on disk. Writing to the serial port from pce can then be done with the following code:

There are usually two serial ports on vintage Macintosh computers, modem port and printer port. On our pce/macplus emulators, preferably you should reserve the modem port for networking and use the printer port to output debug messages. CodeLite can also be set to ‘tail’ the serial output file to monitor debug messages:

CodeLite, Retro68 and pce/macplus as a VirtualBox image

You can download a VirtualBox image with Retro68, CodeLite, pce/macplus and other necessary components in a single Ubuntu installation here. The 10GB ZIP file has been split into 10 parts, which can be joined using a tool such as FFSJ. The username is macdev and password is macdev. Retro68 is installed in the Documents folder, together with the HelloWorld, MenuSample and Dialog examples adapted for use with CodeLite. Basilisk 2 emulator is also installed with System 7.6 disk image. I have also included original MPW 3.1 and MPW 3.5 header files as well a copy of Inside Macintosh, which is a must-read for anyone serious about 68k Macintosh programming.

All pce/macplus instances installed in the Mac OS Emulators folders are ready for use with CodeLite. The System 6.0.8 instance also contains MacTCP and other useful network utilities. By using the included Fetch, you can also transfer files between the System 6.0.8 instance and the Ubuntu host, which has vsftpd installed. To allow Internet access from the TUN interface, I have also enabled IP masquerade on the LAN interface for TUN traffic with the following command:

The scripts mentioned in the article can be found in the Retro68kApps folder. There is also a create_tun.sh script to create a tunnel that can be used with pce (after updating the interface name and IP address to reflect your network configuration). If TUN doesn’t work for you, you can also use start_ppd.sh and start_tty0tty.sh to emulate a PPPD server instead.

When running on VirtualBox, sometimes you will not be able to open Settings > Displays to change the resolution. If this happens, you can use something like xrandr -s 1366×768 to set the preferred resolution. VirtualBox mouse integration should be disabled under Input > Mouse Integration menu, otherwise the mouse will move erratically inside the Mac OS emulators.

Codelite Mac Os X

Mac

The following YouTube video, captured using VirtualBox, demonstrates how everything we set up can work together to form a custom 68k development environment:

For those who do not want to download the entire VirtualBox image, a ZIP file with just the CodeLite projects, bash scripts and a soft copy of Inside Macintosh, can be downloaded here.

See also

Codelite Macros

Exploring Retro68 GCC-based SDK for 68K Macintosh computers
PCE/macplus, the ultimate 68K Macintosh emulator