You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Building a dll on Windows with BUILD_SHARED_LIBS=ON works just fine. Both bin/int2.dll and lib/int2.lib are installed. But when one links to the library like in the hartree-fock++ test case, missing symbols errors appear. Using the relevant CMake property WINDOWS_EXPORT_ALL_SYMBOLS clears up symbols like libint2_cleanup_default and libint2_need_memory_1emultipole but still errors on the symbols below. Looking at the symbols in a Linux library with nm, the ones that are still problematic are the B (uninitialized data section) ones, not the T (text (code) section) ones. Since data symbols are what the CMake property won't handle (see link above), I suspect that the libint_build_* definitions need __declspec(dllexport)/__declspec(dllimport) in the generated L2 library source to make the Windows dll useable.
I'd be glad if someone gave the "decl-ing" a try — I don't want to attempt this over CI. I would like this to be working for the future Windows c-f conda package, but at the moment, this issue is an FYI (possibly misdiagnosed), not an impediment.
> nm install-25/lib64/libint2.so | grep libint2_ | grep overlap
00000000000a47c0 B libint2_build_overlap
00000000000a4520 B libint2_build_overlap1
0000000000019350 T libint2_cleanup_overlap
0000000000019430 T libint2_cleanup_overlap1
0000000000018ad0 T libint2_init_overlap
0000000000018f30 T libint2_init_overlap1
0000000000018820 T libint2_need_memory_overlap
0000000000018970 T libint2_need_memory_overlap1
Added: use REQUIRE_CXX_API_COMPILED=OFF to defer the error to linking int2.dll to L2 consumer, which is testable, rather than getting it at engine.cpp to int2.dll link time.
The text was updated successfully, but these errors were encountered:
Building a dll on Windows with
BUILD_SHARED_LIBS=ON
works just fine. Bothbin/int2.dll
andlib/int2.lib
are installed. But when one links to the library like in the hartree-fock++ test case, missing symbols errors appear. Using the relevant CMake propertyWINDOWS_EXPORT_ALL_SYMBOLS
clears up symbols likelibint2_cleanup_default
andlibint2_need_memory_1emultipole
but still errors on the symbols below. Looking at the symbols in a Linux library withnm
, the ones that are still problematic are theB
(uninitialized data section) ones, not theT
(text (code) section) ones. Since data symbols are what the CMake property won't handle (see link above), I suspect that thelibint_build_*
definitions need__declspec(dllexport)
/__declspec(dllimport)
in the generated L2 library source to make the Windows dll useable.I'd be glad if someone gave the "decl-ing" a try — I don't want to attempt this over CI. I would like this to be working for the future Windows c-f conda package, but at the moment, this issue is an FYI (possibly misdiagnosed), not an impediment.
Added: use
REQUIRE_CXX_API_COMPILED=OFF
to defer the error to linking int2.dll to L2 consumer, which is testable, rather than getting it at engine.cpp to int2.dll link time.The text was updated successfully, but these errors were encountered: