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

Move libraries to the end of the link line #14

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

flavorjones
Copy link

Move libraries to the end of the link line to avoid errors like:

g++ -lssl -lcrypto -o sigtool main.o hash.o macho.o signature.o commands.o
/usr/bin/ld: hash.o: in function `SigTool::SHA256Hash::SHA256Hash(unsigned char const*, unsigned long)':
hash.cpp:(.text+0xcc): undefined reference to `SHA256'
collect2: error: ld returned 1 exit status
make: *** [Makefile:18: sigtool] Error 1

The link line is updated to be something like:

g++  -o sigtool main.o hash.o macho.o signature.o commands.o -lssl -lcrypto

to avoid errors like:

```
g++ -lssl -lcrypto -o sigtool main.o hash.o macho.o signature.o commands.o
/usr/bin/ld: hash.o: in function `SigTool::SHA256Hash::SHA256Hash(unsigned char const*, unsigned long)':
hash.cpp:(.text+0xcc): undefined reference to `SHA256'
collect2: error: ld returned 1 exit status
make: *** [Makefile:18: sigtool] Error 1
```

The link line is updated to be something like:

```
g++  -o sigtool main.o hash.o macho.o signature.o commands.o -lssl -lcrypto
```
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.

1 participant