[stunnel-users] Compilation error on windows, cannot find "-lssl"

Billinger Olle ollebil at yahoo.se
Thu Apr 7 10:54:05 CEST 2005


Hi

I'm trying to compile stunnel 4.08 on windows using
mingw, with openssl-0.9.7f. I have edited the
Makefile.w32 and it compiles ok until it cannot find
the  "-lssl".  Any suggestions are welcome.
//Olle

**************************************

$ make -f Makefile.w32 stunnel.exe
gcc -g -O2 -Wall -DUSE_WIN32 -DHAVE_OPENSSL
-I/c/openssl/include   -c -o stunnel.o stunnel.c
gcc -g -O2 -Wall -DUSE_WIN32 -DHAVE_OPENSSL
-I/c/openssl/include   -c -o ssl.o ssl.c
gcc -g -O2 -Wall -DUSE_WIN32 -DHAVE_OPENSSL
-I/c/openssl/include   -c -o client.o client.c
gcc -g -O2 -Wall -DUSE_WIN32 -DHAVE_OPENSSL
-I/c/openssl/include   -c -o protocol.o protocol.c
gcc -g -O2 -Wall -DUSE_WIN32 -DHAVE_OPENSSL
-I/c/openssl/include   -c -o sthreads.o sthreads.c
gcc -g -O2 -Wall -DUSE_WIN32 -DHAVE_OPENSSL
-I/c/openssl/include   -c -o log.o log.c
gcc -g -O2 -Wall -DUSE_WIN32 -DHAVE_OPENSSL
-I/c/openssl/include   -c -o options.o options.c
gcc -g -O2 -Wall -DUSE_WIN32 -DHAVE_OPENSSL
-I/c/openssl/include   -c -o network.o network.c
gcc -g -O2 -Wall -DUSE_WIN32 -DHAVE_OPENSSL
-I/c/openssl/include   -c -o resolver.o resolver.c
gcc -g -O2 -Wall -DUSE_WIN32 -DHAVE_OPENSSL
-I/c/openssl/include   -c -o gui.o gui.c
gcc -s -o stunnel.exe stunnel.o ssl.o client.o
protocol.o sthreads.o log.o options.o network.o
resolver.o gui.o resources.o -L/c/openssl/bin
-lwsock32 -lgdi32 -lssl -mwindows
c:\mingw\bin\..\lib\gcc-lib\mingw32\3.2.3\..\..\..\..\mingw32\bin\ld.exe:
cannot find -lssl
make: *** [stunnel.exe] Error 1


My Makefile.w32
*******************
SSLDIR=/c/openssl
DEFINES=-DUSE_WIN32 -DHAVE_OPENSSL
CFLAGS=-g -O2 -Wall $(DEFINES) -I$(SSLDIR)/include
LDFLAGS=-s

# LIBS=-L$(SSLDIR)/out -lssl -lcrypto -lwsock32
-lgdi32

LIBS=-L$(SSLDIR)/bin -lwsock32 -lgdi32 -lssl
OBJS=stunnel.o ssl.o client.o protocol.o sthreads.o
log.o options.o network.o resolver.o gui.o resources.o

stunnel.exe: $(OBJS)
	$(CC) $(LDFLAGS) -o stunnel.exe $(OBJS) $(LIBS)
-mwindows

clean:
	rm *.o
	rm stunnel.exe

#resources.o: resources.rc resources.h
#	windres resource.rc resources.o

$(OBJS): *.h Makefile.w32
*********************



More information about the stunnel-users mailing list