I tried compiling a C program compiled by Gambit C.<br>My compiler is Visual C++ 2010 Express Edition.<br>I'm getting this error: "unresolved external symbol ____G__20_h". <br>I included the steps I did to create the VC++ project below. <br>
Please point out any mistakes.<br>Thanks.<br>-Fiel<br><br>Compiler error messages:<br>1>------ Rebuild All started: Project: h, Configuration: Debug Win32 ------<br>1>  Performing Custom Build Tools<br>1>  stdafx.cpp<br>
1>  h.c<br>1>d:\user directories\user\documents\visual studio 2010\projects\h\h\h.c(103): warning C4102: '___L3__20_h' : unreferenced label<br>1>d:\user directories\user\documents\visual studio 2010\projects\h\h\h.c(100): warning C4102: '___L2__20_h' : unreferenced label<br>
1>d:\user directories\user\documents\visual studio 2010\projects\h\h\h.c(98): warning C4102: '___L1__20_h' : unreferenced label<br>1>d:\user directories\user\documents\visual studio 2010\projects\h\h\h.c(92): warning C4102: '___L__20_h' : unreferenced label<br>
1>d:\user directories\user\documents\visual studio 2010\projects\h\h\h.c(89): warning C4102: '___L0__20_h' : unreferenced label<br>1>d:\user directories\user\documents\visual studio 2010\projects\h\h\h.c(80): warning C4101: '___s64_temp' : unreferenced local variable<br>
1>d:\user directories\user\documents\visual studio 2010\projects\h\h\h.c(80): warning C4101: '___s32_temp' : unreferenced local variable<br>1>d:\user directories\user\documents\visual studio 2010\projects\h\h\h.c(80): warning C4101: '___u64_temp' : unreferenced local variable<br>
1>d:\user directories\user\documents\visual studio 2010\projects\h\h\h.c(80): warning C4101: '___u32_temp' : unreferenced local variable<br>1>  gambit.c<br>1>  Generating Code...<br><span style="background-color: rgb(255, 255, 102);">1>h.obj : error LNK2001: unresolved external symbol ____G__20_h</span><br>
1>d:\user directories\user\Documents\Visual Studio 2010\Projects\h\Debug\h.exe : fatal error LNK1120: 1 unresolved externals<br>========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========<br><br>Here are the steps I took to create the Visual C++ project:<br>
<br>1. Project-wide settings (project type is unmanaged win32 console application):<ul><li>Added "C:\Program Files (x86)\Gambit-C\v4.6.0\lib" and "C:\Program Files (x86)\Gambit-C\v4.6.0\include" to additional include directories. "include" is needed for including "_gambc.c" in gambit.c below.<br>
</li><li>Added "C:\Program Files (x86)\Gambit-C\v4.6.0\lib" to additional library directories.</li><li>Added "___APPLICATION" to C preprocessor definitions. This causes main() to be defined.<br></li><li>
Added "ws2_32.lib" and "libgambc.lib" to additional libraries.<br></li></ul>2. Added file "h.scm" to project. Added custom build tool to compile "h.scm" to "h.c". Custom build tool command line for h.scm: 
"c:\Program Files (x86)\Gambit-C\v4.6.0\bin\gsc.exe" -c "%(FullPath)".<br>3. Added file "h.c" to project. Set it to be compiled as C code. Turned off usage of precompiled headers. <br>4. Added file "gambit.c" to project. Set it to be compiled as C code. Turned off usage of precompiled headers.<br>
5. Contents of h.scm:<br>
(display "hello") (newline)<br>
-----<br>6. Contents of "gambit.c":<br>
#include "_gambc.c"<br>
-----<br><br><br><br><br><br><br>