Category "c"

"fatal error: bits/libc-header-start.h: No such file or directory" while compiling HTK

I'm getting the following issue when trying to run make on the HTK library: (cd HTKLib && make HTKLib.a) \ || case "" in *k*) fail=yes;; *) exit 1;;

Write a macro function to change the case of a string?

// I tried this code #include<iostream> using namespace std; // Function to convert characters // of a string to opposite case #define case_change(s

Why does CMake set -no-fat-lto-objects when I enable LTO/IPO?

I'm enabling IPO (inter-procedural optimization) for a C compilation of mine, using CMake: set_property(TARGET foo PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)

An integer array of up to 10 integers is read. Negative integers are not allowed to read

My program only allows positive integers up to 200 to be entered. -1 and the rest of negative numbers are not allowed to be read, and for safety, the 10th digit

Fscanf Doesn't Take Inputs properly

I'm trying to take inputs with fscanf and to give output to another file but fscanf doesn't give the input it should give. Here is my code: #include <stdio.h

Two different answers for same expression in C

I have an expression which does the same calculation. When I try to do the whole calculation in a single expression and store it in variable "a", the expression

Cython how to create an anonymous union inside of a struct?

I want to create the following structure in cython (actually I don't really need this one in but it is a simplified example.) cdef struct MyStruct: int x

What are 'objects' in C language?

In the book, Modern C by Jens Gustedt, following statements have been made by the author: In the following subsections, we will introduce the syntactical aspec

For LOOP throw away by Compiler optimization

I was doing an experiment to measure the execution time of ''for loop'' on microcotroller. This ''for loop'' contain some integer and pointer operation. Case 1

How to print QR code (or bitmap) to thermal printer?

I'm working with software that runs on linux/windows and also android. On linux and windows, it prints QR codes by generating a bitmap and sending via ESC * to

ESP32 AWS IoT transportStatus=-1

I'm following the espressif docs for connecting a ESP32 to AWS IoT shadow. I'm using the example github.com/espressif/esp-aws-iot for shadow mqtt synchronisatio

C Producer-Consumer Using PThreads

I am working on a problem where I am implementing a program that mimics the producer-consumer paradigm. The code that I am using works when I only have one prod

How to print long double number in xinu?

Function sqrtl doesn't work here, also the printf of long double prints f for all given numbers: #include <conf.h> #include <kernel.h> #include <

How to fix "file too short" error once importing a C shared library with extenstion ".so"? [closed]

I am trying to run a deep learning python code written based on MASK-CNN deep network. And there is a C shared library "_crop_and_resize.so",

Error building program using gcc plugin from linux kernel source tree

I am trying to use a grsecurity gcc plugin that I found on their unofficial linux kernel source tree (the respectre_plugin/ one). My GCC version is 4.7, I modif

Does MISRA C:2012 rule 21.1 contradict with C11?

MISRA C:2012, Rule 21.1: #define and #undef shall not be used on a reserved identifier or reserved macro name. However, C11 permits to define, for example, __

GetFullPathNameA Returns Project's Path

When I tried the following code: char pathStr[MAX_PATH]; DWORD pathLen = GetFullPathNameA("notepad++.exe", MAX_PATH, pathStr, NULL); I got in "pathStr" the c

C text formatter characters count is off

So I have an assignment to format text according to rules and eventually print out the number of characters in the string (including \n and spaces, anything but

DC Motor speed and direction with PWM PSoC

I need to be able to change the direction and speed of a small dc motor using an PSoC LP5 and a L293D. The motor that was used is one of these: https://www.elec

Would the compiler optimize this for loop?

In C or C++, if the compiler encounters a for loop in which a counter is counting from 0 to n, and n is a variable (not a function call, and NOT A CONSTANT eith