Skip to content

C++ brew install library not found during compile (OSX) #6325

Discussion options

You must be logged in to vote

This minimal example works for me:

$ cat test.cc                                            
#include <cryptopp/integer.h>

int main() {
  CryptoPP::Integer x = 0;
  return static_cast<int>(x.ConvertToLong());
}
$ c++ -c test.cc -o test.o -I"$(brew --prefix cryptopp)/include"   
$ c++ test.o -o test -L"$(brew --prefix cryptopp)/lib" -lcryptopp
$ ./test

Can you share what commands you are using to compile your code? What specific errors have you encountered?

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@spacecat921
Comment options

@ZhongRuoyu
Comment options

Answer selected by spacecat921
@spacecat921
Comment options

@gromgit
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants