go run main.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.16) | |
project(CppGoExample) | |
set(CMAKE_CXX_STANDARD 17) | |
set(CMAKE_CXX_STANDARD_REQUIRED ON) | |
# Go library configuration | |
set(GO_SOURCE_DIR "${CMAKE_SOURCE_DIR}/go") | |
set(GO_OUTPUT_DIR "${CMAKE_BINARY_DIR}/go") | |
set(GO_LIB_NAME "golib") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:22.04 | |
USER root | |
ENV DEBIAN_FRONTEND=noninteractive | |
ENV TIME_ZONE=Asia/Shanghai | |
RUN apt update -y && \ | |
apt install -y apt-transport-https ca-certificates curl && \ | |
apt install -y inetutils-ping net-tools openssh-server perl telnet tzdata vim && \ | |
ln -snf /usr/share/zoneinfo/$TIME_ZONE /etc/localtime && echo $TIME_ZONE > /etc/timezone && \ | |
echo "dash dash/sh boolean false" | debconf-set-selections && \ |
NewerOlder