Outline
- Development environment setup
- Socket API reference (cheat sheet)
- Client/server C source template
- Lab exercises
Download Eclipse IDE for C/C++ Developers from http://www.eclipse.org/downloads/packages. Make sure to select the right package for your architecture and OS.
The installation steps for the GNU C Compiler (GCC) depend on your OS.
- Install Homebrew
- Install Xcode Command Line tools (without Xcode). If you have Xcode already installed, this step is likely unnecessary.
From the terminal, run the following and then select
Install:
$ xcode-select --install- Double-check that everything works by running:
$ gcc --version-
To configure the
lldbdebugger (Xcode own debugger), first launch Eclipse; then:- Go to Help > Install new Software
- Select the CDT update site (9.5 or greater) from the dropdown list
- Under CDT Optional Features, select C/C++ LLDB Debugger Integration
- From now on, for each project, right-click to show the context menu and select Debug as > Debug Configurations...; then, change or update the debug configuration from GDB to LLDB, as shown in the pic below.
- For more information, see the Official wiki support page.
- From the terminal, run:
$ apt install build-essential -y- Double-check that everything works by running:
$ gcc --versionUse command-line package managers, such as chocolatey or WinGet
From the command line, run:
> choco install mingw -yFrom the command line, run:
> winget install MSYS2.MSYS2Then, run MSYS2 to open the MSYS2 terminal and execute this command:
> pacman -S --needed base-devel mingw-w64-ucrt-x86_64-toolchainAfter installing MinGW, double-check that everything works by running in the Windows terminal:
> refreshenv
> gcc --versionThose who might have issues in setting up MinGW may instead install
the Windows Subsystem for Linux (WSL) and use gcc from the Bash shell, after also following the instructions above.
