Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added -lm flag to link math library #16

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

LordMhri
Copy link
Contributor

@LordMhri LordMhri commented Oct 8, 2024

Description

This PR adds the -lm flag to link math libraries in the C implementation of the Neural Network.

Error Details

Without the -lm flag , the following error occurs.

usr/bin/ld: build/neural.o: in function `sigmoid':
neural.c:(.text+0x3aa): undefined reference to `exp` 
clang: fatal error: linker command failed with exit code 1 (use -v to see invocation)

Changes Made

Adds -lm flag to the Makefile located in NeuralNetworkInAllLanges/C directory.

@dlidstrom
Copy link
Owner

Looks good, so now it compiles fine with Clang too. Thank you for your contribution!

Copy link
Owner

@dlidstrom dlidstrom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

@dlidstrom dlidstrom merged commit 5bda2dd into dlidstrom:main Oct 9, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants