Closed FlorianWolters closed 7 years ago
Hi there, thanks for the feedback.
Does __MINGW32__
get defined in a MinGW 64 bit build? Looks like the following include might be causing problems:
https://github.com/billyquith/ponder/blob/master/src/util.cpp#L33
Is there a generic define for the MinGW environment? That is word size agnostic?
I think MinGW (both x64 and x86) should define __MINGW32__
, but I can't tell for sure. I will investigate this later and come back here to report.
It looks like _MSC_VER
can be used: https://gist.github.com/jonforums/968522
I've changed this. I didn't hear back from you. I'll close the bug. Please get latest and test against that. If there is still a problem re-open the bug.
The problem seems to be fixed in master
, though building with tests does not work:
[51/55] Linking CXX executable test\examples\egtest.exe
FAILED: test/examples/egtest.exe
cmd.exe /C "cd . && D:\win-dev-env\native\mingw-builds\mingw-builds-6.3.0-x86\bin\g++.exe -O3 -DNDEBUG test/examples/CMakeFiles/egtest.dir/main.cpp.obj test/examples/CMakeFiles/egtest.dir/simple.cpp.obj -o test\examples\egtest.exe -Wl,--out-implib,test\examples\libegtest.dll.a -Wl,--major-image-version,0,--minor-image-version,0
libponder.dll.a -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
test/examples/CMakeFiles/egtest.dir/simple.cpp.obj:simple.cpp:(.text+0x28f): undefined reference to `ponder::detail::fmt::print(ponder::detail::fmt::BasicCStringRef<char>, ponder::detail::fmt::ArgList)'
test/examples/CMakeFiles/egtest.dir/simple.cpp.obj:simple.cpp:(.text+0xa4b): undefined reference to `ponder::detail::fmt::print(ponder::detail::fmt::BasicCStringRef<char>, ponder::detail::fmt::ArgList)'
test/examples/CMakeFiles/egtest.dir/simple.cpp.obj:simple.cpp:(.text+0xa50): undefined reference to `ponder::uses::reportAll()'
collect2.exe: error: ld returned 1 exit status
[53/55] Building CXX object test/ponder/CMakeFiles/pondertest.dir/function.cpp.obj
ninja: build stopped: subcommand failed.
Building with the option BUILD_TEST=OFF
seems to work.
I try to build Ponder with GCC 6.3.0 (MinGW-w64 MinGW-Builds) using Microsoft Windows 10.0.14393:
During compilation of the target
ponder
the following linker error occurs:My build environment is not to blame, since I can successful build other C++ libraries using the same environment/toolchain.