Сборка всего сразу через solution (tamic.slnx)
Помимо пофазной сборки (открывать каждый проект по очереди — файлы win32/03…06 и
win64/03…06), пакет можно собрать целиком одним решением. В корне исходников
(src\) лежит файл решения нового формата tamic.slnx, который включает все
12 проектов (6 библиотек + 6 программ) и знает зависимости между ними. Открыл,
выбрал платформу — собрал всё.
Это второй, необязательный способ. Пофазные инструкции (
01…08) остаются в силе: они полезны для понимания, отладки и сборки отдельного компонента. Общее решение — удобный «собрать всё сразу».
Что такое .slnx
.slnx — это решение Visual Studio в новом XML‑формате (пришёл на смену
текстовому .sln). Он компактнее и читаемее. Формат поддерживается Visual Studio
2022 (17.10+) и Visual Studio 2026, которой собирается TMC Suite. Более старые версии
Visual Studio .slnx не откроют.
Где лежит файл
<КОРЕНЬ>\src\tamic.slnx
Все пути внутри решения заданы относительно src\, поэтому файл должен лежать
именно в src\. Property sheets (build\Common.props, LibOutput.props,
ExeOutput.props) подключены в самих проектах через относительный путь и от места
решения не зависят — вывод по‑прежнему идёт в dist\win32\… и dist\win64\….
Что входит в решение и порядок сборки
Решение содержит все 12 проектов и прописанные зависимости, поэтому Visual Studio сама собирает их в правильном порядке: сначала нужные библиотеки, затем программы.
| Проект (в решении) | Результат | Зависит от |
|---|---|---|
libs\SFILE95\SFILE95.vcxproj |
sfile95.lib | — |
libs\complex\complex.vcxproj |
complex.lib | — |
libs\exprint\exprint.vcxproj |
exprint.lib | — |
libs\TMCLibError\TMCLibError.vcxproj |
TMCLibError.lib | — |
libs\PREPR\Prepr.vcxproj |
prepr.lib | — |
libs\TMCIndan\TMCIndan.vcxproj |
TMCIndan.lib | — |
viewers\Tmcrtout\TMCROS.vcxproj |
TMCROS.exe | sfile95, complex, exprint |
viewers\Tmcgrout\TMCGROUT.vcxproj |
TMCGROUT.exe | sfile95, complex, exprint |
viewers\DiaNapGr\TMC_DN.vcxproj |
TMC_DN.exe | sfile95, complex, exprint |
kernels\PlanarRT_H\PlanRT_H.vcxproj |
tmc_rth.exe | sfile95, prepr, exprint, TMCIndan, TMCLibError |
kernels\PlanarRT_X\PlanRT_X.vcxproj |
tmc_rtx.exe | sfile95, prepr, exprint, TMCIndan, TMCLibError |
fieldview\FldView.vcxproj |
FieldView.exe | sfile95, prepr, exprint, TMCIndan, TMCLibError (+ OpenGL) |
Порядок между библиотеками не важен (каждая
.libнезависима), а зависимости «программа ← библиотеки» решение соблюдает автоматически. Отдельно следить за фазами, как при пофазной сборке, здесь не нужно.
Переименование проекта X‑моды
Чтобы общее решение работало, файл проекта X‑моды переименован:
kernels\PlanarRT_X\PlanRT_H.vcxproj → kernels\PlanarRT_X\PlanRT_X.vcxproj.
Имя проекта внутри уже было PlanRT_X, цель сборки — tmc_rtx.exe, так что
переименование лишь привело имя файла в соответствие. Исходные файлы (PlanRT_H.cpp,
PlanRT_H.h) не переименовывались — на них ссылается проект. Локальное решение
одиночной сборки X переименовано в PlanRT_X.sln.
X‑мода: 6 макросов уже заданы
Проект PlanRT_X.vcxproj уже содержит 6 макросов препроцессора X‑моды во всех
конфигурациях (см. win32/05-build-kernels.md, раздел 5.2). При сборке через общее
решение они применяются автоматически — отдельно ничего задавать не нужно.
Как собрать всё (Visual Studio 2026)
- Запустите Visual Studio 2026.
- File → Open → Project/Solution… и выберите
src\tamic.slnx. - В верхней панели задайте: - Конфигурация — Release; - Платформа — Win32 (для 32‑битной сборки) или x64 (для 64‑битной).
- Build → Build Solution (F7). Для чистой сборки — Build → Rebuild Solution.
- Дождитесь в окне Output:
Build: 12 succeeded, 0 failed.
Чтобы получить обе разрядности, повторите шаги 3–5, переключив платформу с Win32 на x64 (и наоборот).
Точность
_real: как и при пофазной сборке, вsrc\Include\Typerth.hдолжна быть активна двойная точность (#define _PREC_DOUBLE). Это условие корректности X‑моды (см.win32/07-troubleshooting.md, § 7.8). Общее решение на это не влияет — проверьте заголовок до сборки.
Проверка результата
После сборки под обе платформы в папках результатов должно быть:
dist\win32\lib\ и dist\win64\lib\ → по 6 файлов .lib
dist\win32\bin\ и dist\win64\bin\ → по 6 файлов .exe
Состав тот же, что при пофазной сборке (win32/06-build-fieldview.md, раздел 6.4;
win64/06-build-fieldview.md, раздел 6.4).
Сборка из командной строки (необязательно)
В Visual Studio 2026 доступна сборка .slnx через msbuild:
msbuild src\tamic.slnx /p:Configuration=Release /p:Platform=Win32
msbuild src\tamic.slnx /p:Configuration=Release /p:Platform=x64
Прямая сборка
.slnxизmsbuildподдерживается только достаточно новыми версиями инструментария (VS 2022 17.13+/2026). Если ваша командная строка.slnxне понимает, собирайте из среды Visual Studio (шаги выше) или используйте пофазные.slnотдельных проектов.
Когда какой способ выбирать
| Ситуация | Способ |
|---|---|
| Нужно быстро получить весь пакет | общее решение tamic.slnx |
| Первое знакомство, обучение, отладка | пофазно (01…08) — виден порядок и зависимости |
| Пересобрать один компонент | проект/решение этого компонента (пофазные разделы) |
| Разобраться с 64‑битной ошибкой | пофазно + win64/08-porting-changes.md |
Building everything at once via the solution (tamic.slnx)
Besides the phased build (opening each project in turn — files win32/03…06 and
win64/03…06), the package can be built as a whole from a single solution. In the
source root (src\) there is a solution file in the new format, tamic.slnx, that
includes all 12 projects (6 libraries + 6 programs) and knows the dependencies
between them. Open it, pick a platform — build everything.
This is a second, optional method. The phased guides (
01…08) remain valid: they are useful for understanding, debugging and building a single component. The combined solution is a convenient "build everything at once".
What .slnx is
.slnx is a Visual Studio solution in the new XML format (a successor to the textual
.sln). It is more compact and readable. The format is supported by Visual Studio 2022
(17.10+) and Visual Studio 2026, which is used to build TMC Suite. Older Visual Studio
versions cannot open .slnx.
Where the file is
<ROOT>\src\tamic.slnx
All paths inside the solution are relative to src\, so the file must reside exactly in
src\. The property sheets (build\Common.props, LibOutput.props, ExeOutput.props)
are attached in the projects themselves via relative paths and do not depend on the
solution location — output still goes to dist\win32\… and dist\win64\….
What the solution contains and the build order
The solution contains all 12 projects and declared dependencies, so Visual Studio builds them in the correct order itself: first the required libraries, then the programs.
| Project (in the solution) | Result | Depends on |
|---|---|---|
libs\SFILE95\SFILE95.vcxproj |
sfile95.lib | — |
libs\complex\complex.vcxproj |
complex.lib | — |
libs\exprint\exprint.vcxproj |
exprint.lib | — |
libs\TMCLibError\TMCLibError.vcxproj |
TMCLibError.lib | — |
libs\PREPR\Prepr.vcxproj |
prepr.lib | — |
libs\TMCIndan\TMCIndan.vcxproj |
TMCIndan.lib | — |
viewers\Tmcrtout\TMCROS.vcxproj |
TMCROS.exe | sfile95, complex, exprint |
viewers\Tmcgrout\TMCGROUT.vcxproj |
TMCGROUT.exe | sfile95, complex, exprint |
viewers\DiaNapGr\TMC_DN.vcxproj |
TMC_DN.exe | sfile95, complex, exprint |
kernels\PlanarRT_H\PlanRT_H.vcxproj |
tmc_rth.exe | sfile95, prepr, exprint, TMCIndan, TMCLibError |
kernels\PlanarRT_X\PlanRT_X.vcxproj |
tmc_rtx.exe | sfile95, prepr, exprint, TMCIndan, TMCLibError |
fieldview\FldView.vcxproj |
FieldView.exe | sfile95, prepr, exprint, TMCIndan, TMCLibError (+ OpenGL) |
The order among the libraries does not matter (each
.libis independent), and the "program ← libraries" dependencies are enforced by the solution automatically. You do not need to track phases here as you do in the phased build.
Renaming the X-mode project
For the combined solution to work, the X-mode project file was renamed:
kernels\PlanarRT_X\PlanRT_H.vcxproj → kernels\PlanarRT_X\PlanRT_X.vcxproj. The
project name inside was already PlanRT_X, the build target is tmc_rtx.exe, so the
rename merely brought the file name into agreement. The source files (PlanRT_H.cpp,
PlanRT_H.h) were not renamed — the project references them. The local single-build
solution for X was renamed to PlanRT_X.sln.
X-mode: the 6 macros are already set
The PlanRT_X.vcxproj project already contains the 6 X-mode preprocessor macros in
all configurations (see win32/05-build-kernels.md, section 5.2). When building via the
combined solution they are applied automatically — nothing extra needs to be set.
How to build everything (Visual Studio 2026)
- Launch Visual Studio 2026.
- File → Open → Project/Solution… and select
src\tamic.slnx. - In the top toolbar set: - Configuration — Release; - Platform — Win32 (for the 32-bit build) or x64 (for the 64-bit build).
- Build → Build Solution (F7). For a clean build — Build → Rebuild Solution.
- Wait for the Output window:
Build: 12 succeeded, 0 failed.
To get both bitnesses, repeat steps 3–5, switching the platform from Win32 to x64 (and vice versa).
_realprecision: as in the phased build,src\Include\Typerth.hmust have double precision active (#define _PREC_DOUBLE). This is a correctness condition for the X-mode (seewin32/07-troubleshooting.md, § 7.8). The combined solution does not affect this — check the header before building.
Verifying the result
After building for both platforms, the output folders should contain:
dist\win32\lib\ and dist\win64\lib\ → 6 .lib files each
dist\win32\bin\ and dist\win64\bin\ → 6 .exe files each
The composition is the same as in the phased build (win32/06-build-fieldview.md,
section 6.4; win64/06-build-fieldview.md, section 6.4).
Building from the command line (optional)
In Visual Studio 2026, building a .slnx via msbuild is available:
msbuild src\tamic.slnx /p:Configuration=Release /p:Platform=Win32
msbuild src\tamic.slnx /p:Configuration=Release /p:Platform=x64
Direct
.slnxbuilding frommsbuildis supported only by sufficiently new tooling versions (VS 2022 17.13+/2026). If your command line does not understand.slnx, build from the Visual Studio IDE (the steps above) or use the phased.slnfiles of the individual projects.
Which method to choose when
| Situation | Method |
|---|---|
| You need the whole package quickly | combined solution tamic.slnx |
| First acquaintance, training, debugging | phased (01…08) — the order and dependencies are visible |
| Rebuild a single component | that component's project/solution (phased sections) |
| Investigate a 64-bit error | phased + win64/08-porting-changes.md |