CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Cannot open file (Include File 12F675.H not found)

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
RAstle



Joined: 27 Nov 2008
Posts: 1

View user's profile Send private message

Cannot open file (Include File 12F675.H not found)
PostPosted: Thu Nov 27, 2008 7:15 am     Reply with quote

Anyone know where to get this file from ?
I don't have it Sad

Error 18 "main.c" line 1 (9,20): file can not be opened:
Code:
#include <12F675.h>
#fuses INTRC_IO, NOWDT, NOMCLR, PUT, BROWNOUT
#use delay(clock=4000000)
#use rs232(baud=9600, xmit=PIN_A4, rcv=PIN_A3)

//===========================
void main()
{

printf("Hello World \n\r");

while(1);
}

Thanks
fivenoom
Guest







U need to use The Project Wizard
PostPosted: Thu Apr 16, 2009 6:26 am     Reply with quote

U need to use the project wizard FIRST.
In Example, you need to make a new project first using the Project Wizard from the toolbar, next you need to add your source code with the .c extension, then just follow the instructions, else the ERROR 18 will be appear, and it's over....
greetings from Mexico...
dyeatman



Joined: 06 Sep 2003
Posts: 1933
Location: Norman, OK

View user's profile Send private message

PostPosted: Thu Apr 16, 2009 10:12 am     Reply with quote

The header (.H) files are found in the PICC\Devices directory. If the file is not there you are either using the demo version or an older version of the compiler that does not support that PIC. If the file is there then the file path environment variables are not set properly and the best thing to do is to re-install the compiler to get them set up properly. An alternative is to include the full path to the file in the #include statement. If you do not have the file, due to to licensing issues, no one can legally send the file to you.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Apr 16, 2009 1:32 pm     Reply with quote

The 12F675 is supported by the PCM compiler from CCS. You may be
using the free PCB compiler (also from CCS) that comes with MPLAB
in the "Third Party Tools" section of the install program. The PCB
compiler doesn't support the 12F675.
romertz



Joined: 03 Oct 2008
Posts: 12
Location: Bogota

View user's profile Send private message

PostPosted: Thu Jun 18, 2009 12:09 pm     Reply with quote

the answer from dyeatman is what many of us were searching for. . . It needs to write all the path. . .
That error18 was killing me. Installing/uninstalling not always solve the problem or there is a sequence or I don't know what.

thanks. Very Happy
dluu13



Joined: 28 Sep 2018
Posts: 395
Location: Toronto, ON

View user's profile Send private message Visit poster's website

Error #18 File cannot be opened on new install
PostPosted: Wed Sep 02, 2020 7:22 am     Reply with quote

Hi all,

I am having some trouble with installing CCS on another one of my machines. (PCD 5.085)

I am using it with MPLAB X v5.35 the same as on my main machine.

All of the registration files and such are working, and the compiler runs but I get these errors:

Code:
Compiling C:\LCB_G10_minimal.X\LCB_G10_minimal on 02-Sep-20 at 09:14
C:\LCB_G10_minimal.X\LCB_G10_minimal.c:8:10:  Error#18  File can not be opened
    Not in source "C:\LCB_G10_minimal.X\24FJ128GA308.h"
    Not in local "24FJ128GA308.h"
    Not in project "C:\LCB_G10_minimal.X\24FJ128GA308.h"
    Not in default "C:\LCB_G10_minimal.X\24FJ128GA308.h"
C:\LCB_G10_minimal.X\LCB_G10_minimal.c:9:9:  Error#128  A #DEVICE required before this line
C:\LCB_G10_minimal.X\LCB_G10_minimal.c:12:7:  Error#128  A #DEVICE required before this line
C:\LCB_G10_minimal.X\LCB_G10_minimal.c:13:7:  Error#128  A #DEVICE required before this line
C:\LCB_G10_minimal.X\LCB_G10_minimal.c:14:7:  Error#128  A #DEVICE required before this line
C:\LCB_G10_minimal.X\LCB_G10_minimal.c:15:7:  Error#128  A #DEVICE required before this line
C:\LCB_G10_minimal.X\LCB_G10_minimal.c:16:7:  Error#128  A #DEVICE required before this line
C:\LCB_G10_minimal.X\LCB_G10_minimal.c:17:7:  Error#128  A #DEVICE required before this line
C:\LCB_G10_minimal.X\LCB_G10_minimal.c:18:7:  Error#128  A #DEVICE required before this line
C:\LCB_G10_minimal.X\LCB_G10_minimal.c:19:7:  Error#128  A #DEVICE required before this line
C:\LCB_G10_minimal.X\LCB_G10_minimal.c:20:7:  Error#128  A #DEVICE required before this line
C:\LCB_G10_minimal.X\LCB_G10_minimal.c:21:7:  Error#128  A #DEVICE required before this line
C:\LCB_G10_minimal.X\LCB_G10_minimal.c:22:7:  Error#128  A #DEVICE required before this line
C:\LCB_G10_minimal.X\LCB_G10_minimal.c:23:7:  Error#128  A #DEVICE required before this line
C:\LCB_G10_minimal.X\LCB_G10_minimal.c:24:7:  Error#128  A #DEVICE required before this line
C:\LCB_G10_minimal.X\LCB_G10_minimal.c:25:7:  Error#128  A #DEVICE required before this line
C:\LCB_G10_minimal.X\LCB_G10_minimal.c:26:7:  Error#128  A #DEVICE required before this line
C:\LCB_G10_minimal.X\LCB_G10_minimal.c:27:7:  Error#128  A #DEVICE required before this line
C:\LCB_G10_minimal.X\LCB_G10_minimal.c:28:7:  Error#128  A #DEVICE required before this line
C:\LCB_G10_minimal.X\LCB_G10_minimal.c:29:7:  Error#128  A #DEVICE required before this line
C:\LCB_G10_minimal.X\LCB_G10_minimal.c:31:5:  Error#44  Internal Error - Contact CCS  PPUSE
C:\LCB_G10_minimal.X\LCB_G10_const.h:7:9:  Error#128  A #DEVICE required before this line


When I ctrl+click on my "include <24FJ128GA308.h>" line it brings me to the header file so I know that the file exists and the IDE can at least find them.

I saw an earlier thread, to set the path and I confirmed that my path variables are set properly by comparing it with my other machine.

If provide the full path to the file it then opens properly, but the same error 18 then pops up for stdio, stdlib, stdint etc.

I've tried running as administrator and everything. Any ideas what the problem is?
Ttelmah



Joined: 11 Mar 2010
Posts: 19506

View user's profile Send private message

PostPosted: Wed Sep 02, 2020 7:46 am     Reply with quote

MPLAB, maintains it's own search variables, rather than using the path.

Right click on the project in the left hand column
Select Properties
Select the CCS C compiler at the bottom
Compile Options
Select 'General' at the top of the right hand window.
Then there is a tab in the right window, that says 'Include directories'
Click on the three full stop button right of this.
Select Browse
Add the directory for the processor files, and the driver and example
directories.
dluu13



Joined: 28 Sep 2018
Posts: 395
Location: Toronto, ON

View user's profile Send private message Visit poster's website

PostPosted: Wed Sep 02, 2020 10:15 am     Reply with quote

Ayy! you know everything!
Thanks, I've gotten past that particular roadblock now. But now I'm having this :(
Code:
make[2]: *** [nbproject/Makefile-default.mk:117: build/default/production/LCB_G10_minimal.o] Error 1
make[1]: *** [nbproject/Makefile-default.mk:91: .build-conf] Error 2
make: *** [nbproject/Makefile-impl.mk:39: .build-impl] Error 2

 

BUILD FAILED (exit value 2, total time: 2s)


It's not very descriptive, to me at least. I tried deleting those files so the compiler can generate them again, but with no luck.
jeremiah



Joined: 20 Jul 2010
Posts: 1346

View user's profile Send private message

PostPosted: Wed Sep 02, 2020 10:18 am     Reply with quote

Ttelmah wrote:
MPLAB, maintains it's own search variables, rather than using the path.

Right click on the project in the left hand column
Select Properties
Select the CCS C compiler at the bottom
Compile Options
Select 'General' at the top of the right hand window.
Then there is a tab in the right window, that says 'Include directories'
Click on the three full stop button right of this.
Select Browse
Add the directory for the processor files, and the driver and example
directories.


This is one of the bigger things that annoy me and I don't know if it is mplabx or the CCS plugin. In the old days, I would find the install directory on its own without needing to supply the paths. Somewhere in the mplabx 3.x days, both mplabx and the plugin got updated and we had to manually add them for every project.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group