Boost C++ Libraries: Ticket #9051: jam build system refuses to work on windows, won't build on mingw-w64 https://svn.boost.org/trac10/ticket/9051 <ul><li>batch files don't run for mingw-w64, they are only for MSVC++. </li></ul><ul><li>no Makefiles </li></ul><ul><li>Jam build system refuses to run on windows, the file extension is unrecognized, and no exe is provided for it to run like was previously the case. </li></ul><ul><li>windows 7 64-bit and mingw-w64+MSYS (gcc) is my platform. </li></ul><ul><li>I would give you the URL for the compilers, but this bug tracking system rejects them as spam, and there are numerous there, you want personal rubenvb 4.8 stdthread experimental. the x86_64 on the far left is the target processor, and the win32 or win64 on the right is the host (what you are running) </li></ul> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9051 Trac 1.4.3 viboes Mon, 02 Sep 2013 19:32:57 GMT component changed https://svn.boost.org/trac10/ticket/9051#comment:1 https://svn.boost.org/trac10/ticket/9051#comment:1 <ul> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">Building Boost</span> </li> </ul> Ticket Steven Watanabe Tue, 01 Apr 2014 20:43:25 GMT <link>https://svn.boost.org/trac10/ticket/9051#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9051#comment:2</guid> <description> <p> The batch scripts should work for MinGW. You just have to run them from a cmd prompt rather than MSys. </p> <p> There are also shell scripts (.sh) which should work under MSys in 1.55. I'm not sure what the status in 1.54 is. </p> <p> I don't know what you mean by "the file extension is unrecognized." What files are you referring to? The source for b2 (formerly bjam) is part of the Boost distribution. </p> </description> <category>Ticket</category> </item> <item> <author>jmichae3@…</author> <pubDate>Thu, 03 Apr 2014 05:52:19 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9051#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9051#comment:3</guid> <description> <p> it's been a while, my guess was it is the .jam file extension that it not recognized. found bjam.exe however, due to multiple problems with the batch file used for the build with 1.55.0, it refuses again to build in either MSYS+mingw-w64 or mingw. just following the directions. there is a .bat file for this, but apparently there needs to be some better skills in writing one. providing a .bat and a .cmd file would be better - the .bat would work for DOS compilers, and the .cmd would work for windows. the .cmd shell has a LOT more features like </p> <pre class="wiki">if condition ( ) else ( ) if condition ( ) </pre><p> like </p> <pre class="wiki">if /i @%somevar%@ neq @--help@ ( echo help text ) else ( ) </pre><p> rem this processes the whole dir tree of cpp files in 5 lines </p> <pre class="wiki">for /f %%x in ('dir/s/b d:\projects\boost_1_55_0\*.cpp') do ( rem %%~fx is the full file path %CC% %CCOPTS% -o %%~dpx%%~nx.o %%~fx ) </pre><p> to do string extraction: </p> <pre class="wiki">rem remove double quotes set arg=%1 rem this works like AND if @^"@==@%arg:~-1%@ if @^"@==@%arg:~0,1%@ set arg=%arg:1,-1% </pre><p> and note that if anything has spaces in a filepath, surrounding it with double quotes will solve that problem. like "%%~fx" </p> <p> to get help with the commands try adding /? to the command like </p> <pre class="wiki">for /? set /? </pre><p> (that one is a wealth of info) </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Thu, 03 Apr 2014 05:55:37 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9051#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9051#comment:4</guid> <description> <pre class="wiki">if @^"@==@^%arg:~-1%@ if @^"@==@^%arg:~0,1%@ set arg=%arg:1,-1% </pre><p> might be a correction to that. caret escapes a character sometimes. in the case of % in a file for for /f, %% is like % </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Steven Watanabe</dc:creator> <pubDate>Thu, 03 Apr 2014 15:53:33 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9051#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9051#comment:5</guid> <description> <p> Huh? .bat and .com are both processed by cmd.exe. The differences in behavior are extremely minor. See also <a class="ext-link" href="http://stackoverflow.com/questions/148968/windows-batch-files-bat-vs-cmd"><span class="icon">​</span>http://stackoverflow.com/questions/148968/windows-batch-files-bat-vs-cmd</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Fri, 04 Apr 2014 19:33:14 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9051#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9051#comment:6</guid> <description> <p> the differences between cmd and .bat are larger than just that small bullet list. BIG difference. the cmd shell is pretty much a shell scripting language. when a .bat is used, that functionality is lost - long filenames, long paths, etc. one issue that may come up is the long filepaths made by the boost directories. they are very deep and max out NTFS's filepath limit of 260 chars (fine for *nix which doesn't have a limit that I know of). also, .bat has a commandline limit of 127 chars. you should know these limitations before using .bat and program accordingly. there are workarounds for some of this, like shortened filenames. do a for /? to get help. for /f has a version of its variable expansion stuff which shortens filepaths to 8.3, but know that your compiled result will probably look the same and may not be compatible with whoever uses the headers. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Steven Watanabe</dc:creator> <pubDate>Fri, 04 Apr 2014 20:15:00 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9051#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9051#comment:7</guid> <description> <p> All the things that you've described as features of .cmd work in .bat scripts as well (and are used in the Boost scripts). Are you sure that you're running the scripts with cmd.exe? You're on Windows 7, so the ancient DOS command.com (which is much more limited) should not even exist. </p> </description> <category>Ticket</category> </item> <item> <author>jmichae3@…</author> <pubDate>Sat, 05 Apr 2014 05:48:35 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9051#comment:8 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9051#comment:8</guid> <description> <p> 32-bit machines have a command.com but x64 machines don't. the 32-bit machines' command.com DO act differently. cmd.exe basically calls command.com for DOS executables like .com .bat on those machines. on x64 .com and dos exe's do not execute in cmd shell (for one, because there is no DPMI). you are right about the fact that .bat and .cmd run the same on an x64 machine, testing on my x64 box has just confirmed this. but this was not the case with my 32-bit xp box when I had it. command.com has a much smaller subset of commands and features, a holdover from DOS - in fact, command.com came from DOS. </p> </description> <category>Ticket</category> </item> </channel> </rss>