Silverfrost Forums

Welcome to our forums

INCLUDE files not showing up in Project Explorer

14 Oct 2014 7:50 #14831

I have quite a large number of INCLUDE files. But I can't add then to the Project Explorer; I right click/left click/... and nothing allows me to add these files.

I have added the path to the INCLUDE files to the project. They still don't show up.

A post from a few years ago seems to state that the include files will show up in Project Explorer automatically. But I'm not seeing it.

Any clues as to what I might be doing wrong?

15 Oct 2014 6:43 #14837

INCLUDE files should appear automatically in the Project Explorer window. There should be a 'Sources Files' icon and an 'Include Files' icon in the tree. The include files should appear automatically under 'Include Files'.

Failing this you could Add the include files to your project and then exclude them from the build by using the Properties dialog for the file (right click in the Project Explorer window).

15 Oct 2014 1:57 #14839

The Source Files icon show, and is right-clickable to add items.

The Include Files icon is visible, but not clickable at all.

Is it the file extent I use? I'm using older files that I have named with .INS extension. Still, I should be able to add....

Oh well! Your suggestion is certainly workable. Thanks for the response.

Bill

15 Oct 2014 6:45 #14843

The include files will probably be revealed by the file dependency checking. Is this switched on? See Project menu.

15 Oct 2014 7:44 #14847

Yes, it is turned on.

I've tried turning it off, perform rebuild, turn back on, then rebuild. No effect.

Turn it off, exit Plato, restart Plato, rebuild, rebuild dependencies. No effect.

Exit plato, start plato and reload project, enable dependency checking, rebuild project, rebuild dependencies. No effect.

15 Oct 2014 8:36 #14851

The <projectName>.ini file (in the project subfolder) is a text file that reveals the file handles and the dependency lists generated by Plato.

15 Oct 2014 11:05 #14852

Perhaps this will help. This is one of the .INI file in the solution.

[Switches] plugInID=1 [Breakpoints] [Handles] Next=8 1=D:\CMASTER.Virtual\CMASTERF95\CMAIN.FOR 2=D:\CMASTER.Virtual\CMASTERF95\CBLOCK.FOR 3=D:\CMASTER.Virtual\CMASTERF95\CCATALOG.FOR 4=D:\CMASTER.Virtual\CMASTERF95\CLITHO.FOR 5=D:\CMASTER.Virtual\CMASTERF95\CLOGPLT.FOR 6=D:\CMASTER.Virtual\CMASTERF95\CPRTCOD.FOR 7=D:\CMASTER.Virtual\CMASTERF95\CEDITS.FOR [Dependents] 1= 2= 3= 4= 5= 6= 7= [OpenFiles] 0='D:\CMASTER.Virtual\CMASTERF95\CMAIN.FOR',62,0,1,-1,-1,-1,-1,2,20,1075,523 Index=1 1='D:\CMASTER.Virtual\CMASTERF95\CEDITS.FOR',13,0,1,-1,-1,-1,-1,2,20,1075,523

16 Oct 2014 5:29 #14853

OK so Plato is not finding any dependencies.

What does an include statement look like in your code? Can you post a very simple example of two files, one with a main program with an INCLUDE and one listing the INCLUDEd file.

16 Oct 2014 2:57 #14856

I've set up two projects, one for the MAIN's that I'm working with and the second for the supporting functions/subroutines. I've combined these into a SOLUTION. That said, dealing with only a project or the solution makes no difference in the detection of the dependencies.

This is a shortened MAIN program I'm using. The INCLUDEd files are in the same directory: PROGRAM CMAIN CHARACTER256 PR,CMPROGNM@ PR = CMPROGNM@() PRINT ,'PROGRAM NAME=[',TRIM(PR),']' CALL XMCLOG CALL CEXIT END SUBROUTINE XMCLOG LOGICAL LDONE,SVONLY,LQUIT,REFILE,HASHLP INCLUDE <FOREXT.INS> CHARACTER84 LOGINF,LOGHLD CHARACTER4 BPROJ,DPROJ,BSTATE,DSTATE CHARACTER12 BQUAD,DQUAD CHARACTER16 LSPERS CHARACTER12 LSDATE CHARACTER84 LSTTMP character*80 out_list(20) INTEGER IBSC,IDSC,BID REAL BSC,DSC LOGICAL NEWNAM,PROCHD INTEGER RECNDX(32001) INCLUDE <FORDEF.INS> INCLUDE <FORCOM.INS> INCLUDE <FOREQU.INS> COMMON/MAIN1/BPROJ,DPROJ,BQUAD,DQUAD,BSTATE,DSTATE COMMON/SORTX2/RECNDX DATA HASHLP/.FALSE./ C C --- INITIALIZE BLOCK COMMON C print *,'Calling BLOCKD' CALL BLOCKD(.TRUE.) APROJ = ' ' stop end

This is an abbreviated function (shortest one with includes, but it won't compile as written). These functions are in a sub-directory to the main one, but the INCLUDEd files are in the next level up (ergo the syntax differences).

SUBROUTINE BREGPR(IOPT,NFLAG)
    INCLUDE <..\\FORDEF.INS>
LOGICAL TOKEN,ICOMP,TTHELP
    INCLUDE <..\\ROCKDEF.INS>
    INCLUDE <..\\FORCOM.INS>
    INCLUDE <..\\ROCKCOM.INS>
    INCLUDE <..\\FOREQU.INS>

C C --- PROCESS THE DESIRED OPTION C IF(IOPT.LT.0)GO TO 1600 C ENTER UNUSED DISPLAY CLEAR OPT INPUT GO TO (1000,1000,1300,1400,1500),IOPT 1000 CONTINUE C --- MAIN ENTRY WRITE(ITTY,99900) 99900 FORMAT(' 2. BED CODE REGION: ',A) IF(TTHELP(BUFF,102))GO TO 1000 1100 CONTINUE NFLAG=0 STOP END

Hope this helps.

16 Oct 2014 10:02 #14858

Change your include file names from <...> to '...' <...> indicates the file is in the ...\FTN95\INCLUDE folder; ie the folder defined by the 'ftn95include' environment variable.

INCLUDE <FOREXT.INS> should be changed to INCLUDE 'FOREXT.INS'

and INCLUDE <..\FORDEF.INS> to INCLUDE '..\FORDEF.INS'

There are some cases where <FOREXT.INS> may be useful, storing the file in the ...\FTN95\INCLUDE folder, when you want this include file to be available for all programs. I would not recommend this for general use.

John

16 Oct 2014 10:38 #14859

Great! Thanks, and I'll make those changes momentarily.

Appreciate the help. Bill

Please login to reply.