SelfTest.exe not generated when building using C++Builder 12.2 IDE - fails in link step with "undefined symbol:WinMain

Open
#2,957 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
testing-qa

Research direction

Reproduce the failure in the C++Builder 12.2 IDE by running Build All for the Win64 (Modern) target after installing Catch2 v3 with GetIt. Compare it with the working Win64 build and inspect the SelfTest.exe link step, including the reported CodeGear.Cpp.Targets error. Done means the Modern target links, generates SelfTest.exe, and runs successfully.

Written by the indexing model from the issue text.

Description

Describe the bug
c:\program files (x86)\embarcadero\studio\23.0\Bin\CodeGear.Cpp.Targets(4608,5): error : ld.lld: error: undefined symbol: WinMain

Expected behavior
C++Builder BCC64.exe builds correctly and SelfTest.exe is generated and runs.

Reproduction steps
Load C++Builder 12.2 IDE after using GetIt to download and install Catch2.
In the IDE - do a Build All for Win64 target platform - builds and runs. Do a Build All for the Win64 (Modern) target which uses BCC64x compiler. Gets error in Link step for SelfTest

Platform information:

  • OS: Windows 10
  • Compiler+version: c:\Program Files (x86)\Embarcadero\Studio\23.0\bin64>bcc64x.exe
    Embarcadero C++ 7.70 for Win64/COFF Copyright (c) 2012-2024 Embarcadero Technologies, Inc.
  • Catch version: v3

Additional context
Add any other context about the problem here.

Dominant language
C++
Stars
21.6k
Forks
3.4k
Avg merge
3d 12h
Merged PRs (30d)
5

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from catchorg/Catch2

All issues in catchorg/Catch2

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.