Skip to content

Commit 1faef97

Browse files
committed
Fix test building error
midi2c.c and example.c cannot be correctly compiled because header stdint is not included. Uncomment the LDLIBS line in the Makefile to correctly link the math header, ensuring that picosynth can use the log and exp functions.
1 parent 512b895 commit 1faef97

File tree

4 files changed

+4
-1
lines changed

4 files changed

+4
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
example
33
output.wav
44
melody.h
5+
tools/midi2c
56

67
# Emscripten/WASM build outputs
78
*.wasm

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
CC ?= gcc
22
CFLAGS = -Wall -Wextra -Wconversion -I include -I .
3-
LDLIBS = # -lm
3+
LDLIBS = -lm
44

55
SRCS = src/picosynth.c
66
HDRS = include/picosynth.h

tests/example.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include <stdio.h>
22
#include <stdlib.h>
3+
#include <stdint.h>
34

45
#include "melody.h"
56
#include "picosynth.h"

tools/midi2c.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <stdio.h>
2121
#include <stdlib.h>
2222
#include <string.h>
23+
#include <stdint.h>
2324

2425
#define MAX_NOTES 1024
2526
#define MAX_LINE 256

0 commit comments

Comments
 (0)