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 support@ccsinfo.com

fatal: unable to open file 'proj0003.def'

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







fatal: unable to open file 'proj0003.def'
PostPosted: Wed Feb 04, 2009 8:57 am     Reply with quote

Hallow friends
I have a problem with my C
I have tried to run the simplest program
Code:
 #include <stdio.h>
     void main()
     {
      int first,second;
      printf("first");
      scanf("%d",&first);
      printf("second");
      scanf("%d",&second);
      printf("sum %d/n",first+second);
      }

After that I press compile and make project (1 error) and build project (1 error) and finally I press run
I receive a message fatal: unable to open file 'proj0003.def'
Ttelmah
Guest







PostPosted: Wed Feb 04, 2009 9:19 am     Reply with quote

You _may_ be able to ignore 'warnings', but an error, says that something is wrong. In this case, you have not defined what processor the code is for, so how can the compiler generate code?...
Remember this is a compiler to produce a program to run in a specific chip, not a compiler to produce code to run inside an 'OS', which already knows how fast the chip is running, and where th serial port 'is' etc..

A minimum program, needs:
1) A processor definition - normally done by including the processor file at the head of the code.
2) Fuse definitions to say how to configure this processor.
3) Clock definition, so the compiler knows how fast the processor is running, and can adjust timings for the serial etc., to match.
4) A serial definition to say what pins on the chip to use for I/O.

5) Your code added _after_ these, will compile and run.

Best Wishes
TOMER1
Guest







PostPosted: Wed Feb 04, 2009 10:42 am     Reply with quote

I am sorry but I don't understand way I can't run the program inside an operating system?
I want that before I build a program into chip to run some codes in my compute, how I can do this?
Ttelmah
Guest







PostPosted: Wed Feb 04, 2009 10:58 am     Reply with quote

Go to a different board....
This is a board for _CCS C_, which is an _embedded_ C, running basically on PIC processors. Answers here, are _only for this compiler_.

Best Wishes
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Wed Feb 04, 2009 11:06 am     Reply with quote

Are you running this program on a PIC microcontroller or on a PC? The PIC chips don't usually use an operating system as they often have only a few hundred bytes of memory.

This BBS is for the CCS C compiler for PIC chips running without an operating system. If you have a different processor or use an OS you will need to ask your questions elsewhere.
_________________
The search for better is endless. Instead simply find very good and get the job done.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Feb 04, 2009 11:13 am     Reply with quote

Do you have the CCS compiler ? If so, this link tells how to simulate
your program without running it in hardware.
http://www.ccsinfo.com/forum/viewtopic.php?t=36805

If you have TurboC or MSVC++, then you're on the wrong forum.
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