error "multiple definition" in a project with type GNU Make

Sysprogs forums Forums VisualGDB error "multiple definition" in a project with type GNU Make

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #31394
    viordash
    Participant

    Hey!
    How can I use VisualGdb in a project that has many files with the same names but in different folders.
    Now I am getting the error
    “C:\Users\User\source\repos\EmbeddedProject7\EmbeddedProject7/Test/test.cpp:5: multiple definition of `TestB(int)’;”
    what can be seen in the attached test project

    • This topic was modified 2 years, 6 months ago by viordash.
    Attachments:
    You must be logged in to view attached files.
    #31397
    support
    Keymaster

    Hi,

    This is not supported for Makefile-based projects. Please consider using CMake or MSBuild instead.

    #31401
    viordash
    Participant

    Very sorry,
    In Makefile projects I find the most responsive interface.
    I’m trying to translate into CMake, but it seems to me that his work is more inconvenient and time-consuming.
    MSBuild is not suitable, since the CI/CD build on the machine on Linux.

    #31416
    support
    Keymaster

    Hi,

    If you prefer using GNU Make, you can always patch the Makefile to change its layout and support multiple folders, however it is something for you to setup and test.

    On our side, we have designed the MSBuild-based and CMake-based projects specifically to address numerous shortcomings of GNU Make, and advise using them instead.

    MSBuild is fully compatible with CI/CD – you can simply generate a batch file with all commands: https://visualgdb.com/documentation/projects/msbuild/#standalone (although you would need to programmatically replace absolute paths in it and in the .rsp files).

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.