[Simh] Building PDP-10 with Visual C++ 2005 Express

Dell Setzer dsetzer at panix.com
Tue Apr 24 08:17:44 EDT 2007


The references to _xu_dev, _dz_dev, etc. are devices from the pdp11 source 
tree. Just include those pdp11 source files which define those devices in 
your pdp10 project. The references to __imp_htonl at 4, etc. can be resolved 
by linking in the library "wsock32.lib" (the WinSock network library). The 
references to __imp_timeGetTime at 0, etc. can be resolved by linking in the 
library "winmm.lib" (the Windows multimedia library). Both of these 
libraries are provided with VC++. The reference to WinMain can be fixed by 
changing your project type to be "console application" (you may need to 
re-create the project to do this). I have built all of the SIMH emulators 
(including pdp10) under VC++ with good results.

Hope this helps,
...dell

On Mon, 23 Apr 2007, Rich Alderson wrote:

> In order to delve more deeply into the mechanics of disk drive emulation in
> SimH, I have been trying to build the PDP-10 emulator using the zero-cost
> Visual C++ 2005 Express product from Microsoft.  After figuring out how to make
> it point to all the necessary include and lib files (including downloading the
> Win32 SDK), I am having a problem with unresolved externals in the linker.
>
> 1>------ Build started: Project: SimH PDP-10, Configuration: Debug Win32 ------
> 1>Linking...
> 1>pdp10_sys.obj : error LNK2001: unresolved external symbol _xu_dev
> 1>pdp10_sys.obj : error LNK2001: unresolved external symbol _dz_dev
> 1>pdp10_sys.obj : error LNK2001: unresolved external symbol _cr_dev
> 1>pdp10_sys.obj : error LNK2001: unresolved external symbol _ry_dev
> 1>pdp10_sys.obj : error LNK2001: unresolved external symbol _ptp_dev
> 1>pdp10_sys.obj : error LNK2001: unresolved external symbol _ptr_dev
> 1>sim_ether.obj : error LNK2019: unresolved external symbol __imp__htonl at 4 referenced in function _eth_add_crc32
> 1>sim_sock.obj : error LNK2001: unresolved external symbol __imp__htonl at 4
> 1>sim_ether.obj : error LNK2019: unresolved external symbol __imp__ntohs at 4 referenced in function _eth_packet_trace_ex
> 1>sim_sock.obj : error LNK2019: unresolved external symbol __imp__WSAGetLastError at 0 referenced in function _sim_err_sock
> 1>sim_sock.obj : error LNK2019: unresolved external symbol __imp__socket at 12 referenced in function _sim_create_sock
> 1>sim_sock.obj : error LNK2019: unresolved external symbol __imp__WSAStartup at 8 referenced in function _sim_create_sock
> 1>sim_sock.obj : error LNK2019: unresolved external symbol __imp__listen at 8 referenced in function _sim_master_sock
> 1>sim_sock.obj : error LNK2019: unresolved external symbol __imp__bind at 12 referenced in function _sim_master_sock
> 1>sim_sock.obj : error LNK2019: unresolved external symbol __imp__htons at 4 referenced in function _sim_master_sock
> 1>sim_sock.obj : error LNK2019: unresolved external symbol __imp__connect at 12 referenced in function _sim_connect_sock
> 1>sim_sock.obj : error LNK2019: unresolved external symbol __imp__ntohl at 4 referenced in function _sim_accept_conn
> 1>sim_sock.obj : error LNK2019: unresolved external symbol __imp__accept at 12 referenced in function _sim_accept_conn
> 1>sim_sock.obj : error LNK2019: unresolved external symbol ___WSAFDIsSet at 8 referenced in function _sim_check_conn
> 1>sim_sock.obj : error LNK2019: unresolved external symbol __imp__select at 20 referenced in function _sim_check_conn
> 1>sim_sock.obj : error LNK2019: unresolved external symbol __imp__recv at 16 referenced in function _sim_read_sock
> 1>sim_sock.obj : error LNK2019: unresolved external symbol __imp__send at 16 referenced in function _sim_write_sock
> 1>sim_sock.obj : error LNK2019: unresolved external symbol __imp__WSACleanup at 0 referenced in function _sim_close_sock
> 1>sim_sock.obj : error LNK2019: unresolved external symbol __imp__closesocket at 4 referenced in function _sim_close_sock
> 1>sim_sock.obj : error LNK2019: unresolved external symbol __imp__ioctlsocket at 12 referenced in function _sim_setnonblock
> 1>sim_timer.obj : error LNK2019: unresolved external symbol __imp__timeGetTime at 0 referenced in function _sim_os_msec
> 1>sim_timer.obj : error LNK2019: unresolved external symbol __imp__timeEndPeriod at 4 referenced in function _sim_timer_exit
> 1>sim_timer.obj : error LNK2019: unresolved external symbol __imp__timeBeginPeriod at 4 referenced in function _sim_os_ms_sleep_init
> 1>sim_timer.obj : error LNK2019: unresolved external symbol __imp__timeGetDevCaps at 8 referenced in function _sim_os_ms_sleep_init
> 1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain at 16 referenced in function ___tmainCRTStartup
> 1>Debug\SimH PDP-10.exe : fatal error LNK1120: 29 unresolved externals
> 1>Build log was saved at "file://c:\Users\richa\Documents\Visual Studio 2005\Projects\Debug\BuildLog.htm"
> 1>SimH PDP-10 - 31 error(s), 0 warning(s)
> ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
>
> I feel certain that this is due to something I've missed, but being neither a C
> programmer nor an IDE user I haven't a clue what it might be.
>
> Advice, anyone?  All I want to do is fire up a debugger on this and watch how
> it does certain operations.
>
>                                                                Rich Alderson
> _______________________________________________
> Simh mailing list
> Simh at trailing-edge.com
> http://mailman.trailing-edge.com/mailman/listinfo/simh
>



More information about the Simh mailing list