Questions tagged [c-libraries]

63 questions
1
vote
0 answers

Using sqrtf() function and negative floating point value for a variable in Frama-c wp plugin

I am trying to compute weakest precondition of a particular function which requires sqrtf() function call. Here is a segment from my code- void func(float err1_10, float err2_10){ float x1_00,......,x20_00; float x1_10,......,x20_10; float…
D.L.
  • 169
  • 3
  • 17
1
vote
2 answers

Get milliseconds difference from time and date string values in C

I have two date and time strings separately in variables. I need to calculate the difference between these 2 date and time values in milliseconds. How to get that in C. The solution should work across platforms(at least windows and unix). char…
Arun
  • 2,247
  • 3
  • 28
  • 51
1
vote
3 answers

How to check C libraries installed without root access?

I am working on a school project in a limited environment (archlinux) where I don't have root access. The subject says that I am allowed to use all libraries that are already installed. I am coding in C using gcc. How to get a list of all those…
Babajaga
  • 77
  • 1
  • 3
  • 8
1
vote
3 answers

Does Android support setjmp/longjmp, access, chdir, getcwd?

I'm pretty new to Android development and I'd like to know whether Android supports the above mentioned features which are there in C. Thanks in advance.
Code.Decode
  • 3,736
  • 4
  • 25
  • 32
1
vote
1 answer

c -lz library link order (undefined reference to symbol "inflateInit2_")

I link the the library in CodeBlocks in this…
Yoohoo
  • 217
  • 2
  • 7
  • 19
1
vote
1 answer

Libdvbcsa, missing header files

I have a problem i cannot solve. Library repository I am trying to run test .c files in this library, I have installed the files however when I run this on mac: gcc testbitslice.c I get this error fatal error: dvbcsa_pv.h: No such file or…
greentree
  • 45
  • 7
1
vote
2 answers

Creating a C library that can be imports as "#include"

I want to create a C static, so the user can use it as follows. #include How can I achieve this ?
user3218743
  • 579
  • 2
  • 8
  • 28
1
vote
1 answer

Hashtable Resizing in C with fread/write functions

so Im working on this project just to refresh on hash tables and some C libraries.. I have implemented general hash functions and everything needed for a basic table using file i/o..but I am stuck when trying to think of how to go about resizing the…
1
vote
1 answer

Why does _splitpath_s() take custom sized string buffer for returning drive letter?

A small detail caught my eye while reading documentation of _splitpath_s(). It takes path of a disk item (e.g.; C:\Temp\MyFile.exe) in its 1st parameter, and then splits it into drive, directory, folder and extension names. However, the strange…
hkBattousai
  • 10,583
  • 18
  • 76
  • 124
1
vote
1 answer

useful c++ library for numeric calculation

I've used boost library so far. But, I'd like to use matrix operation and random numbers. Please, let me know useful c++ library. thanks.
akiniwa
  • 617
  • 8
  • 18
1
vote
1 answer

Using FDLIBM library in Visual Studio, C++

I'm porting some code from MATLAB to C++ and discovered that MATLAB's sin() and cos() functions produce slightly different results from the sin() and cos() functions in the C++ library. To eliminate these differences, I would like my C++ code to…
0
votes
1 answer

Header files vs Library in C

Is library a collection of header files? Do Header files only contain function prototypes? I read that libraries are written in machine code itself, is it true? If so, why? Everywhere it's said that library doesn't contain header files but if they…
user22045831
0
votes
0 answers

Properly Installing SOCI C++ library and using it with eclipse

I have been trying to employ SOCI library for the c++ project I am working on as I needed to access MySQL databases. I have been wrapping my head around how exactly this library works in terms of installing. I have windows 11 and want to use the…
Evank800
  • 17
  • 3
0
votes
1 answer

Difference between linking libfdisk.a directly and through -lfdisk

I've made program, which formats storage devices. However, when I've created library (for python GUI) based on this program it starts to show the error: /usr/bin/ld: fdisk/libfdisk.a(la-label.o): relocation R_X86_64_32 against `.rodata.str1.1' can…
FirowMD
  • 13
  • 2
0
votes
0 answers

why many program languages implement their own "lock"

I'm learning a book about Unix. I find that Unix provides many kinds of lock tools implemented by C library, such as pthread_mutex_lock,pthread_mutex_timedlock,pthread_rwlock_rdlock,pthread_rwlock_wrlock. So, I am curious about a truth that many…
JasonZhang
  • 68
  • 1
  • 10