Commit 7436c15
Fix MSVC portability: popen, missing include, OpenMP index, UTF-8
- rmsd.cpp: popen/pclose are POSIX-only; guard with _popen/_pclose on
Windows (matching the existing pattern in orcainterface.cpp). Also
replace the alternative operator token "and" with "&&" (MSVC needs
/permissive- or <ciso646> for those; GCC/Clang accept them natively).
- trajectory_writer.cpp: uses std::ostringstream/stringstream without
including <sstream> -- only worked because GCC's libstdc++ pulls it
in transitively via other headers; MSVC's STL doesn't.
- d4param_generator.cpp: three #pragma omp for loops used size_t
counters; MSVC's OpenMP (2.0 semantics) requires signed loop indices,
unlike GCC/Clang's OpenMP implementations.
- CMakeLists.txt: add /utf-8 for MSVC. The codebase uses non-ASCII
UTF-8 characters in a few identifiers/comments (e.g. "double
Δqraw[6];" in xtb_gradient.cpp); without /utf-8, MSVC falls back to
the system codepage and misreads the multi-byte UTF-8 sequence as
unrelated characters (observed: "error C3872: 'U+201d' is not
allowed in an identifier" for what is actually Δ).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent df63675 commit 7436c15
4 files changed
Lines changed: 27 additions & 6 deletions
File tree
- src
- capabilities
- core/energy_calculators/dispersion
- tools
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
10 | 16 | | |
11 | 17 | | |
12 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1659 | 1659 | | |
1660 | 1660 | | |
1661 | 1661 | | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
1662 | 1665 | | |
| 1666 | + | |
1663 | 1667 | | |
1664 | 1668 | | |
1665 | 1669 | | |
| |||
1674 | 1678 | | |
1675 | 1679 | | |
1676 | 1680 | | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
1677 | 1684 | | |
| 1685 | + | |
1678 | 1686 | | |
1679 | 1687 | | |
1680 | | - | |
| 1688 | + | |
1681 | 1689 | | |
1682 | 1690 | | |
1683 | 1691 | | |
| |||
Lines changed: 11 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
| 437 | + | |
| 438 | + | |
437 | 439 | | |
438 | | - | |
439 | | - | |
| 440 | + | |
| 441 | + | |
440 | 442 | | |
441 | 443 | | |
442 | 444 | | |
| |||
747 | 749 | | |
748 | 750 | | |
749 | 751 | | |
| 752 | + | |
| 753 | + | |
750 | 754 | | |
751 | | - | |
| 755 | + | |
752 | 756 | | |
753 | 757 | | |
754 | 758 | | |
| |||
2018 | 2022 | | |
2019 | 2023 | | |
2020 | 2024 | | |
| 2025 | + | |
| 2026 | + | |
2021 | 2027 | | |
2022 | | - | |
2023 | | - | |
| 2028 | + | |
| 2029 | + | |
2024 | 2030 | | |
2025 | 2031 | | |
2026 | 2032 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
0 commit comments