Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Link external source folder via environment variable
Link external source folder via environment variable [message #771437] Tue, 27 December 2011 08:51 Go to next message
Mikhail Barg is currently offline Mikhail BargFriend
Messages: 6
Registered: January 2011
Junior Member
Hi,

I'm trying to link external source folder to my project. I'm doing this via Project properties->C/C++ general->Paths and Symbols->Source Location->Link Folder.
In principle it is working fine, if I specify the absolute folder path.

The problem is that the absolute path is not applicable in my case, as we share the project via SVN, and other developers have that folder with absolute paths. We are using an environment variable to reference this issue. But this variable is not available in the "Variables.." popup for the linked resources. Only variables I see there are ECLIPSE_HOME, PARENT_LOC, PROJECT_LOC and WORKSPACE_LOC.

This puzzles me a lot. How can I link the folder using an environment variable? I can see the variables in the Project properties->C/C++ build->Build Variables (with "Show system variables" enabled), but not in Project properties->Resource->Linked Resources->Path Variables.

Are there any solutions to this problem?

Best regards,
Mikhail Barg
Re: Link external source folder via environment variable [message #771529 is a reply to message #771437] Tue, 27 December 2011 14:29 Go to previous messageGo to next message
Klaus km is currently offline Klaus kmFriend
Messages: 142
Registered: November 2011
Senior Member
Mikhail wrote on Tue, 27 December 2011 03:51

Are there any solutions to this problem?


I think there is no solution in Eclipse.

But a solution for your problem could be to use "symbolic links" on each PC. Each developer must define such a link once. In your Eclipse configuration you can use this symbolic link.

For example, under Windows 7 you could define:

C:\SOURCE>mklink /d symlink C:\my\source\is\here

In Eclipse you can use this "symbolic linked folder":
C:\SOURCE\symlink

http://en.wikipedia.org/wiki/NTFS_symbolic_link

Regards,
Klaus


Re: Link external source folder via environment variable [message #771533 is a reply to message #771437] Tue, 27 December 2011 14:48 Go to previous messageGo to next message
Yevgeny Shifrin is currently offline Yevgeny ShifrinFriend
Messages: 208
Registered: July 2009
Senior Member
Hi,

Please refer to below two bugs related to this issue:
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=353511
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=353498

Thanks,
Yevgeny
Re: Link external source folder via environment variable [message #771571 is a reply to message #771437] Tue, 27 December 2011 16:54 Go to previous messageGo to next message
David Wegener is currently offline David WegenerFriend
Messages: 1445
Registered: July 2009
Senior Member
On 12/27/2011 02:51 AM, Mikhail wrote:
> Hi,
>
> I'm trying to link external source folder to my project. I'm doing this
> via Project properties->C/C++ general->Paths and Symbols->Source
> Location->Link Folder. In principle it is working fine, if I specify the
> absolute folder path.
> The problem is that the absolute path is not applicable in my case, as
> we share the project via SVN, and other developers have that folder with
> absolute paths. We are using an environment variable to reference this
> issue. But this variable is not available in the "Variables.." popup for
> the linked resources. Only variables I see there are ECLIPSE_HOME,
> PARENT_LOC, PROJECT_LOC and WORKSPACE_LOC.
>
> This puzzles me a lot. How can I link the folder using an environment
> variable? I can see the variables in the Project properties->C/C++
> build->Build Variables (with "Show system variables" enabled), but not
> in Project properties->Resource->Linked Resources->Path Variables.
>
> Are there any solutions to this problem?
>
> Best regards,
> Mikhail Barg
Eclipse won't pick up Path Variables from Environment variables. You
can define your own Path Variables in the popup for linked resources.
Click on the New button and browse to the file system location. Each
developer then needs to define this variable in their own workspace.

You are able to get relative paths using special variable names that are
internal to Eclipse. You can setup the relative links using Drag and
Drop. Open up a system file navigator window (Explorer, Dolphin,
Nautilus, etc). Drag the external folder and drop it on the project in
the Eclipse Project Explorer. A dialog box will ask if you want to add
the folder to the project. Select Link to Files and Folders. You can
then select if the link should be relative to the project, workspace, or
a variable you create yourself.
Re: Link external source folder via environment variable [message #771813 is a reply to message #771571] Wed, 28 December 2011 08:12 Go to previous messageGo to next message
Mikhail Barg is currently offline Mikhail BargFriend
Messages: 6
Registered: January 2011
Junior Member
Hi,

Thanks for all the responses! I figured the solution with every developer defining the linked resource variables for the workspace
(Preferences->General->Workspace->Linked resources), and then using this variables to link folders in a specific shared project..

Best regards,
Mikhail Barg
Re: Link external source folder via environment variable [message #1857754 is a reply to message #771813] Fri, 24 February 2023 06:37 Go to previous message
Vladimir Grishchenko is currently offline Vladimir GrishchenkoFriend
Messages: 104
Registered: July 2009
Senior Member
Fast forward 11 years and it's still impossible to base a linked resource on an environment variable. Sad sad sad!
Previous Topic:undefined reference to `pvPortMalloc'
Next Topic:Build output parser misses some include paths
Goto Forum:
  


Current Time: Sat Dec 07 00:31:56 GMT 2024

Powered by FUDForum. Page generated in 0.03365 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top