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

Remove linker error on windows in TweetNaCL #120

Merged
merged 1 commit into from
Nov 8, 2024
Merged

Conversation

squell
Copy link
Collaborator

@squell squell commented Nov 7, 2024

It's quite usual for C compilers to see every .c file as an entire translation unit (in fact that's how I view them as well). That means that tweetnacl.c can't compile since we're not linking to any object file that provides the randombytes function.

Apparently on Windows this is a thing.

This PR is a stopgap that prevents this annoying linker error from students finishing the exercise.

A remaining problem is that sha256_tweet is not defined (due to macro-stuff in tweetnacl.h), so as soon as someone starts playing around with this example (which we like) they're getting into a world of hurt as well.

Best to switch away from something that is "academic" like tweetnacl.

Closes https://github.com/tweedegolf/rust-training-internal/issues/20

@diondokter diondokter merged commit 238ff81 into main Nov 8, 2024
1 check passed
@diondokter diondokter deleted the fix-tweetnacl branch November 8, 2024 08:30
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