win64 · Шаг 3. Фаза 1 — сборка библиотек (6 штук)

На этом шаге собираются все 6 библиотек (.lib) под 64 бита. Их нужно собрать до любых программ.

Порядок между библиотеками не важен. Перед сборкой: конфигурация Release, платформа x64 (см. 02-setup-paths.md).

КЛЮЧЕВОЕ — точность _real (двойная). До сборки проверьте, что в общем заголовке src\Include\Typerth.h активна двойная точность (#define _PREC_DOUBLE, а //#define _PREC_FLOAT). Тип _real входит в общие структуры (ABI) и в формат файлов поля → точность обязана быть одинаковой у всех библиотек и программ. Сборка во float даёт ложную «ребристость»/неустойчивость X‑моды (tmc_rtx) — см. 07-troubleshooting.md, § 7.9 (Баг #11). Это условие корректности, а не опция производительности.


3.0 Правки, уже внесённые в проекты библиотек

Хорошая новость: правок кода ради 64 бит на этом этапе не потребовалось — все 6 библиотек компилируются под x64 чисто (только обычные легаси‑предупреждения C4996, C4267, C4700, те же, что в win32). Это зафиксировано в журнале портирования (08-porting-changes.md, раздел «Фаза 1»).

Изменения коснулись только конфигурации сборки (.vcxproj):

  • В 5 проектов (complex, exprint, TMCLibError, Prepr, TMCIndan) добавлены конфигурации Debug|x64 и Release|x64 — зеркально win32, toolset v145, параметры UseOfMfc и RuntimeLibrary как в соответствующих win32‑конфигурациях. У SFILE95 x64‑конфигурации уже были.
  • Вывод .lib идёт в dist\win64\lib автоматически через build\LibOutput.props ($(Platform)=x64PlatformFolder=win64).

Общие правки кода (нужны и для win32, не связаны с разрядностью) — уже применены:

  • С‑1 — конфликт макроса ETIME в src\Include\MAINWNDW.H (enum ST_ITEMS). Добавлено #ifdef ETIME / #undef ETIME / #endif. Математика не затронута.
  • С‑2 — в src\libs\SFILE95\Sadd.cpp #include <error.h>#include <Error1.h>. Математика не затронута.

Никаких 64‑битных правок кода в Фазе 1 нет. Подтверждение — в 08-porting-changes.md.


3.1 Последовательность для каждой библиотеки

  1. File → Open → Project/Solution…, открыть .sln библиотеки из её папки.
  2. Проверить: конфигурация Release, платформа x64.
  3. Build → Build Solution (или Rebuild Solution для чистой сборки).
  4. Дождаться Build: 1 succeeded, 0 failed.
  5. Убедиться, что .lib появился в dist\win64\lib.
Меню Build → Build Solution
Меню Build → Build Solution

Скриншот общий с инструкцией win32 — меню то же. Перед сборкой убедитесь, что вверху выбрана платформа x64, конфигурация Release.


3.2 sfile95.lib

  • Папка: src\libs\SFILE95, решение Sfile95.sln
  • Результат: dist\win64\lib\sfile95.lib

3.3 complex.lib

  • Папка: src\libs\complexdist\win64\lib\complex.lib

3.4 exprint.lib

  • Папка: src\libs\exprintdist\win64\lib\exprint.lib
  • Использует исходники из src\libs\Expr и src\libs\Inter (уже на месте).

3.5 TMCLibError.lib

  • Папка: src\libs\TMCLibErrordist\win64\lib\TMCLibError.lib

3.6 prepr.lib

  • Папка: src\libs\PREPRdist\win64\lib\prepr.lib

3.7 TMCIndan.lib

  • Папка: src\libs\TMCIndandist\win64\lib\TMCIndan.lib

3.8 Проверка Фазы 1

В <КОРЕНЬ>\dist\win64\lib должны лежать все 6 файлов:

sfile95.lib   complex.lib   exprint.lib
TMCLibError.lib   prepr.lib   TMCIndan.lib

Переходите к 04-build-viewers.md.

win64 · Step 3. Phase 1 — building the libraries (6 of them)

In this step all 6 libraries (.lib) are built for 64 bits. They must be built before any programs.

The order among the libraries does not matter. Before building: configuration Release, platform x64 (see 02-setup-paths.md).

KEY — _real precision (double). Before building, verify that in the shared header src\Include\Typerth.h double precision is active (#define _PREC_DOUBLE, and //#define _PREC_FLOAT). The _real type is part of the shared structures (ABI) and of the field file format, so the precision must be the same across all libraries and programs. Building in float gives a false "rippling"/instability of the X-mode (tmc_rtx) — see 07-troubleshooting.md, § 7.9 (Bug #11). This is a correctness condition, not a performance option.


3.0 Changes already made to the library projects

Good news: no code changes were needed for 64 bits at this stage — all 6 libraries compile cleanly under x64 (only the usual legacy warnings C4996, C4267, C4700, the same as in win32). This is recorded in the porting log (08-porting-changes.md, the "Phase 1" section).

The changes affected only the build configuration (.vcxproj):

  • In 5 projects (complex, exprint, TMCLibError, Prepr, TMCIndan) the configurations Debug|x64 and Release|x64 were added — mirroring win32, toolset v145, with the UseOfMfc and RuntimeLibrary parameters as in the corresponding win32 configurations. SFILE95 already had the x64 configurations.
  • .lib output goes to dist\win64\lib automatically via build\LibOutput.props ($(Platform)=x64 -> PlatformFolder=win64).

Shared code changes (needed for win32 too, not related to bitness) — already applied:

  • C-1 — the ETIME macro conflict in src\Include\MAINWNDW.H (enum ST_ITEMS). #ifdef ETIME / #undef ETIME / #endif was added. The math is not affected.
  • C-2 — in src\libs\SFILE95\Sadd.cpp, #include <error.h> -> #include <Error1.h>. The math is not affected.

There are no 64-bit code changes in Phase 1. Confirmation is in 08-porting-changes.md.


3.1 The sequence for each library

  1. File -> Open -> Project/Solution…, open the library's .sln from its folder.
  2. Check: configuration Release, platform x64.
  3. Build -> Build Solution (or Rebuild Solution for a clean build).
  4. Wait for Build: 1 succeeded, 0 failed.
  5. Make sure the .lib appeared in dist\win64\lib.
The Build -> Build Solution menu
The Build -&gt; Build Solution menu

The screenshot is shared with the win32 guide — the menu is the same. Before building, make sure the x64 platform, Release configuration are selected at the top.


3.2 sfile95.lib

  • Folder: src\libs\SFILE95, solution Sfile95.sln
  • Result: dist\win64\lib\sfile95.lib

3.3 complex.lib

  • Folder: src\libs\complex -> dist\win64\lib\complex.lib

3.4 exprint.lib

  • Folder: src\libs\exprint -> dist\win64\lib\exprint.lib
  • Uses sources from src\libs\Expr and src\libs\Inter (already in place).

3.5 TMCLibError.lib

  • Folder: src\libs\TMCLibError -> dist\win64\lib\TMCLibError.lib

3.6 prepr.lib

  • Folder: src\libs\PREPR -> dist\win64\lib\prepr.lib

3.7 TMCIndan.lib

  • Folder: src\libs\TMCIndan -> dist\win64\lib\TMCIndan.lib

3.8 Verifying Phase 1

In <ROOT>\dist\win64\lib all 6 files must be present:

sfile95.lib   complex.lib   exprint.lib
TMCLibError.lib   prepr.lib   TMCIndan.lib

Proceed to 04-build-viewers.md.