You need to use the flag -fno-coalesce-static-vtables in order to link
correctly on MacOS X.
Add this to the GNUmakefile:
----- cut here -----
ifeq ($(UNAME),Darwin) # for MacOS X, c++ compiler from Apple (based on
gcc version 2.95.2)
CXX = c++
CXXFLAGS += -fno-coalesce-static-vtables
endif
----- cut here -----
Just below:
ifeq ($(UNAME),SunOS)
LDLIBS = -lnsl -lsocket
endif
And cryptest.exe should link and run correct.
Regards,
Indridi
I was able to search around, and find that 1) is due to a bug in the
mac compiler. And part of the bug is that this flag is not
compatible with -O2 so I can't build an optimized version.
I am not sure why I need 2) and it is not in the make file, but it
does the job.
again thanks Indridi,
--Adam
I admit that I haven't tried to compile an optimized version of
cryptest.exe but I was able to compile a debug version using the
-fno-coalesce-static-vtables. I didn't need to add stdc++ library. I did
run the "cryptest.exe v" and it passed all tests.
I was compiling the 4.2 version of cryptlib on MacOS-X version 10.1.3
using
gcc version gcc-932.1, based on gcc version 2.95.2 19991024 (release).
I vaguely remember that with one project I had on MacOS-X I needed to
add stdc++ library. If I can remember it correctly it was because I was
using fstream.
Regards,
Indridi