Skip to content
Advertisement

Tag: gcc

GCC compiled code: why integer declaration needs several statements?

I’m learning AT&T assembly,I know arrays/variables can be declared using .int/.long, or using .equ to declare a symbol, that’s to be replaced by assembly. They’re declared insided either .data section(initialzed),or .bss section(uninitialzed). But when I used gcc to compiled a very simple .c file with ‘-S’ command line option to check the disassembly code, I noticed that: (1) .s is

ld cannot recognize the options

I’am reading this Tuto, and I’am trying to link the application using this command: ld test.o –o test.bin, the linker doesn’t recognize the -o option : Using ld -help the option -o exist but i don’t understand why I’am getting this problem. This is the linker version. Answer My good eyes and my bitter experience tell me that you must

Use of -g and -o options in gcc command in c programming

Suppose there are 2 c program named abc.c and xyz.c . Now we want to work with the 2 executables at a time. So we change the name of the ./a.out using Even gcc -o abc abc.c works. What does the -g and -o in the above commands specify or describe? What is the significance of -g and -o in

Pop function for stack has unexpected behaviour [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 6 years ago. Improve this question I was just taking lecture on behalf of my Guide and one student given this code: The value of top

Undefined references when linking with gcc -lnetsnmp

I’m trying to compile and run my code on a raspberry pi which needs the snmp libraries. However, I get linking errors such as “undefined reference to ‘EVP_DigestUpdate'”. I’ve been researching this issue for the past few days and found out that this usually happens when snmp can’t find the ssl library crypto, for example if you don’t specify -lcrypto

Advertisement