Git Product home page Git Product logo

ansi-c's Introduction

ANSI C

Build Status License Hits-of-Code

The exercises are taken from the book The C Programming Language.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

  • TinyCC
  • CMake
  • Make or NMake

Installing

Check your software for your operating system.

Linux

You should install TCC. For example, you will enter the following command in terminal if you use package manager pacman:

$ sudo pacman -S tcc

To check version of TCC enter $ tcc -vv in terminal. The output of the command would be something like this:

tcc version 0.9.27 (x86_64 Linux)
install: /usr/lib/tcc
include:
  /usr/lib/tcc/include
  /usr/local/include
  /usr/include
libraries:
  /usr/lib64
  /lib64
  /usr/local/lib64
libtcc1:
  /usr/lib/tcc/libtcc1.a
crt:
  /usr/lib64
elfinterp:
  /lib64/ld-linux-x86-64.so.2

You should install CMake. For example, you will enter the following command in terminal if you use package manager pacman:

$ sudo pacman -S cmake

To check version of CMake enter $ cmake --version in terminal. The output of the command would be something like this:

cmake version 3.14.5

CMake suite maintained and supported by Kitware (kitware.com/cmake).

You should install Make. For example, you will enter the following command in terminal if you use Arch Linux:

$ sudo pacman -S base-devel

But, you should enter other command in terminal if you want to install Make directly:

$ sudo pacman -S make

To check version of Make enter $ make --version in terminal. The output of the command would be something like this:

GNU Make 4.2.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Windows

You should install TCC. You can download binary from TCC offical site and install it. After installation TCC you should add a path to tcc.exe to the system variable PATH. To check version of TCC enter > tcc -vv in command prompt. The output of the command would be something like this:

tcc version 0.9.27 (x86_64 Windows)
install: c:/tcc
include:
  c:/tcc/include
  c:/tcc/include/winapi
libraries:
  c:/tcc/lib
  C:/WINDOWS/system32
libtcc1:
  c:/tcc/libtcc1-64.a

You should install CMake. You can download binary from CMake offical site and install it. After installation CMake you should add a path to cmake.exe to the system variable PATH. To check version CMake enter > cmake --version in command prompt. The output of the command would be something like this:

cmake version 3.15.0-rc2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

You should install NMake. The Microsoft Program Maintenance Utility (NMAKE.EXE) is a command-line tool included with Visual Studio ... So, you can download the Visual Studio Community and install it. After installation Visual Studio Community you may install only MSVC component. Now, you should open Developer Command Prompt for example, x86_64 Cross Tools Command Prompt for VS 2019. To see help for NMake enter > nmake /? in the opened command prompt. The output of the command would be something like this:

Microsoft (R) Program Maintenance Utility Version 14.21.27702.2
Copyright (C) Microsoft Corporation.  All rights reserved.

Usage:  NMAKE @commandfile
        NMAKE [options] [/f makefile] [/x stderrfile] [macrodefs] [targets]

Options:
...

Deployment

After fetch this repository create following folders at the same level:

Linux

Pass into the folder build. Type the following command in terminal to generate files for Make:

$ cmake ../ansi-c

Type the following command in terminal to build from Makefile:

$ make
Windows

Open Developer Command Prompt for example, x86_64 Cross Tools Command Prompt for VS 2019. Pass into the folder build from opened command prompt. Type the following command in terminal to generate files for NMake:

> cmake ..\ansi-c -G "NMake Makefiles"

Type the following command in terminal to build from Makefile:

> nmake

Now, you can find executable files in the folder bin.

Built With

Author

  • Alexandr Rihtarich - Initial work - Rihtarich

License

This project is licensed under the MIT License - see the LICENSE.md file for details

ansi-c's People

Contributors

richterich avatar

Stargazers

 avatar Soundarya G avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.