Skip to main content

All Questions

Tagged with
0 votes
1 answer
79 views

How can I write a hexadecimal viewer in C? [duplicate]

I'm working on a code for a homework. Our teacher gave us this example. We gotta write a code about a hexadecimal viewer. This one must write down lines, edit, map characters and edit. #include <...
Miguel Salazar's user avatar
1 vote
0 answers
67 views

Getting clang: error: linker command failed with exit code 1 (use -v to see invocation) when using code runner in VSCode on Ubuntu System

The program is structured as follows: main.c: #include <stdio.h> #include "../include/test.h" int main(){ moo(); return 0; } test.c: #include <stdio.h> #include ".....
Saumya 's user avatar
-1 votes
1 answer
38 views

CPU Usage in Linux. in C - compiler problems

I've been trying to read and print in terminal all my CPU cores usage. My program work fine until I've made it a multithread app, and now my compiler seams to say that there is no reference betwin ...
BartoszOlejarz's user avatar
0 votes
1 answer
214 views

GCC C/C++ Compiler missing some "files", whose seems to have weird names

From some random moment and for some unknown reason, my compiler stopped working. It lets me know about errors, warnings, etc., but i still get this error: /home/vhajsman/opt/cross/lib/gcc/i686-elf/14....
COOKIE's user avatar
  • 43
4 votes
1 answer
221 views

Why are symbols unresolved here?

I've read here: and it stated: A function defined with inline on its own. Stand-alone object code is always emitted. You can only write one definition like this in your entire program. If you want to ...
user129393192's user avatar
0 votes
1 answer
496 views

Pktgen fails to compile - Error: include ‘<ctype.h>’ or provide a declaration of ‘isspace’ / ’isblank’

I'm trying to compile pktgen, but keep getting this error when I try to compile: The DPDK version I'm running is dpdk-stable-22.11.1 and I'm following the official guide Getting Started with Pktgen ...
Agent smith 2.0's user avatar
0 votes
1 answer
224 views

gcc SO_DOMAIN does not compile with -std=c2x

Today I had revisited old code of mine. The code use socket and getsockopt calls. I had modified makefile to compile under -std=c2x to use modern C. Strangley enough the simple line of getsockopt(fd, ...
iam_ai_copy-paste's user avatar
0 votes
1 answer
267 views

Running C compiler using fexecve

For an assignment, I'm trying to compile a program using fexecve. The relevant code: /* compile */ char* compiler_envp[] = {NULL}; char* compiler_argv[] = {"/usr/bin/cc", "math.c", ...
Calder Johnson's user avatar
1 vote
1 answer
600 views

"Stack smashing detected" when compiled on a Linux machine, but not on a Windows machine

I'm writing some C code that gets compiled on both a Linux machine and a Windows machine (specifically, I am writing C code that is used within some R functions, so not a standalone C program). When ...
THenry's user avatar
  • 13
0 votes
1 answer
60 views

Makefile - Help me in getting the error removed

I am building a program from a single main.c file. Errors appear when using make Note - I have 64 bit library files in a folder lib. Earlier 32 bit Linux platform I was working on. Now it's 64 bit ...
Shridhar Nayak's user avatar
1 vote
0 answers
506 views

Compilation failure with -I/usr/include/linux

I am trying to find why I am getting the following errors when I am compiling a simple program (printing hello world) while providing the include path /usr/include/linux. How does inclusion of this ...
Chitrak Gupta's user avatar
0 votes
1 answer
2k views

Linux kernel build compliler_assert error

I am having problem in building kernel. This is what I typed into my terminal. $ wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.5.16.tar.xz $ xz -d linux-5.5.16.tar.xz $ tar xvf linux-5.5....
Sangwon's user avatar
0 votes
1 answer
235 views

error: invalid initializer va_list ap2 = va_arg(ap, va_list);

I'm currently in chroot building LFS. I was trying to compile a legacy project called install-log but I get this error: (lfs chroot) root:/src/install-log# make install cc -MMD -c -o list.o list.c In ...
umar's user avatar
  • 25
0 votes
1 answer
995 views

How to link math.h library in a makefile?

i need to compile 3 files- part1.c, part2.c, and part3.c in a makefile. only part3.c needs to use the <math.h> library. Before a makefile, this is what the gcc commands will look like: gcc -g -o ...
kass's user avatar
  • 1
0 votes
2 answers
52k views

/usr/bin/ld: cannot find -l<name of the library> while compiling with gcc

I am writting an mqtt communication script where I am using the paho library. the files .so exist in the /home/chaima/paho.mqtt.c/build/output directory. but when trying to compile the code using the ...
ShZnd's user avatar
  • 79

15 30 50 per page
1
2 3 4 5 6