IDE selecting wrong includes

Discuss the Integrated Development Environment (IDE)

Moderators: David Barker, Jerry Messina

Post Reply
SHughes_Fusion
Posts: 219
Joined: Wed Sep 11, 2013 1:27 pm
Location: Chesterfield

IDE selecting wrong includes

Post by SHughes_Fusion » Thu Mar 17, 2016 12:01 pm

There appears to be a bug in the IDE relating to includes.

I've been trying to fix a bug in some code and was mystified why a change I was making wasn't making any difference.

I'd opened an include by clicking on the entry in the Code Explorer. I made some changes to that file, went back to the main code and compiled it. Took me a while to realise the changes I was making in the included file weren't being applied. I looked closer and found that the include that Swordfish had opened from the Code Explorer wasn't the one which the compiler was using which of course explained the problem. Opening the include manually and making the changes there fixed the issue.

I wonder if this is related to the changes made a while back to the search order for includes?

In my case I've copied my Swordfish folder (including the UserLibrary folder) to my desktop as the 'My Documents' folder is actually networked and due to the speed of the network compilation was taking forever. The compiler is correctly using the UserLibrary folder in the Swordfish folder on the desktop but the IDE opens the file from the UserLibrary folder in My Documents.

SHughes_Fusion
Posts: 219
Joined: Wed Sep 11, 2013 1:27 pm
Location: Chesterfield

Re: IDE selecting wrong includes

Post by SHughes_Fusion » Thu Mar 17, 2016 2:08 pm

Apologies, I've been caught out again by the way Swordfish looks for libraries. I've just realised it is totally ignoring the new UserLibrary folder I created on my desktop and if it can't find the library in My Documents then takes what it can find elsewhere...

What a mess...

Is there a way to redirect the UserLibrary folder to another location? It looks like I can't redirect or link due to the way the Documents folder on my PC is set up.

If not then it looks like I've got to put up with massively extended compile times...

Jerry Messina
Swordfish Developer
Posts: 1469
Joined: Fri Jan 30, 2009 6:27 pm
Location: US

Re: IDE selecting wrong includes

Post by Jerry Messina » Fri Mar 18, 2016 3:39 pm

I've already moved everything around and created symbolic links on my machines, so it's hard for me to test this...

On my machines there was a UserLibrary folder created in C:\ProgramData\Mecanique\Swordfish. If there wasn't one in MyDocuments, would using that one work out?

SHughes_Fusion
Posts: 219
Joined: Wed Sep 11, 2013 1:27 pm
Location: Chesterfield

Re: IDE selecting wrong includes

Post by SHughes_Fusion » Mon Mar 21, 2016 8:23 am

Thanks, Jerry, that at least seems to have done the job.

Still wish we had more control over where SF searches....

Post Reply