muquit / mailsend

A program to send mail via SMTP from command line
Other
295 stars 68 forks source link

Compile and/or link problem on Windows #18

Closed muquit closed 10 years ago

muquit commented 10 years ago

From marc.l.d...@gmail.com on August 27, 2013 05:08:46

What steps will reproduce the problem? 1. Installed OpenSSL 1.0.1e SDK to C:\OpenSSL, Visual Studio 2012

  1. svn checkout (1.17b12)
  2. Open Developers Command Prompt for VS2012
  3. nmake Makefile.nmake What is the expected output? What do you see instead? The compile and link seems to be okay. However, the filesize of mailsend.exe is very low (147 kb). Furthermore, running the exe on a target system (different system as dev system) results in a system error: "The program can't start because LIBEAY32.DLL is missing from your computer. Try reinstalling the program to fix this problem". What version of the product are you using? On what operating system? Compile + linking on Windows 7. Execution on Windows Server 2008 R2 . Please provide any additional information below. Compile+link log:

Microsoft (R) Program Maintenance Utility Version 11.00.60610.1 Copyright (C) Microsoft Corporation. All rights reserved.

cd libs\libsll
nmake -f Makefile.nmake

Microsoft (R) Program Maintenance Utility Version 11.00.60610.1 Copyright (C) Microsoft Corporation. All rights reserved.

cl /DWINNT /DWIN32 /DHAVE_MALLOC_H /I. /Ox /W3 /wd4996 /nologo /c sll.c 

sll.c lib /nologo sll.obj /out:sll.lib cd .... cd libs\libmsock nmake -f Makefile.nmake

Microsoft (R) Program Maintenance Utility Version 11.00.60610.1 Copyright (C) Microsoft Corporation. All rights reserved.

cl /DWINNT /DWIN32 /DHAVE_MALLOC_H /DHAVE_OPENSSL /DHAVE_GETADDRINFO=1 /Ic:\openssl\include /I. /Ox /W3 /wd4996 /nologo /c msock.c 

msock.c msock.c(187) : warning C4101: 'sockaddr_ipv4' : unreferenced local variable msock.c(268) : warning C4101: 'sa' : unreferenced local variable msock.c(271) : warning C4101: 'addr' : unreferenced local variable lib /nologo msock.obj /out:msock.lib cd .... cd libs\libmutils nmake -f Makefile.nmake

Microsoft (R) Program Maintenance Utility Version 11.00.60610.1 Copyright (C) Microsoft Corporation. All rights reserved.

cl /DWINNT /DWIN32 /DHAVE_MALLOC_H /DHAVE_STRING_H /DHAVE_FCNTL_H /DHAVE_CTYPE_H /DHAVE_STDLIB_H /DHAVE_OPENSSL /I. /Ic:/openssl/include /Ox /W3 /wd4996 /nologo /c string.c mutils.c mutils_mime.c mutils_error.c mutils_blob.c mutils_temp.c mutils_time.c 

string.c mutils.c mutils.c(1605) : warning C4101: 'space' : unreferenced local variable mutils_mime.c mutils_error.c mutils_blob.c mutils_blob.c(564) : warning C4018: '>' : signed/unsigned mismatch mutils_temp.c mutils_temp.c(30) : warning C4101: 'tfwd' : unreferenced local variable mutils_temp.c(110) : warning C4101: 'tfwd' : unreferenced local variable mutils_time.c mutils_time.c(48) : warning C4101: 'rc' : unreferenced local variable mutils_time.c(45) : warning C4101: 'now' : unreferenced local variable Generating Code... lib /nologo string.obj mutils.obj mutils_mime.obj mutils_error.obj mutils_blob.obj mutils_temp.obj mutils_time.obj /out:mutils.lib cd .... cl -I. -I./libs/libmutils -I./libs/libmsock -I./libs/libsll -Ic:/openssl/include -DWINNT=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MATH_H=1 -DHAVE_OPENSSL=1 -DHAVE_GETADDRINFO=1 /Ox /W3 /wd4996 /nologo /c main.c smtp.c utils.c setget.c main.c C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\INCLUDE\fcntl.h(77) : warning C4005: 'O_BINARY' : macro redefinition ./libs/libmutils\mutils.h(110) : see previous definition of 'O_BINARY' smtp.c C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\INCLUDE\fcntl.h(77) : warning C4005: 'O_BINARY' : macro redefinition ./libs/libmutils\mutils.h(110) : see previous definition of 'O_BINARY' smtp.c(563) : warning C4244: 'function' : conversion from 'time_t' to 'unsigned int', possible loss of data utils.c C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\INCLUDE\fcntl.h(77) : warning C4005: 'O_BINARY' : macro redefinition ./libs/libmutils\mutils.h(110) : see previous definition of 'O_BINARY' setget.c C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\INCLUDE\fcntl.h(77) : warning C4005: 'O_BINARY' : macro redefinition ./libs/libmutils\mutils.h(110) : see previous definition of 'O_BINARY' Generating Code... cl -I. -I./libs/libmutils -I./libs/libmsock -I./libs/libsll -Ic:/openssl/include -DWINNT=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MATH_H=1 -DHAVE_OPENSSL=1 -DHAVE_GETADDRINFO=1 /Ox /W3 /wd4996 /nologo ./libs/libmsock/msock.lib ./libs/libsll/sll.lib ./libs/libmutils/mutils.lib c:/openssl/lib/libeay32.lib c:/openssl/lib/ssleay32.lib ws2_32.lib shell32.lib advapi32.lib user32.lib gdi32.lib winmm.lib comdlg32.lib comctl32.lib main.obj smtp.obj utils.obj setget.obj /Femailsend.exe

Original issue: http://code.google.com/p/mailsend/issues/detail?id=18

muquit commented 10 years ago

From muq...@gmail.com on August 30, 2013 17:18:37

Compile OpenSSL yourself statically and then link. That's what I do. Or copy LIBEAY32.DLL to the same directory where mailsend.exe is, that should work too.

muquit commented 10 years ago

From muq...@gmail.com on October 20, 2013 12:22:57

Status: Done