Hello, I'm trying to get gambc40b15 running under Visual Studio 2003. I haven't found Visual studio project files that work with any of the versions of gambit that I have (12-15), so I'm trying to role my own.
I've gotten it to compile and link with no errors, but when I run the executable, I get repeated errors like these:
(peek-char '#<input-output-port #2 (console)>) > *** ERROR -- Error code 11
Has anyone seen this before?
I believe code 11 here is EAGAIN which is the value that a non-blocking socket read should return when there's no data. I think think is and should be happening here, but I don't understand why it's treated as an error.
It appears to me to be a problem with my preprocessor directives s.t. the USE_PUMPS code isn't working.
Here are the preprocessor definitions I'm using (the full build log is at the end).
HAVE_STDIO_H;HAVE_ERRNO_H;_DEBUG;WIN32;_CONSOLE;___SINGLE_HOST
I don't know whether other HAVE+xxx declarations are needed.
I've inserted pragmas that print messages which show that USE_PUMPS is getting defined. (I focused on that because I'm guessing they're relative to the peek.)
I also had to insert the extern "C" declaration in this code from os_tty.c so that GetConsoleWindow would link:
#ifdef USE_WIN32
// Shirley - kludge here to make this work. I don't understand why we're using C++ extern "C" {
HWND WINAPI GetConsoleWindow(void);
} ___HIDDEN BOOL WINAPI console_event_handler ___P((DWORD dwCtrlType), ());
#endif
The the build log is below. I'd very much appreciate any suggestions or directions to try. Thanks, Mark Shirley
----------------------------------------
------- Build started: Project: msc_gsi, Configuration: Debug|Win32 -------
Command Lines
Creating temporary file "c:\Documents and Settings\Mark Sh\Desktop\gambc40b15\Debug\RSP000003.rsp" with contents [ /Od /I ".\lib" /I ".\include" /D "HAVE_STDIO_H" /D "HAVE_ERRNO_H" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "___SINGLE_HOST" /D "_MBCS" /Gm /EHsc /MLd /Fp".\Debug/MSC_GSI.pch" /Fo".\Debug/" /Fd".\Debug/" /W1 /c /ZI /TP ".\lib\setup.c" ".\lib\os_tty.c" ".\lib\os_time.c" ".\lib\os_shell.c" ".\lib\os_io.c" ".\lib\os_files.c" ".\lib\os_dyn.c" ".\lib\os_base.c" ".\lib\os.c" ".\lib\mem.c" ".\lib\main.c" ".\lib\c_intf.c" ".\lib_thread.c" ".\lib_system.c" ".\lib_std.c" ".\lib_repl.c" ".\lib_num.c" ".\lib_nonstd.c" ".\lib_kernel.c" ".\lib_io.c" ".\gsi_gsi_.c" ".\gsi_gsi.c" ".\lib_gambc.c" ".\lib_eval.c" ] Creating command line "cl.exe @"c:\Documents and Settings\Mark Sh\Desktop\gambc40b15\Debug\RSP000003.rsp" /nologo" Creating temporary file "c:\Documents and Settings\Mark Sh\Desktop\gambc40b15\Debug\RSP000004.rsp" with contents [ /OUT:".\Debug/GSI.exe" /INCREMENTAL:NO /DEBUG /PDB:".\Debug/GSI.pdb" /SUBSYSTEM:CONSOLE /MACHINE:X86 ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ".\Debug_eval.obj" ".\Debug_gambc.obj" ".\Debug_gsi.obj" ".\Debug_gsi_.obj" ".\Debug_io.obj" ".\Debug_kernel.obj" ".\Debug_nonstd.obj" ".\Debug_num.obj" ".\Debug_repl.obj" ".\Debug_std.obj" ".\Debug_system.obj" ".\Debug_thread.obj" ".\Debug\c_intf.obj" ".\Debug\main.obj" ".\Debug\mem.obj" ".\Debug\os.obj" ".\Debug\os_base.obj" ".\Debug\os_dyn.obj" ".\Debug\os_files.obj" ".\Debug\os_io.obj" ".\Debug\os_shell.obj" ".\Debug\os_time.obj" ".\Debug\os_tty.obj" ".\Debug\setup.obj" ] Creating command line "link.exe @"c:\Documents and Settings\Mark Sh\Desktop\gambc40b15\Debug\RSP000004.rsp""
Output Window
Compiling... setup.c _WIN32 is defined! defining USE_PUMPS! INCLUDE_errno_h is defined! including errno.h os_tty.c _WIN32 is defined! defining USE_PUMPS! INCLUDE_errno_h is defined! including errno.h os_time.c _WIN32 is defined! defining USE_PUMPS! INCLUDE_errno_h is defined! including errno.h os_shell.c _WIN32 is defined! defining USE_PUMPS! INCLUDE_errno_h is defined! including errno.h os_io.c _WIN32 is defined! defining USE_PUMPS! INCLUDE_errno_h is defined! including errno.h os_files.c _WIN32 is defined! defining USE_PUMPS! INCLUDE_errno_h is defined! including errno.h os_dyn.c _WIN32 is defined! defining USE_PUMPS! INCLUDE_errno_h is defined! including errno.h os_base.c _WIN32 is defined! defining USE_PUMPS! INCLUDE_errno_h is defined! including errno.h os.c _WIN32 is defined! defining USE_PUMPS! INCLUDE_errno_h is defined! including errno.h mem.c _WIN32 is defined! defining USE_PUMPS! INCLUDE_errno_h is defined! including errno.h main.c _WIN32 is defined! defining USE_PUMPS! INCLUDE_errno_h is defined! including errno.h c_intf.c _WIN32 is defined! defining USE_PUMPS! INCLUDE_errno_h is defined! including errno.h _thread.c _WIN32 is defined! _system.c _WIN32 is defined! _std.c _WIN32 is defined! _repl.c _WIN32 is defined! _num.c _WIN32 is defined! _nonstd.c _WIN32 is defined! _kernel.c _WIN32 is defined! defining USE_PUMPS! INCLUDE_errno_h is defined! including errno.h _io.c _WIN32 is defined! c:\Documents and Settings\Mark Sh\Desktop\gambc40b15\lib_io.c(65536) : warning C4049: compiler limit : terminating line number emission Compiler limit for line number is 65535 Generating Code... Compiling... _gsi_.c _WIN32 is defined! _gsi.c _WIN32 is defined! _gambc.c _WIN32 is defined! _eval.c _WIN32 is defined! Generating Code... Linking... Microsoft (R) Incremental Linker Version 7.10.3077 Copyright (C) Microsoft Corporation. All rights reserved. "/OUT:.\Debug/GSI.exe" /INCREMENTAL:NO /DEBUG "/PDB:.\Debug/GSI.pdb" /SUBSYSTEM:CONSOLE /MACHINE:X86 ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ".\Debug_eval.obj" ".\Debug_gambc.obj" ".\Debug_gsi.obj" ".\Debug_gsi_.obj" ".\Debug_io.obj" ".\Debug_kernel.obj" ".\Debug_nonstd.obj" ".\Debug_num.obj" ".\Debug_repl.obj" ".\Debug_std.obj" ".\Debug_system.obj" ".\Debug_thread.obj" ".\Debug\c_intf.obj" ".\Debug\main.obj" ".\Debug\mem.obj" ".\Debug\os.obj" ".\Debug\os_base.obj" ".\Debug\os_dyn.obj" ".\Debug\os_files.obj" ".\Debug\os_io.obj" ".\Debug\os_shell.obj" ".\Debug\os_time.obj" ".\Debug\os_tty.obj" ".\Debug\setup.obj" LINK : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification
Results
Build log was saved at "file://c:\Documents and Settings\Mark Sh\Desktop\gambc40b15\Debug\BuildLog.htm" msc_gsi - 0 error(s), 2 warning(s)
Dr. Mark Shirley NASA Ames Research Center MS 269-2 Moffett Field, CA 94035 650 604 3389 Mark.H.Shirley@nasa.gov