<div><br></div>Ok, that gets me past the missing collection exception. Now it crashes inside libracket3m_8bh1a8.dll. Here's the callstack... this is the stock 5.3 distribution so a stock map file may help:<div><br></div>
<div><div><font face="courier new, monospace">><span class="Apple-tab-span" style="white-space:pre">        </span>libracket3m_8bh1a8.dll!0f548983() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div><div>
<font face="courier new, monospace"> <span class="Apple-tab-span" style="white-space:pre">        </span>[Frames below may be incorrect and/or missing, no symbols loaded for libracket3m_8bh1a8.dll]<span class="Apple-tab-span" style="white-space:pre">        </span></font></div>
<div><font face="courier new, monospace"> <span class="Apple-tab-span" style="white-space:pre">        </span>libracket3m_8bh1a8.dll!0f549ad1() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div><div><font face="courier new, monospace"> <span class="Apple-tab-span" style="white-space:pre">        </span>libracket3m_8bh1a8.dll!0f6c5a34() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div>
<div><font face="courier new, monospace"> <span class="Apple-tab-span" style="white-space:pre">        </span>libracket3m_8bh1a8.dll!0f6c5ab0() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div><div><font face="courier new, monospace"> <span class="Apple-tab-span" style="white-space:pre">        </span>libracket3m_8bh1a8.dll!0f751e2f() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div>
<div><font face="courier new, monospace"> <span class="Apple-tab-span" style="white-space:pre">        </span>libracket3m_8bh1a8.dll!0f751f6a() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div><div><font face="courier new, monospace"> <span class="Apple-tab-span" style="white-space:pre">        </span>libracket3m_8bh1a8.dll!0f6e5675() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div>
<div><font face="courier new, monospace"> <span class="Apple-tab-span" style="white-space:pre">        </span>libracket3m_8bh1a8.dll!0f5bea15() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div><div><font face="courier new, monospace"> <span class="Apple-tab-span" style="white-space:pre">        </span>libracket3m_8bh1a8.dll!0f6bfd95() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div>
<div><font face="courier new, monospace"> <span class="Apple-tab-span" style="white-space:pre">        </span>libracket3m_8bh1a8.dll!0f5c0028() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div><div><font face="courier new, monospace"> <span class="Apple-tab-span" style="white-space:pre">        </span>libracket3m_8bh1a8.dll!0f5c03fe() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div>
<div><font face="courier new, monospace"> <span class="Apple-tab-span" style="white-space:pre">        </span>libracket3m_8bh1a8.dll!0f5cb32e() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div><div><font face="courier new, monospace"> <span class="Apple-tab-span" style="white-space:pre">        </span>libracket3m_8bh1a8.dll!0f66095f() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div>
<div><font face="courier new, monospace"> <span class="Apple-tab-span" style="white-space:pre">        </span>libracket3m_8bh1a8.dll!0f660c4e() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div><div><font face="courier new, monospace"> <span class="Apple-tab-span" style="white-space:pre">        </span>libracket3m_8bh1a8.dll!0f66cd83() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div>
<div><font face="courier new, monospace"> <span class="Apple-tab-span" style="white-space:pre">        </span>libracket3m_8bh1a8.dll!0f66d146() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div><div><font face="courier new, monospace"> <span class="Apple-tab-span" style="white-space:pre">        </span>libracket3m_8bh1a8.dll!0f642566() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div>
<div><font face="courier new, monospace"> <span class="Apple-tab-span" style="white-space:pre">        </span>libracket3m_8bh1a8.dll!0f657a93() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div><div><font face="courier new, monospace"> <span class="Apple-tab-span" style="white-space:pre">        </span>libracket3m_8bh1a8.dll!0f666cc9() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div>
<div><font face="courier new, monospace"> <span class="Apple-tab-span" style="white-space:pre">        </span>libracket3m_8bh1a8.dll!0f66a2a7() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div><div><font face="courier new, monospace"> <span class="Apple-tab-span" style="white-space:pre">        </span>libracket3m_8bh1a8.dll!0f66affd() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div>
<div><font face="courier new, monospace"> <span class="Apple-tab-span" style="white-space:pre">        </span>libracket3m_8bh1a8.dll!0f66b0d2() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div><div><font face="courier new, monospace"> <span class="Apple-tab-span" style="white-space:pre">        </span>dctest.exe!run(Scheme_Env * e, int argc, char * * argv) Line 48 + 0xc bytes<span class="Apple-tab-span" style="white-space:pre">        </span>C++</font></div>
<div><font face="courier new, monospace"> <span class="Apple-tab-span" style="white-space:pre">        </span>libracket3m_8bh1a8.dll!0f55baa3() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div><div><font face="courier new, monospace"> <span class="Apple-tab-span" style="white-space:pre">        </span>libracket3m_8bh1a8.dll!0f55d9a5() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div>
<div><font face="courier new, monospace"> <span class="Apple-tab-span" style="white-space:pre">        </span>libracket3m_8bh1a8.dll!0f55da46() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div><div><font face="courier new, monospace"> <span class="Apple-tab-span" style="white-space:pre">        </span>libracket3m_8bh1a8.dll!0f55df3a() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div>
<div><font face="courier new, monospace"> <span class="Apple-tab-span" style="white-space:pre">        </span>dctest.exe!main(int argc, char * * argv) Line 58 + 0x17 bytes<span class="Apple-tab-span" style="white-space:pre">        </span>C++</font></div>
<div><font face="courier new, monospace"> <span class="Apple-tab-span" style="white-space:pre">        </span>dctest.exe!__tmainCRTStartup() Line 555 + 0x19 bytes<span class="Apple-tab-span" style="white-space:pre">        </span>C</font></div>
<div><font face="courier new, monospace"> <span class="Apple-tab-span" style="white-space:pre">        </span>dctest.exe!mainCRTStartup() Line 371<span class="Apple-tab-span" style="white-space:pre">        </span>C</font></div><div><font face="courier new, monospace"> <span class="Apple-tab-span" style="white-space:pre">        </span>kernel32.dll!75b1339a() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div>
<div><font face="courier new, monospace"> <span class="Apple-tab-span" style="white-space:pre">        </span>ntdll.dll!771d9ef2() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div><div><font face="courier new, monospace"> <span class="Apple-tab-span" style="white-space:pre">        </span>ntdll.dll!771d9ec5() <span class="Apple-tab-span" style="white-space:pre">        </span></font></div>
<div><br></div><div>I changed the code to register all Scheme_Objects in the collector, but same result...</div><div><br></div><div>Thanks,</div><div>Dan</div><br><div class="gmail_quote">On Sat, Sep 22, 2012 at 6:04 AM, Matthew Flatt <span dir="ltr"><<a href="mailto:mflatt@cs.utah.edu" target="_blank">mflatt@cs.utah.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The "%RACKETDIR%" in scheme_make_path() isn't going to get expanded as<br>
an environment variable. You'll have to use getenv() directly:<br>
<br>
a[0] = scheme_make_path(getenv("RACKETDIR"));<br>
a[1] = scheme_make_path("collects");<br>
Scheme_Object * collectPath = scheme_build_path(2, a);<br>
Scheme_Object * collectPathList = scheme_build_list(1, &collectPath);<br>
scheme_init_collection_paths(e, collectPathList);<br>
<div><div class="h5"><br>
<br>
At Fri, 21 Sep 2012 16:42:23 -0700, Dan Liebgold wrote:<br>
> I'm having a terrible time trying to embed Racket 5.3 in a C++ program.<br>
> Please take a look at <a href="https://gist.github.com/3764529" target="_blank">https://gist.github.com/3764529</a> and tell me where I'm<br>
> going wrong.<br>
><br>
> This is the output I get:<br>
><br>
> racket/base: standard-module-name-resolver: collection not found<br>
> collection: "racket"<br>
> in collection directories:<br>
> C:\Users\danl\AppData\Roaming\Racket\5.3\collects<br>
> in: racket/base<br>
> context...:<br>
> standard-module-name-resolver<br>
><br>
><br>
> RACKETDIR environment variable is defined properly (and not to the path in<br>
> the output.) Any ideas?<br>
><br>
> --<br>
> Dan Liebgold [<a href="mailto:dan.liebgold@gmail.com">dan.liebgold@gmail.com</a>]<br>
</div></div>> _________________________<br>
> Racket Developers list:<br>
> <a href="http://lists.racket-lang.org/dev" target="_blank">http://lists.racket-lang.org/dev</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Dan Liebgold [<a href="mailto:dan.liebgold@gmail.com">dan.liebgold@gmail.com</a>]<br>
</div>