Skip to content

Command prompt is shown when you launch <appName>.exe #576

@h4cky

Description

@h4cky

Hi,

As per request from @compnerd I'am moving the discussion about the issue described here, original link: How can I get rid of the command promt window presented with my SwiftWin32 app? to here.

Summary (for those don't wanting to visit Swift Forums): Every time when i manually launch .exe it is presented above Command Prompt window - which i don't whant there :)

Versions of installed software:

  • VS Community 16.10.0
  • Windows SDK 10.0.19041.0
  • MSVCv142 - vs 2019 c++ x64/x86 build tools (Latest)
  • Swift 5.4.1

If you think any other information will help, ask away

Regards,
h4cky

P.S: Interesting thing which I just saw and remembered.
after checking out swift-win32-application as my template on first swift build it shows the following error:
'Application' D:\Developer\sw32a\swift-win32-application: error: product dependency 'SwiftWin32' in package 'swift-win32' not found
which i solve in the following way in Package.swift:

  1. adding name: "SwiftWin32" on .package in root dependencies array
dependencies: [
    .package(name: "SwiftWin32", url: "https://github.com/compnerd/swift-win32.git",
             .branch("main")),
  ],
  1. and changing the dependecies array on my .executableTarget
      dependencies: [
        "SwiftWin32"
        // .product(name: "SwiftWin32", package: "swift-win32"),
      ],

current swift build output:
build.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions