Skip to main content

compile c++ program with local g++/mingw compiler.

Project description

cpp_simple_interface

compile and run C++ executable in python with local compiler.

Install

pip install cpp-simple-interface

Usage

import cpp_simple_interface

# create test file
with open("a.cpp", "w") as fp:
    fp.write(
"""
#include <cstdio>
int main() {
    printf("hello world!");
    return 0;
}
""")

# compile test file
suc, msg = cpp_simple_interface.compile_cpp_files(["./a.cpp"], "./a.exe")
if not suc:
    print(msg)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cpp_simple_interface-0.1.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cpp_simple_interface-0.1.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file cpp_simple_interface-0.1.0.tar.gz.

File metadata

  • Download URL: cpp_simple_interface-0.1.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.13.12 Windows/11

File hashes

Hashes for cpp_simple_interface-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5a1645793dd7361edc77f3fb4b2e14cb1fbc8f4b5edcd8957e82b0ff3b4d3d23
MD5 37108b2f388cb031061073e292a5489f
BLAKE2b-256 0f18ab7b267da95da86be5c5dcc2d8f1ac049c00e876e020f03397c14693b0a6

See more details on using hashes here.

File details

Details for the file cpp_simple_interface-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cpp_simple_interface-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5be98165f7cf1de7f821029156cc8c2a6a4b948a8f7510f6de66d9cc7f268691
MD5 f22d311500835401f155b186d2591d04
BLAKE2b-256 e6dd2197bcb6cacabf6408b9c463e90aee926d3922e1f3e3df7a0bf93de04557

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page