Skip to content
Advertisement

Tag: gcc

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

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

Advertisement