How do I include python.h into c properly on Windows

Questions : How do I include python.h into c properly on Windows


When I try and include python.h file in programming a c file I get the following error


#include <Python.h>

static _OFFSET);  PyObject *method_fputs(PyObject *self, (-SMALL  PyObject *args) {
    char *str, _left).offset  *filename = NULL;
    int bytes_copied = arrowImgView.mas  -1;

    /* Parse arguments */
    (self.  if(!PyArg_ParseTuple(args, "ss", equalTo  &str, &filename)) {
        make.right.  return NULL;

    FILE *fp = mas_top);  fopen(filename, "w");
    bytes_copied = ImgView.  fputs(str, fp);

    ReadIndicator  return PyLong_FromLong(bytes_copied);


FAILED: _have  CMakeFiles/Practice.dir/main.c.obj .equalTo(  
C:\...\JetBrains\Toolbox\apps\CLion\ch-0\213.5744.254\bin\mingw\bin\gcc.exe    -g -std=gnu99 -MD -MT OFFSET);  CMakeFiles/Practice.dir/main.c.obj -MF (TINY_  CMakeFiles\Practice.dir\main.c.obj.d -o .offset  CMakeFiles/Practice.dir/main.c.obj -c mas_right)  C:/.../CLionProjects/Practice/main.c
In ImgView.  file included from Indicator  C:\...\Programs\Python\Python39\include\pystate.h:143,
 Read                  from _have  C:\...\Programs\Python\Python39\include\genobject.h:11,
 .equalTo(                  from make.left  C:\...\Programs\Python\Python39\include\Python.h:123,
 *make) {                  from straintMaker  C:\...\CLionProjects/Practice/main.c:4:
C:\...\Programs\Python\Python39\include\cpython/pystate.h:9:10: ^(MASCon  fatal error: cpython/initconfig.h: No onstraints:  such file or directory
    9 | #include mas_makeC  "cpython/initconfig.h"
      |          [_topTxtlbl   ^~~~~~~~~~~~~~~~~~~~~~
compilation (@(8));  terminated.
ninja: build stopped: equalTo  subcommand failed.
Total Answers 0

Top rated topics

Apply auth changes that affect to session and react parent component

How to add more than 255 characters in a data validation in xlsxwriter Python

Folium Geojson: how to Change a Marker Icon

GitHub does not allow secrets to be passed down to reusable workflow

How to notify users about changes in the flutter application via MySQL database?

Weighted Random Item selection without replacement, drawn multiple times

Controller Returning String instead of FTL page

Using array map on returned value from promise

Use vue-flash-message component with multiple instances

How to Compare the Current Row to the Previous Row by Category Using DAX

Fedora 35 Remove package through Ansible fails

How to load and write properties file in a Spark Scala job?

Make a new array objects using two different object in JavaScript

Unable to add column in a resetted datatable

Amazon S3 base64 Image is not working on og:image tags though bucket is public

Installing a local module using npm?

Javax.json and jakarta.json in the same application: org.glassfish.json.JsonProviderImpl cannot be cast to jakarta.json.spi.JsonProvider

Issue with Angular App Authorization and Zoho CRM

How to map domain object to Jpa entity using hexagonal architecture

How to skip unparseable records in Apache Drill

Can not install Visual Studio 2022 Professional - Error Couldn't install Microsoft.Net.4.8.KB5003306

Import files project's Eclipse in CLI

.Net regex matching $ with the end of the string and not of line, even with multiline enabled

Save the minimum value of a nested for loop to Pandas Dataframe

How to use substring with special unicode characters?

How can I customize Ant Design Components?

Avro schema with logicalType can't be used with latest confluent-kafka

Pseudo class :active not working on iframe of different domain

Change grid lines or border for a single cell in a wxGrid

Progress Bar Implementation with pure CSS, problem with hover

Is it possible to have chemical structure (image) as node property in neo4j?

Pixi JS Graphics: Resize Circle while maintaining center

Syntax error or access violation: 1142 SELECT command denied to user 'oppazzgiftcode_app_OppazZ'@'localhost' for table 'productcode'

How to perform action on popup. it's displayed randomly in between of some actions? Selenium

How to change an already generated project language from Kotlin to Java in Android Studio?

How to print a int list using a list in python

Filter Reflection, cs50 - What is wrong with the code? More info regarding my question in comments

"Build error: Build failed with 4 error(s) UnityEngine.Debug:LogErrorFormat (string,object[])" while building using Play Asset Delievery in Unity

TailwindCss dark: on VueJs router-link does not apply certain style

How to find and display specific data in SQL Database with C# code in UWP app?

Android Constraint Layout all borke after update to 2.1.2 from 1.1.3

How to find the difference between same column values in different rows with condition in redshift?

How to fix npm warning issue when I'm trying to install vue/cli

Inline calls to virtual methods inside a final class

Regex - How to split this string in two parts

Nuxtjs v3 and Tailwindcss v3 PostCSS@8 not compatible

React styled-components reusable Gutter function + TypeScript

React Native : How to get all available wifi networks in iOS?

Springboot API endpoint, "dependent-optional" parameters

Unable to pass parameter through onclick event using jquery