Fatal error on makefile, need to understand the problem

Fatal error on makefile, need to understand the problem

By : bob
Date : October 20 2020, 06:10 PM
wish help you to fix your issue Your Makefile looks fine - I can't see any problems with it as such[*]. The problem is your code that you're compiling.
Take a look at one of the errors you're getting:
code :
SOURCES1 = ag.c other.c something.c
SOURCES2 = sv.c morecode.c something.c

OBJECTS1 = $(foreach o, $(patsubst %.c,%.o,$(SOURCES1)), $(ODIR)/$o)
OBJECTS2 = $(foreach o, $(patsubst %.c,%.o,$(SOURCES2)), $(ODIR)/$o)

$(ODIR)/%.o : %.c $(DEPS)
    $(CC) -c -o $@ $< 

program1: $(OBJECTS1)
    $(CC) $^ -o $@

program2: $(OBJECTS2)
    $(CC) $^ -o $@

Share : facebook icon twitter icon
Fatal Error when executing a Makefile

Fatal Error when executing a Makefile

By : Mark Russellbrown
Date : March 29 2020, 07:55 AM
hope this fix your issue The option to specify an include directory is capital-I (I), not lower-case L (l).
code :
gcc -I ./include …
Makefile exits with fatal error

Makefile exits with fatal error

By : Robert Lowe
Date : March 29 2020, 07:55 AM
seems to work fine $(OBJDIR)/%.o: $(OBJ) $(DEPS) makes no sense. You're saying every object file depends on itself (and also all other object files). That's why make is complaining Circular obj/main.o <- obj/main.o dependency dropped.. $(OBJ) shouldn't be there.
$(CXX) -c -o $@ $< $(CFLAGS) is broken because $< is the first prerequisite, which in this case is obj/reader.o. It's like you're trying to compile one object file into another, which makes no sense.
code :
CXXFLAGS = -g -Wall -std=c++14 -Iinclude

bin/main: obj/main.o obj/reader.o
        $(CXX) -o $@ $(LDFLAGS) $+ $(LDLIBS)

obj/main.o: src/main.cpp include/reader.h
obj/reader.o: src/reader.cpp include/reader.h
Makefile: Fatal error: jni.h: No such file or directory

Makefile: Fatal error: jni.h: No such file or directory

By : user1874983
Date : March 29 2020, 07:55 AM
hope this fix your issue This library already has the correct settings [see CFLAGS]. From its makefile in target/jni:
code :
IDIR =./include
CFLAGS=-fPIC -Wall -g -I. -I$(IDIR) -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux -I/usr/lib/x86_64-linux-gnu/glib-2.0/include $(shell pkg-config --cflags $(PKGDEPS))
Makefile issues - fatal error in reader

Makefile issues - fatal error in reader

By : Tetra
Date : March 29 2020, 07:55 AM
Does that help As Joachim told you, the lines should be indented by tab, not by spaces, so the second line should look like:
what does Makefile(90) : fatal error U1000 mean?

what does Makefile(90) : fatal error U1000 mean?

By : Think
Date : March 29 2020, 07:55 AM
Does that help 90 is the line-number of the error. I suspect this makefile isn't meant to be used in nmake, since the syntax resembles gnu-make more than nmake.
You will probably have more luck if you run gnumake (gmake or possibly simply make).
Related Posts Related Posts :
  • dynamic memory for 2D char array
  • C compiler producing lightweight executeables
  • Cannot Open Shared Object cygmpfr-1.dll
  • How to access a structure member in a function that get it as void* type?
  • Replace for loop with formula
  • how to find if stack increases upwards or downwards?
  • Why does my homespun sizeof operator need a char* cast?
  • Setting exit status when creating core dump
  • Signal Handling in C
  • How to implement B+ Tree for file systems?
  • Stack storage at function call
  • Manipulate the Clipboard in C on Mac OS X
  • Problem with writing a hexadecimal string
  • Why does this code read all ' ' for the anything after the 4th character?
  • GUI for linux c
  • Where do I put all these function-like #defines, in C?
  • Padding in 24-bits rgb bitmap
  • how to acess and change variable of kernel space from user space
  • Can a conforming C implementation #define NULL to be something wacky
  • send() always interrupted by EPIPE
  • Socket Select with empty fd set
  • Coding self similar fractals in computer graphics using C
  • Forking with Pipes
  • sscanf + c99 not working on some platforms?
  • Problem with C function of type char pointer, can someone explain?
  • Macros in C.... please give the solution
  • Unix Piping using Fork and Dup
  • Any difference between these two while loops?
  • Hashtable implementation for C
  • Problems with Linked List in C
  • Stack Allocation in C
  • Random function stuck on one number
  • printf following zeros to a certain degree
  • Measuring CPU clocks consumed by a process
  • How is a CRC32 checksum calculated?
  • Tips on redefining a register bitfield in C
  • Converting a program from c to bash script
  • Static library not included in resulting LLVM executable
  • What is the meaning of "wild pointer" in C?
  • Reading DWORD from binary file
  • Efficient way to find divisibility
  • Whats the fastest, portable way to hash pointers we know are pointer aligned to a fixed size int?
  • Why does my summation program behaves weird?
  • How to determine values saved on the stack?
  • Thread scheduling C
  • C - converting to 2s complement
  • wireless networks c program
  • From where does the uboot get the information about flash, RTC, RAM in uboot/kernel development
  • printf behaviour in C
  • Measure size and way-order of L1 and L2 caches
  • Efficient copy of entire directory
  • Efficient way to create/unpack large bitfields in C?
  • getnameinfo prototype asks for sockaddr not sockaddr_in?
  • Linked List Sorting with Strings In C
  • Typecasting a floating value or using the math.h floor* functions?
  • Problem implementing sorting algorithm in C with an array of structs
  • How to copy a ram_base file to disk efficiently
  • How to fix casting a pointer to an integer?
  • How to round floating point numbers to the nearest integer in C?
  • PIC C - Sending 200 values over USB, but it only sends 25 or so of them
  • shadow
    Privacy Policy - Terms - Contact Us © 35dp-dentalpractice.co.uk