Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does it support MinGW? #128

Open
i-am-neet opened this issue Jul 17, 2024 · 2 comments
Open

Does it support MinGW? #128

i-am-neet opened this issue Jul 17, 2024 · 2 comments

Comments

@i-am-neet
Copy link

I tried to build this project w/ MinGW on Windows 10

But, it seems failed when linking library

How can I solve it?
Thanks

$ cmake --build --preset release
[1/2] Linking CXX shared library lib\libOpenOrCadParser.dll
FAILED: lib/libOpenOrCadParser.dll lib/libOpenOrCadParser.dll.a
C:\windows\system32\cmd.exe /C "cd . && D:\msys64\mingw64\bin\x86_64-w64-mingw32-g++.exe -O3 -DNDEBUG   -shared -o lib\libOpenOrCadParser.dll -Wl,--out-implib,lib\libOpenOrCadParser.dll.a -Wl,--major-image-version,0,--minor-image-version,1 @CMakeFiles\OpenOrCadParser.rsp
&& C:\windows\system32\cmd.exe /C "cd /D D:\tools\ECAD\OpenOrCadParser\build\lib && C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noprofile -executionpolicy Bypass -file D:/vcpkg/scripts/buildsystems/msbuild/applocal.ps1 -targetBinary D:/tools/ECAD/OpenOrCa
dParser/build/lib/libOpenOrCadParser.dll -installedDir D:/tools/ECAD/OpenOrCadParser/build/vcpkg_installed/x64-mingw-dynamic/bin -OutVariable out""
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/CMakeFiles/OpenOrCadParser.dir/__/src/StreamFactory.cpp.obj (symbol from plugin):(.gnu.linkonce.t._ZTVN4OOCP10DataStreamE[_ZTVN4OOCP10DataStreamE]+0x0): multiple def
inition of `VTT for OOCP::DataStream'; lib/CMakeFiles/OpenOrCadParser.dir/__/src/GenericParser.cpp.obj (symbol from plugin):(.gnu.linkonce.t._ZTVN4OOCP10DataStreamE[_ZTTN4OOCP10DataStreamE]+0x0): first defined here
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/CMakeFiles/OpenOrCadParser.dir/__/src/StreamFactory.cpp.obj (symbol from plugin):(.gnu.linkonce.t._ZTVN4OOCP10DataStreamE[_ZTVN4OOCP10DataStreamE]+0x0): multiple def
inition of `vtable for OOCP::DataStream'; lib/CMakeFiles/OpenOrCadParser.dir/__/src/GenericParser.cpp.obj (symbol from plugin):(.gnu.linkonce.t._ZTVN4OOCP10DataStreamE[_ZTTN4OOCP10DataStreamE]+0x0): first defined here
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/CMakeFiles/OpenOrCadParser.dir/__/src/StreamFactory.cpp.obj (symbol from plugin):(.gnu.linkonce.t._ZTVN4OOCP10DataStreamE[_ZTVN4OOCP10DataStreamE]+0x0): multiple def
inition of `construction vtable for std::istream-in-OOCP::DataStream'; lib/CMakeFiles/OpenOrCadParser.dir/__/src/GenericParser.cpp.obj (symbol from plugin):(.gnu.linkonce.t._ZTVN4OOCP10DataStreamE[_ZTTN4OOCP10DataStreamE]+0x0): first defined here
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: lib/CMakeFiles/OpenOrCadParser.dir/__/src/StreamFactory.cpp.obj (symbol from plugin):(.gnu.linkonce.t._ZTVN4OOCP10DataStreamE[_ZTVN4OOCP10DataStreamE]+0x0): multiple def
inition of `construction vtable for std::basic_ifstream<char, std::char_traits<char> >-in-OOCP::DataStream'; lib/CMakeFiles/OpenOrCadParser.dir/__/src/GenericParser.cpp.obj (symbol from plugin):(.gnu.linkonce.t._ZTVN4OOCP10DataStreamE[_ZTTN4OOCP10DataStreamE]+0x0): first
defined here
lto-wrapper.exe: warning: using serial compilation of 12 LTRANS jobs
lto-wrapper.exe: note: see the '-flto' option documentation for more information
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot export _ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_EC1ERKS5_S8_: symbol wrong type (4 vs 3)
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
@Werni2A
Copy link
Owner

Werni2A commented Jul 17, 2024

Thanks for reporting, I will have a look at it over the weekend.

@Werni2A
Copy link
Owner

Werni2A commented Jul 21, 2024

The compiler error suggests a missing destructor that I added in #129. Probably more issues arise when the compiler proceeds but I don't have a working MinGW setup that I can test with.

In case you want to contribute it would be beneficial to have a CI build with MinGW.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants