Sysprogs forums › Forums › VisualGDB › $(IntDir) modifications are not working with VisualGDB generated Makefile
Tagged: OutDir IntDir Intermediate
- This topic has 3 replies, 3 voices, and was last updated 6 years, 11 months ago by
support.
-
AuthorPosts
-
December 15, 2017 at 00:22 #13296
helpme
ParticipantI 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.rspThanks,
Jon
December 15, 2017 at 00:40 #13297support
KeymasterHi,
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.
March 22, 2018 at 11:15 #20505gruebs
ParticipantHello,
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, 11 months ago by
gruebs.
March 23, 2018 at 19:14 #20538support
KeymasterHi,
Thanks, we have reproduced it and fixed it in this build: http://sysprogs.com/files/tmp/VisualGDB-5.4.1.2127.msi
-
This reply was modified 6 years, 11 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.