Skip to content

Instantly share code, notes, and snippets.

@FilBot3
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FilBot3/9062785 to your computer and use it in GitHub Desktop.
Save FilBot3/9062785 to your computer and use it in GitHub Desktop.
MinGW - Boost 1.55 Errors on Windows 8 64bit
@echo off
if not exist "%~dp0bin\gcc.exe" goto epicfail
if "%X_DISTRO%" == "nuwen" goto :eof
set X_DISTRO=nuwen
if exist "%~dp0git\cmd\git.exe" set PATH=%~dp0git\cmd;%PATH%
set PATH=%~dp0bin;%PATH%
set X_MEOW=%~dp0include;%~dp0include\freetype2
if defined C_INCLUDE_PATH (set C_INCLUDE_PATH=%X_MEOW%;%C_INCLUDE_PATH%) else (set C_INCLUDE_PATH=%X_MEOW%)
if defined CPLUS_INCLUDE_PATH (set CPLUS_INCLUDE_PATH=%X_MEOW%;%CPLUS_INCLUDE_PATH%) else (set CPLUS_INCLUDE_PATH=%X_MEOW%)
set X_MEOW=
goto :eof
:epicfail
color 4f
echo ERROR: You must run %~nx0 from the root of the distro.
echo Don't copy or move this batch file.
title ERROR
goto :eof
>g++ boost_test_link.cpp -o boost_test_link.exe
C:\Users\joe\AppData\Local\Temp\ccofvw0A.o:boost_test_link.cpp:(.text$_ZN5boost9re_detail27cpp_regex_traits_char_layerIcEC2ERKNS0_21cpp_regex_traits_baseIcEE[_ZN5boost9re_detail27cpp_regex_traits_char_layerIcEC2ERKNS0_21cpp_regex_traits_baseIcEE]+0x2b): undefined reference to `boost::re_detail::cpp_regex_traits_char_layer<char>::init()'
C:\Users\joe\AppData\Local\Temp\ccofvw0A.o:boost_test_link.cpp:(.text$_ZN5boost9re_detail11raw_storage6extendEy[_ZN5boost9re_detail11raw_storage6extendEy]+0x5f): undefined reference to `boost::re_detail::raw_storage::resize(unsigned long long)'
c:/mingw-boost/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.8.2/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\joe\AppData\Local\Temp\ccofvw0A.o: bad reloc address 0x5f in section `.text$_ZN5boost9re_detail11raw_storage6extendEy[_ZN5boost9re_detail11raw_storage6extendEy]'
collect2.exe: error: ld returned 1 exit status
> g++ simple_ls.cpp -o simple_ls.exe
C:\Users\joe\AppData\Local\Temp\ccQLpVCt.o:simple_ls.cpp:(.text+0x1ba): undefined reference to `boost::filesystem::path::filename() const'
C:\Users\joe\AppData\Local\Temp\ccQLpVCt.o:simple_ls.cpp:(.text+0x23a): undefined reference to `boost::filesystem::path::filename() const'
C:\Users\joe\AppData\Local\Temp\ccQLpVCt.o:simple_ls.cpp:(.text+0x294): undefined reference to `boost::filesystem::path::filename() const'
C:\Users\joe\AppData\Local\Temp\ccQLpVCt.o:simple_ls.cpp:(.text+0x4bf): undefined reference to `boost::filesystem::path::filename() const'
c:/mingw-boost/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.8.2/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\joe\AppData\Local\Temp\ccQLpVCt.o: bad reloc address 0x0 in section `.data'
collect2.exe: error: ld returned 1 exit status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment