I made a C++ project in Visual Studio. Initially I was getting LINK : fatal error LNK1561: entry point must be defined when trying to build, but I fixed that by changing the Configuration Type in Project Properties to Static Library (.lib)
Now I created a Github Actions workflow to automatically build this project and it still gives the above error even though the .vcxproj contains <ConfigurationType>StaticLibrary</ConfigurationType>.
Why is it still giving this error when the project is configured as a static library?
Github Actions yml:
...
env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: .
# Configuration type to build.
BUILD_CONFIGURATION: Release
permissions:
contents: read
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Add MSBuild to PATH
uses: microsoft/[email protected]
- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
# Add additional options to the MSBuild command line here (like platform or verbosity level).
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}