Hi! First of all I figured it out that i should use SHLIB_EX_OBJ not APP_EX_OBJ :))
Second if I add both uplink.obj and uptable.obj to SHLIB_EX_OBJ then I cannot link libeay32.dll: link /nologo /subsystem:console /opt:ref bufferoverflowU.lib /dll /out:o ut32dll\libeay32.dll /def:ms/LIBEAY32.def @C:\DOCUME~1\admin\LOCALS~1\Temp\nm118 3.tmp uplink.obj : error LNK2005: OPENSSL_UplinkTable already defined in uptable.obj uplink.obj : error LNK2005: $lazy1 already defined in uptable.obj uplink.obj : error LNK2005: $lazy2 already defined in uptable.obj uplink.obj : error LNK2005: $lazy3 already defined in uptable.obj uplink.obj : error LNK2005: $lazy4 already defined in uptable.obj uplink.obj : error LNK2005: $lazy5 already defined in uptable.obj uplink.obj : error LNK2005: $lazy6 already defined in uptable.obj uplink.obj : error LNK2005: $lazy7 already defined in uptable.obj uplink.obj : error LNK2005: $lazy8 already defined in uptable.obj uplink.obj : error LNK2005: $lazy9 already defined in uptable.obj uplink.obj : error LNK2005: $lazy10 already defined in uptable.obj uplink.obj : error LNK2005: $lazy11 already defined in uptable.obj uplink.obj : error LNK2005: $lazy12 already defined in uptable.obj uplink.obj : error LNK2005: $lazy13 already defined in uptable.obj uplink.obj : error LNK2005: $lazy14 already defined in uptable.obj uplink.obj : error LNK2005: $lazy15 already defined in uptable.obj uplink.obj : error LNK2005: $lazy16 already defined in uptable.obj uplink.obj : error LNK2005: $lazy17 already defined in uptable.obj uplink.obj : error LNK2005: $lazy18 already defined in uptable.obj uplink.obj : error LNK2005: $lazy19 already defined in uptable.obj uplink.obj : error LNK2005: $lazy20 already defined in uptable.obj uplink.obj : error LNK2005: $lazy21 already defined in uptable.obj uplink.obj : error LNK2005: $lazy22 already defined in uptable.obj ms/LIBEAY32.def(7) : warning LNK4017: DESCRIPTION statement not supported for the target platform; ignored Creating library out32dll\libeay32.lib and object out32dll\libeay32.exp out32dll\libeay32.dll : fatal error LNK1169: one or more multiply defined symbol s found NMAKE : fatal error U1077: 'link' : return code '0x491' Stop. If I add only uptable.obj then it can create libeay32.dll successfully. However I cannot link ssleay32.dll. So I figured it out that I do not need uptable.obj to link ssleay32.dll so I rewrite the ntdll.mak file: SHLIB_EX_OBJ_SSL= SHLIB_EX_OBJ_CRYPTO=uptable.obj and then I modified the end of the mak file to use these variables for the dlls. So finally successful to build on amd 64 both statically and dynamically. Thanks a lot. All tests are also successful. I summarize here what to modify in the mak files to build on AMD 64: Remove: SHLIB_EX_OBJ= Add: SHLIB_EX_OBJ_SSL= SHLIB_EX_OBJ_CRYPTO=uptable.obj Modify: CFLAGS= to remove /WX option because of size_t conversations and I also recommend to use /MT instead of /MD for the static link libraries in nt.mak file. LFLAGS=/nologo /subsystem:console /opt:ref bufferoverflowU.lib (so remove /machine:I386 flag and add bufferoverflowU.lib) Only in ntdll.mak: MLFLAGS= /nologo /subsystem:console /opt:ref bufferoverflowU.lib /dll (so remove /machine:I386 flag and add bufferoverflowU.lib) Modify the following to use SHLIB_EX_OBJ_SSL instead of SHLIB_EX_OBJ: $(O_SSL): $(SSLOBJ) $(LINK) $(MLFLAGS) /out:$(O_SSL) /def:ms/SSLEAY32.def @<< $(SHLIB_EX_OBJ_SSL) $(SSLOBJ) $(L_CRYPTO) wsock32.lib gdi32.lib advapi32.lib user32.lib << Modify the following to use SHLIB_EX_OBJ_CRYPTO instead of SHLIB_EX_OBJ: $(O_CRYPTO): $(CRYPTOOBJ) $(LINK) $(MLFLAGS) /out:$(O_CRYPTO) /def:ms/LIBEAY32.def @<< $(SHLIB_EX_OBJ_CRYPTO) $(CRYPTOOBJ) wsock32.lib gdi32.lib advapi32.lib user32.lib << So how to build on AMD 64 and Intel EM64T I summarize here: 1. perl Configure VC-WIN32 2. ms\do_ms 3. perl ms/uplink.pl win64a > uptable.asm 4. ml64 -c uptable.asm 5. modify the mak files as above 6. nmake -f ms\ntdll.mak 7. nmake -f ms\nt.mak I used the new platform SDK with 64 bit compiler and MSVC++. I hope it helps others out. Thank you for your help, -- Matyas Majzik ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager [EMAIL PROTECTED]