Ubuntu: Position Of -lm

Channel:
Subscribers:
2,670
Published on ● Video Link: https://www.youtube.com/watch?v=bHtnfIGd4O8



Duration: 46:45
56 views
0


Ubuntu: Position Of -lm


This is a recapitulation of my "struggle" to understand why (on Ubuntu) the make-process was failing, while "making" this simple C program..

Can you spot the error in this Makefile:
--------
EXE = morse2ascii
CFLAGS += -O2 -s
PREFIX = /usr/local
BINDIR = $(PREFIX)/bin
LIBS = -lm

all:
$(CC) $(CFLAGS) -c morse2ascii.c
$(CC) $(CFLAGS) -c resample2.c
$(CC) $(CFLAGS) -o $(EXE) $(LIBS) morse2ascii.o resample2.o

install:
install -m 755 -d $(BINDIR)
install -m 755 $(EXE) $(BINDIR)/$(EXE)

.PHONY:
install
--------

This is part of my self re-edumacation to Linux (Ubuntu in particular) and its tools and processes and capabilities.


Disclaimer: This episode is neither a promotion nor a recommendation any product or service, but does reflect my personal experiences.
Disclaimer: This episode is presented with ABSOLUTELY NO WARRANTY WHATSOEVER.
Remember: you are listening to an idiot running his mouth.


Date: 18 APRIL 2020

[vokoscreen x265 ffmpeg irfanview]







Tags:
SteveAB4EL
Steve AB4EL
Makefile
compiling and linking on Ubuntu
ld paramaeter -lm
position requirement
morse2ascii open source used
Ubuntu Focal Fossa
thinking out loud
technology
howto
style
vlog
20200418_0_VOK_UBUNTU-MORSE2SASCII
20200424_2059__Ubuntu_Position_Of_-lm