$(IntDir) modifications are not working with VisualGDB generated Makefile

Sysprogs forums Forums VisualGDB $(IntDir) modifications are not working with VisualGDB generated Makefile

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #13296
    helpme
    Participant

    I am having problems with changing the Output Directory and Intermediate Directory settings in Visual Studio which in turn creates Makefiles for Linux using WSL.

    The default OutDir is: $(SolutionDir)$(Platform)\$(Configuration)\.  I changed OutDir to $(SolutionDir)..\..\linux\$(Configuration)\

    Then IntDir to: $(OutDir)\obj\$(ProjectName)\

    This causes issues when building where it lists all of the files in the project and says, “foo1.cpp, foo2.cpp share the same object file name (../../../../linux/Debug/obj/fooproject). This will result in link-time errors. Please rename the files or change the object file names for them.”

    Then there are errors for each file in the Makefile:

    1>C:\dev\src\dir1\dir2\fooproject\..\..\..\..\linux\Debug\obj\fooproject\fooproject.msbuild-mak(28): warning :  overriding recipe for target ‘UpdateRSP/../../../../linux/Debug/obj/fooproject’

    If you look in the fooproject.msbuild-mak you see that it isn’t compiling the individual cpp files, instead there are hundreds of targets for the exe fooproject:

    UpdateRSP/../../../../linux/Debug/obj/fooproject:
    $(_V)echo “-I./ -IC:\dev\src\dir1\dir2\fooproject/ -ggdb -O0 -DDEBUG=1 -ffunction-sections -fdata-sections  ” > ../../../../linux/Debug/obj/fooproject.gcc.rsp-new
    $(_V)cmp -s ../../../../linux/Debug/obj/fooproject.gcc.rsp-new ../../../../linux/Debug/obj/fooproject.gcc.rsp || cp ../../../../linux/Debug/obj/fooproject.gcc.rsp-new ../../../../linux/Debug/obj/fooproject.gcc.rsp

     

    Thanks,

    Jon

    #13297
    support
    Keymaster

    Hi,

    This could happen if the $(IntDir) variable did not have a trailing backslash. Please double-check that your settings include it. If this doesn’t help, please try attaching a minimal repro project and we will investigate it.

    #20505
    gruebs
    Participant

    Hello,

    I have the same problem after changing the intermediate directory. I double-checked the variable $(IntDir) and it has a trailing backslash.

    Following change on General->Intermediate Directory:

    old: $(Platform)\$(Configuration)\

    new: $(SolutionDir)$(Platform)\$(Configuration)\

    checking variable $(IntDir) for both changes:

    old: VisualGDB\Debug\

    new: E:\GIT\MCF_InDev\MCF\Target\TEST_STM32F303_xE\TST_ProDevisDevelopment\Firmware\TST_ProDevisDevelopment_STM32F303RETx\VisualGDB\Debug\

    The *.vcproj file holds the following lines:
    <PropertyGroup Condition=”‘$(Configuration)|$(Platform)’==’Debug|VisualGDB'”>
    <GNUConfigurationType>Debug</GNUConfigurationType>
    <ToolchainID>com.visualgdb.arm-eabi</ToolchainID>
    <ToolchainVersion>7.2.0/8.0.1/r2</ToolchainVersion>
    <GNUTargetType>StaticLibrary</GNUTargetType>
    <IntDir>$(SolutionDir)$(Platform)\$(Configuration)\</IntDir>
    </PropertyGroup>
    Compiling a single file, results in following output:
    1>—— Erstellen gestartet: Projekt: HAL_BASE_STM32F303_xE_VS, Konfiguration: Debug VisualGDB ——
    1> startup_stm32f303xe.c
    1> Assembler messages:
    1>GCCCOMPILE : Fatal error : can’t create ../../../../Target/TEST_STM32F303_xE/TST_ProDevisDevelopment/Firmware/TST_ProDevisDevelopment_STM32F303RETx/VisualGDB/Debug: Permission denied
    ========== Erstellen: 0 erfolgreich, 1 fehlerhaft, 0 aktuell, 0 übersprungen ==========
    It seems, that there is something wrong on creating the relative path.

    Thanks

    Stefan

    • This reply was modified 6 years, 8 months ago by gruebs.
    #20538
    support
    Keymaster

    Hi,

    Thanks, we have reproduced it and fixed it in this build: http://sysprogs.com/files/tmp/VisualGDB-5.4.1.2127.msi

     

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