Login Page - Create Account

Support Board


Date/Time: Tue, 06 May 2025 16:53:18 +0000



Post From: Local build with mingw creates a dll without study symbols using official compiler flags

[2024-12-19 23:13:55]
seandunaway - Posts: 348
i switched to clang with xwin (the authentic winsdk), because i had issues getting a debugger to work with mingw's dwarf versus pdb format


sierrachart ?= /opt/sierrachart
xwin ?= /opt/xwin

CXX = clang++
CXXFLAGS += -target $(arch)-pc-windows-msvc -O3 -shared -fuse-ld=lld
CXXFLAGS += $(addprefix -isystem, $(header))
LDFLAGS += $(addprefix -L, $(addsuffix /$(arch), $(library)))

ifndef strip
CXXFLAGS += -O0 -g -fstandalone-debug
endif

header += $(xwin)/splat/crt/include
header += $(shell find $(xwin)/splat/sdk/include -maxdepth 1 -type d)
header += $(sierrachart)/ACS_Source
library += $(xwin)/splat/crt/lib
library += $(shell find $(xwin)/splat/sdk/lib -maxdepth 1 -type d)

src = $(wildcard *.cpp)
aarch64 = $(src:.cpp=_arm64.dll)
x86_64 = $(src:.cpp=_64.dll)

default: aarch64 x86_64
aarch64: $(aarch64)
x86_64: $(x86_64)

%_arm64.dll: arch = aarch64
%_arm64.dll: %.cpp
  $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)

%_64.dll: arch = x86_64
%_64.dll: %.cpp
  $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)

clean:
  rm -f $(aarch64) $(aarch64:.dll=.lib) $(aarch64:.dll=.pdb) $(x86_64) $(x86_64:.dll=.lib) $(x86_64:.dll=.pdb)

.PHONY: default aarch64 x86_64 clean

to install the winsdk:

xwin --accept-license --arch aarch64,x86_64 --cache-dir /opt/xwin --sdk-version 10.0.22621 splat --include-debug-libs --include-debug-symbols
Date Time Of Last Edit: 2024-12-19 23:19:52