Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed 5 years ago. Improve this question
Tag: gcc
How to include dependencies information when creating shared libraries in linux?
I’m writing a shared library based on libpthread.so. To build it, I use the following command: But when linking files that use libfoo.so, I have to specify the option -lpthread -lfoo not just -lfoo. In addition, ldd libfoo.so doesn’t show anything about libpthread.so. So, is there any way so that I can avoid ‘-lpthread’? Answer Extending @Someprogrammerdude ‘s comment: Your
How to build evpp in Linux Mint
I want to use evpp library in my project but I cannot build it in my OS. My OS is Linux mint 18.1 and and I use the release build script in tools folder (release-build.sh). I am getting the following errors; I installed all third-part libraries like boost, glog and gtest look here. Am I missing something? Answer I asked
Linux userspace header failing to compile with g++
I have a cpp source file in which I have included the following Linux uapi header: #include <linux/netfilter_ipv4/ip_tables.h> I’m using RH6, but the header seems to be identical to the one found in the Linux kernel mainline: http://lxr.free-electrons.com/source/include/uapi/linux/netfilter_ipv4/ip_tables.h The problem is that upon compiling my cpp source file with g++, I’m (obviously) receiving the following error: /usr/include/linux/netfilter_ipv4/ip_tables.h:222: error: invalid conversion
cross compilation for ARM: error no such file or directory/command not found
I have written simple Hello world program and compiled it with gcc-arm-linux-gnueabi compiler. It compiles well but when i try to execute it on ARM machine it complains “no such file or directory”. I think gcc-arm-linux-gnueabi is for embedded Linux only due to e(mbedded)abi. Is it different from ARM Linux ABI? Please help me to solve this problem code is
GDB – Assembly program returns /bin/sh: 0: Can’t open �
I am presently learning 64-bit assembly language from the related Pentester Academy course. The code I’m working on creates the following error when ran in GDB: /bin/sh: 0: Can’t open � [Inferior 1 (process 4049) exited with code 0177] I have googled the error and exit code and haven’t found anything helpful. I tried analyzing the code in GDB over
Strange pointer position in the stack
I wrote this simple code: and I’ve disassembled it to see what the compiler does. Using objdump I obtain: I can understand everything except for the mov QWORD PTR [rbp-0x10],0x0, this correspond (I think)to p=NULL; but from mov QWORD PTR [rbp-0x8],rax I know that my pointer is on rbp-0x8 and it seems correct (the size of a pointer is 8bytes).
Undefined reference error while compiling
I’m trying to compile a project that has multiple *.c files and *.h file when I type the following command: the hdr folder is where the *.h files are located, the .o files are created but when I try to link them using the command: I see errors Answer Using a Makefile is very common for this task example (untested)
Generate raw binary from C code in Linux
I have been implementing just for fun a simple operating system for x86 architecture from scratch. I implemented the assembly code for the bootloader that loads the kernel from disk and enters in 32-bit mode. The kernel code that is loaded is written in C, so in order to be executed the idea is to generate the raw binary from
gcc creates mime type application/x-sharedlib instead of application/x-application
Given the following C++ code ‘mini.cpp’: and the compiler command: the result of is How do I get ‘application/x-application’ as a mime type? I’m using gcc 6.2.0 on Kubuntu. Answer gcc doesn’t set the mime type. mimetype guesses the appropriate mime type based on the contents of the file. For ELF files (most compiled binaries and shared libraries), the header