Sign inSign up

openeuler/gcc

Sponsored OSS

By openeuler

Updated 4 months ago

Image
0

4.6K

openeuler/gcc repository overview

Quick reference

GCC | openEuler

Current GCC docker images are built on the openEuler. This repository is free to use and exempted from per-user rate limits.

The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Ada, Go, D, Modula-2, and COBOL as well as libraries for these languages (libstdc++,...). GCC was originally written as the compiler for the GNU operating system.

Learn more about GCC on GCC Website⁠.

The tag of each gcc docker image is consist of the version of gcc and the version of basic image. The details are as follows

TagCurrentlyArchitectures
16.1.0-oe2403sp4gcc 16.1.0 on openEuler 24.03-LTS-SP4amd64, arm64
16.1.0-oe2403sp3gcc 16.1.0 on openEuler 24.03-LTS-SP3amd64, arm64
15.1.0-oe2403sp1GCC 15.1.0 on openEuler 24.03-LTS-SP1amd64, arm64

Usage

In this usage, users can select the corresponding {Tag} based on their requirements.

  • Pull the openeuler/gcc image from docker

    docker pull openeuler/gcc:{Tag}
    
  • Run with an interactive shell

    You can start the container with an interactive shell to run your own code using gcc.

    docker run -it --rm openeuler/gcc:{Tag} bash
    
  • Example: A minimal gcc program

    Create a file named hello.c with the following content:

    // hello.c
    #include <stdio.h>
    
    int main() {
        printf("Hello from GCC %d.%d.%d\n",
               __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__);
        return 0;
    }
    
  • Compile the program: Use the new version of gcc to compile the program:

    /usr/local/gcc/bin/gcc hello.c -o hello
    
  • Run the program

    $ ./hello
    

Question and answering

If you have any questions or want to use some special features, please submit an issue or a pull request on openeuler-docker-images.

Tag summary

Content type

Image

Digest

sha256:540f49b51

Size

3.8 GB

Last updated

4 months ago

docker pull openeuler/gcc

This week's pulls

Pulls:

14

Last week