-
-
Notifications
You must be signed in to change notification settings - Fork 136
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
When I compile on the window system use cmake 3.26, there are many redefinition errors, please help #111
Comments
Could you show me what command did you enter? |
I could not modify CMakeLists.txt for Windows, so please use a vcxproj file. See https://github.com/herumi/bls/tree/dev . |
I have solved this problem, just modify the CMakeList. txt file in the bls directory。(Modify as shown below) You can consider the following modifications to CMakeList, which should have a minor impact. (CMakeLists.txt Line 58 #) foreach(bit IN ITEMS 256 384 384_256)
add_library(bls${bit} SHARED src/bls_c${bit}.cpp)
add_library(bls::bls${bit} ALIAS bls${bit})
target_compile_definitions(bls${bit} PRIVATE BLS_NO_AUTOLINK)
target_include_directories(bls${bit} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_DIR}/include>)
# Modify HERE START
target_link_libraries(bls${bit} PUBLIC mcl::mcl mcl::mcl_st mcl::mclbn${bit})
# Modify HERE END
set_target_properties(bls${bit} PROPERTIES
POSITION_INDEPENDENT_CODE ON
VERSION ${bls_VERSION}
SONAME ${bls_VERSION_MAJOR})
endforeach() Thank you for your response. |
Thank you for the nice patch. I've merged it. |
F:\WorkShop\git-repo\muse-simulator\build\bin\Debug\bls384.dll : fatal error LNK1169: one or more multiply defined symbols found [F:\WorkShop\git-repo\muse-simulator\build\dependency\bls\bls384.vcxproj]
mclbn384_256.vcxproj -> F:\WorkShop\git-repo\muse-simulator\build\bin\Debug\mclbn384_256.dll
Building Custom Rule F:/WorkShop/git-repo/muse-simulator/dependency/bls/CMakeLists.txt
mcl.lib(fp.obj) : error LNK2005: "unsigned __int64 __cdecl mcl::bint::addUnit(unsigned __int64 *,unsigned __int64,unsigned __int64)" (?addUnit@bint@mcl@@YA_KPEA_K_K1@Z) already defined in mclbn384_256.lib(mclbn384_256.dll) [F:\WorkShop\git-repo\muse-simulato
r\build\dependency\bls\bls384_256.vcxproj]
mcl.lib(fp.obj) : error LNK2005: "unsigned __int64 __cdecl mcl::bint::div(unsigned __int64 *,unsigned __int64,unsigned __int64 *,unsigned __int64,unsigned __int64 const *,unsigned __int64)" (?div@bint@mcl@@YA_KPEA_K_K01PEB_K1@Z) already defined in mclbn384_256
.lib(mclbn384_256.dll) [F:\WorkShop\git-repo\muse-simulator\build\dependency\bls\bls384_256.vcxproj]
mcl.lib(fp.obj) : error LNK2005: "unsigned __int64 __cdecl mcl::bint::divUnit(unsigned __int64 *,unsigned __int64 const *,unsigned __int64,unsigned __int64)" (?divUnit@bint@mcl@@YA_KPEA_KPEB_K_K2@Z) already defined in mclbn384_256.lib(mclbn384_256.dll) [F:
\WorkShop\git-repo\muse-simulator\build\dependency\bls\bls384_256.vcxproj]
mcl.lib(fp.obj) : error LNK2005: "void __cdecl mcl::bint::initBint(void)" (?initBint@bint@mcl@@yaxxz) already defined in mclbn384_256.lib(mclbn384_256.dll) [F:\WorkShop\git-repo\muse-simulator\build\dependency\bls\bls384_256.vcxproj]
mcl.lib(fp.obj) : error LNK2005: "void __cdecl mcl::bint::maskN(unsigned __int64 *,unsigned __int64,unsigned __int64)" (?maskN@bint@mcl@@YAXPEA_K_K1@Z) already defined in mclbn384_256.lib(mclbn384_256.dll) [F:\WorkShop\git-repo\muse-simulator\build\dependency\de
pendency\bls\bls384_256.vcxproj]
mcl.lib(fp.obj) : error LNK2005: "unsigned __int64 __cdecl mcl::bint::modUnit(unsigned __int64 const *,unsigned __int64,unsigned __int64)" (?modUnit@bint@mcl@@YA_KPEB_K_K1@Z) already defined in mclbn384_256.lib(mclbn384_256.dll) [F:\WorkShop\git-repo\muse-simula
tor\build\dependency\bls\bls384_256.vcxproj]
mcl.lib(fp.obj) : error LNK2005: "void __cdecl mcl::bint::mulNM(unsigned __int64 *,unsigned __int64 const *,unsigned __int64,unsigned __int64 const *,unsigned __int64)" (?mulNM@bint@mcl@@YAXPEA_KPEB_K_K12@Z) already defined in mclbn384_256.lib(mclbn384_256.dll
) [F:\WorkShop\git-repo\muse-simulator\build\dependency\bls\bls384_256.vcxproj]
mcl.lib(fp.obj) : error LNK2005: "unsigned __int64 __cdecl mcl::bint::shiftLeft(unsigned __int64 *,unsigned __int64 const *,unsigned __int64,unsigned __int64)" (?shiftLeft@bint@mcl@@YA_KPEA_KPEB_K_K2@Z) already defined in mclbn384_256.lib(mclbn384_256.dll) [F:
\WorkShop\git-repo\muse-simulator\build\dependency\bls\bls384_256.vcxproj]
mcl.lib(fp.obj) : error LNK2005: "unsigned __int64 __cdecl mcl::bint::shiftRight(unsigned __int64 *,unsigned __int64 const *,unsigned __int64,unsigned __int64)" (?shiftRight@bint@mcl@@YA_KPEA_KPEB_K_K2@Z) already defined in mclbn384_256.lib(mclbn384_256.dll)
[F:\WorkShop\git-repo\muse-simulator\build\dependency\bls\bls384_256.vcxproj]
mcl.lib(fp.obj) : error LNK2005: "unsigned __int64 __cdecl mcl::bint::subUnit(unsigned __int64 *,unsigned __int64,unsigned __int64)" (?subUnit@bint@mcl@@YA_KPEA_K_K1@Z) already defined in mclbn384_256.lib(mclbn384_256.dll) [F:\WorkShop\git-repo\muse-simulator\b
uild\dependency\bls\bls384_256.vcxproj]
The text was updated successfully, but these errors were encountered: