pmundkur/libcrm114 — Issue #1: Linking fails under Mac OS X 10.7.2
Author: mejo
Created: 2012-01-31 19:19:08+00:00
State: open

Changed Makefile:
```$(CC) -shared -Wl,-soname,$(LIB_NAME) -o lib/$(LIB_NAME) $(LIBOBJS)```
to be:
```$(CC) -shared -Wl,-dylib_install_name,$(LIB_NAME) -o lib/$(LIB_NAME) $(LIBOBJS)```

While running 'make' it gives:
```...
cc -c -g -Iinclude -fpic -std=c99 -pedantic -Wall -Wextra -Wpointer-arith -Wstrict-prototypes -Wno-sign-compare -Wno-overlength-strings -o lib/crm114_regex_tre.o lib/crm114_regex_tre.c
lib/crm114_regex_tre.c: In function ‘crm114__regfree’:
lib/crm114_regex_tre.c:61: warning: ISO C forbids conversion of function pointer to object pointer type
cc -shared -Wl,-dylib_install_name,libcrm114.so.1 -o lib/libcrm114.so.1 lib/crm114_base.o lib/crm114_markov.o lib/crm114_markov_microgroom.o lib/crm114_bit_entropy.o lib/crm114_hyperspace.o lib/crm114_svm.o lib/crm114_svm_lib_fncts.o lib/crm114_svm_quad_prog.o lib/crm114_fast_substring_compression.o lib/crm114_pca.o lib/crm114_pca_lib_fncts.o lib/crm114_matrix.o lib/crm114_matrix_util.o lib/crm114_datalib.o lib/crm114_vector_tokenize.o lib/crm114_strnhash.o lib/crm114_util.o lib/crm114_regex_tre.o
Undefined symbols for architecture x86_64:
"_tre_regncomp", referenced from:
_crm114__regncomp in crm114_regex_tre.o
"_tre_regnexec", referenced from:
_crm114__regnexec in crm114_regex_tre.o
"_tre_regerror", referenced from:
_crm114__regerror in crm114_regex_tre.o
"_tre_regfree", referenced from:
_crm114__regfree in crm114_regex_tre.o
"_tre_free", referenced from:
_crm114__regfree in crm114_regex_tre.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [lib/libcrm114.so] Error 1```

I suppose there is something to be added for Makefile to make shared library (tre) to be loaded?