November 17, 2022 at 12:21 #33443
Does Visual GDB not allow us to use the “Add as link” feature? That is add a link to a file in some other folder rather than having top copy, duplicate the file?November 19, 2022 at 08:42 #33444
Please try using the Add->Existing Item command in Solution Explorer. It should do just what you described.November 19, 2022 at 13:50 #33445
I should have mentioned that, the problem is that when I do that the only buttons I see on the dialog is “Add” and “Cancel” I do not see the small arrow that usually appears. If I I try the same thing on some other non Visual GDB project I do see the small arrow. The dialog should show a button that looks like this:
But I see no arrow, just a plain “Add” button.November 19, 2022 at 13:59 #33446
This is by design. C++ and C# projects have different semantics, so this button is not needed on C++ projects.November 20, 2022 at 09:27 #33447
OK I see, so that’s not something I can do.
Well my core question is then, how can I have two distinct projects, in different folders, be able to “see” source and headers in some other folder?
Is there any way to adjust a project’s setting to tell it to include some source folder and some header folder, when compiling?
I can see that the Visual Studio project settings offer an “Additional Include Directories”, is that the only way to do this? and can that also contain .c files, not only .h?
I want to work on two distinct projects where each one must include some support headers and source files, I do not want to duplicate these as copies within each project’s folder so how can I do this?
Thanks.November 20, 2022 at 09:37 #33448
VisualGDB projects use the same semantics as the regular Win32 C++ projects. If you are new to C++ and are not familiar with header files and libraries, we would advise first creating the project layout you need using the regular Win32 C++ project type. Once that works the way you intend, feel free to let us know how you created it and we will point out the locations of equivalent VisualGDB settings.
That said, the VisualGDB settings for C++ projects are designed to be as close as possible to the original Win32 C++ project properties, so once you get it working for the regular project type, finding the VisualGDB settings should be straight-forward.November 21, 2022 at 07:14 #33451
Hi, OK thanks, I did used to do a great deal of Win32 C development on Windows but that stopped around nine years ago so I am rusty.
Anyway I did get what seeking to do, two projects each referring to to “libraries” – these are in an unrelated sub folder and the projects are referring to these source by relative paths and also have additional include paths specified at the MS project level, so that they can see the header for these libraries.
The code is all being developed on Nucleo F446RE boards.
You can see how I did this:
(The receiver is at this point, more or less a clone of the transmitter, I’ve not really started working on that yet).
This seems to be sufficient for what I wanted being able to share library code easily, but if you have any suggestions or ways to do this better, please do shout!
ThanksNovember 21, 2022 at 08:41 #33455
If you you would like us to review your code and suggest the best layout for it, please contact our sales for a consulting quote.
Otherwise, please make sure you reproduce the issue on a smaller “hello, world” setup involving the minimal amount of sources and libraries, and solve it successfully for a regular Win32 C++ project. If you then share the steps you needed to solve it for a Win32 project per our problem reporting guidelines (with full screenshots from scratch), we can point out the equivalent steps with VisualGDB.
You must be logged in to reply to this topic.