• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Linkage problem with dylib
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Linkage problem with dylib


  • Subject: Linkage problem with dylib
  • From: Paul Beckingham <email@hidden>
  • Date: Tue, 14 Jun 2005 21:36:06 -0400

I am running 10.4.1, and having a problem linking to libssl.dylib.  Here is my code:

// sample.cpp
using namespace std;
#include <openssl/sha.h>

int main (int, char**)
{
  char md [21] = {0};
  SHA1 ((unsigned char *)"This is a test", 14, (unsigned char*) md);
  return 0;
}

Here is my makefile:

# sample.make
.cpp.o:
        g++ -c -g $<

../bin/sample: $(PROJECT) sample.o
        g++ sample.o -lssl -o sample

And here is the result:

% make -f sample.make
g++ sample.o -lssl -o sample
/usr/bin/ld: Undefined symbols:
_SHA1
collect2: ld returned 1 exit status
make: *** [../bin/sample] Error 1

Could someone tell me why I cannot link to /usr/lib/libssl.dylib (itself a symlink to libssl.0.9.7.dylib)?

Much appreciated.
Paul.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Linkage problem with dylib
      • From: Shantonu Sen <email@hidden>
    • Re: Linkage problem with dylib
      • From: "Peter O'Gorman" <email@hidden>
  • Prev by Date: Re: Mach-O and a 16Mb limit
  • Next by Date: Re: Linkage problem with dylib
  • Previous by thread: Re: Mach-O and a 16Mb limit
  • Next by thread: Re: Linkage problem with dylib
  • Index(es):
    • Date
    • Thread