For verifying that you compiled what you thought you did, dumpbin is invaluable. This is a command line tool which ships with visual studio from Microsoft.
From running:
dumpbin /ARCHIVEMEMBERS /CLRHEADER /DEPENDENTS /EXPORTS /IMPORTS /SUMMARY /SYMBOLS
Over a 32 bit version of hello.dll compiled with Visual Studio 2008 the following output came out:
Microsoft (R) COFF/PE Dumper Version 9.00.30729.01 Copyright (C) Microsoft Corporation. All rights reserved. Dump of file hello.dll File Type: DLL Image has the following dependencies: iguana.exe KERNEL32.dll Section contains the following exports for hello.dll 00000000 characteristics 528F6478 time date stamp Fri Nov 22 09:04:40 2013 0.00 version 1 ordinal base 1 number of functions 1 number of names ordinal hint RVA name 1 0 00001100 luaopen_hello = _luaopen_hello Section contains the following imports: iguana.exe 1000B0F0 Import Address Table 1000C808 Import Name Table 0 time date stamp 0 Index of first forwarder reference 1F luaL_register 3D lua_isnumber 6B lua_tonumber 4F lua_pushnumber 39 lua_gettop 50 lua_pushstring 3E lua_isstring 2C lua_error KERNEL32.dll 1000B000 Import Address Table 1000C718 Import Name Table 0 time date stamp 0 Index of first forwarder reference 1AA GetCurrentProcessId 2A6 HeapSize 1AD GetCurrentThreadId 16F GetCommandLineA 220 GetProcAddress 1F6 GetModuleHandleA 1F9 GetModuleHandleW 434 TlsGetValue 432 TlsAlloc 435 TlsSetValue 433 TlsFree 2C0 InterlockedIncrement 3EC SetLastError 1E6 GetLastError 2BC InterlockedDecrement 2A1 HeapFree 421 Sleep 104 ExitProcess 3E8 SetHandleCount 23B GetStdHandle 1D7 GetFileType 239 GetStartupInfoA BE DeleteCriticalSection 1F4 GetModuleFileNameA 14A FreeEnvironmentStringsA 1BF GetEnvironmentStrings 14B FreeEnvironmentStringsW 47A WideCharToMultiByte 1C1 GetEnvironmentStringsW 29F HeapCreate 2A0 HeapDestroy 457 VirtualFree 354 QueryPerformanceCounter 266 GetTickCount 24F GetSystemTimeAsFileTime 15B GetCPInfo 152 GetACP 213 GetOEMCP 2DB IsValidCodePage 42D TerminateProcess 1A9 GetCurrentProcess 43E UnhandledExceptionFilter 415 SetUnhandledExceptionFilter 2D1 IsDebuggerPresent 2EF LeaveCriticalSection D9 EnterCriticalSection 29D HeapAlloc 454 VirtualAlloc 2A4 HeapReAlloc 48D WriteFile 2F1 LoadLibraryA 2B5 InitializeCriticalSectionAndSpinCount 392 RtlUnwind 2E1 LCMapStringA 31A MultiByteToWideChar 2E3 LCMapStringW 23D GetStringTypeA 240 GetStringTypeW 1E8 GetLocaleInfoA Summary 2000 .data 2000 .rdata 1000 .reloc A000 .text
And this the 64 bit version with the same dumpbin command:
Microsoft (R) COFF/PE Dumper Version 9.00.30729.01 Copyright (C) Microsoft Corporation. All rights reserved. Dump of file hello.dll File Type: DLL Image has the following dependencies: iguana.exe KERNEL32.dll Section contains the following exports for hello.dll 00000000 characteristics 528F67BE time date stamp Fri Nov 22 09:18:38 2013 0.00 version 1 ordinal base 1 number of functions 1 number of names ordinal hint RVA name 1 0 00001130 luaopen_hello = luaopen_hello Section contains the following imports: iguana.exe 18000B1E8 Import Address Table 18000CDF0 Import Name Table 0 time date stamp 0 Index of first forwarder reference 1F luaL_register 3D lua_isnumber 6B lua_tonumber 4F lua_pushnumber 39 lua_gettop 3E lua_isstring 50 lua_pushstring 2C lua_error KERNEL32.dll 18000B000 Import Address Table 18000CC08 Import Name Table 0 time date stamp 0 Index of first forwarder reference 266 GetTickCount 2A6 HeapSize 1AE GetCurrentThreadId 140 FlsSetValue 170 GetCommandLineA D6 EncodePointer B8 DecodePointer 13F FlsGetValue 13E FlsFree 3F0 SetLastError 1E6 GetLastError 13D FlsAlloc 2A1 HeapFree 425 Sleep 1F9 GetModuleHandleW 220 GetProcAddress 105 ExitProcess 3EC SetHandleCount 23B GetStdHandle 1D8 GetFileType 239 GetStartupInfoA BF DeleteCriticalSection 1F4 GetModuleFileNameA 14B FreeEnvironmentStringsA 1C0 GetEnvironmentStrings 14C FreeEnvironmentStringsW 47E WideCharToMultiByte 1C2 GetEnvironmentStringsW 2A5 HeapSetInformation 29F HeapCreate 2A0 HeapDestroy 396 RtlUnwindEx 34E QueryPerformanceCounter 1AB GetCurrentProcessId 24F GetSystemTimeAsFileTime 15C GetCPInfo 153 GetACP 213 GetOEMCP 2D5 IsValidCodePage 431 TerminateProcess 1AA GetCurrentProcess 442 UnhandledExceptionFilter 419 SetUnhandledExceptionFilter 2CB IsDebuggerPresent 397 RtlVirtualUnwind 390 RtlLookupFunctionEntry 389 RtlCaptureContext 2E9 LeaveCriticalSection DA EnterCriticalSection 29D HeapAlloc 2A4 HeapReAlloc 491 WriteFile 2EB LoadLibraryA 2B5 InitializeCriticalSectionAndSpinCount 2DB LCMapStringA 314 MultiByteToWideChar 2DD LCMapStringW 23D GetStringTypeA 240 GetStringTypeW 1E8 GetLocaleInfoA Summary 3000 .data 1000 .pdata 3000 .rdata 1000 .reloc A000 .text
If you look carefully you can see subtle differences in the exports of the two DLLs.