| View previous topic :: View next topic   | 
	
	
	
		| Author | 
		Message | 
	
	
		
			monkeytennis
 
 
  Joined: 18 Feb 2004 Posts: 16 Location: UK 
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				| Can only use one .c file in MPLAB IDE | 
			 
			
				 Posted: Tue Nov 15, 2011 8:14 am     | 
				     | 
			 
			
				
  | 
			 
			
				Hello,
 
 
I have just got the latest release (4.126) of the PCH command line compiler and have run the CCS setup program to use it with MPLAB IDE.
 
 
However, when I try and build a project containing more than a single .c file it says:
 
 
 	  | Code: | 	 		  Executing: "C:\Program files\Picc\CCSC.exe" +FH "main.c" +EXPORT  #__DEBUG=1 +ICD +DF +LN  +T +A +M -Z +Y=9 +EA #__18F4550=TRUE
 
*** Error 7 "C:\Program Files\PICC\devices\18F4550.h" Line 204(2,6): Invalid Pre-Processor directive  Export requires IDE
 
      1 Errors,  0 Warnings.
 
BUILD FAILED: Tue Nov 15 14:09:00 2011
 
 | 	  
 
 
But when I remove the other .c files (except the one containing main()) the project compiles successfully.
 
 
What am I doing wrong?
 
 
Thanks, Simon | 
			 
		  | 
	
	
		  | 
	
	
		
			PCM programmer
 
 
  Joined: 06 Sep 2003 Posts: 21708
  
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		 | 
	
	
		  | 
	
	
		
			monkeytennis
 
 
  Joined: 18 Feb 2004 Posts: 16 Location: UK 
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Tue Nov 15, 2011 12:22 pm     | 
				     | 
			 
			
				
  | 
			 
			
				Okay, so it looks like I needed an IDE edition.
 
 
I'll stick to doing it using a single .c file.
 
 
Thanks for your help.     | 
			 
		  | 
	
	
		  | 
	
	
		
			PCM programmer
 
 
  Joined: 06 Sep 2003 Posts: 21708
  
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Tue Nov 15, 2011 1:18 pm     | 
				     | 
			 
			
				
  | 
			 
			
				Well, you can use multiple files, you just have to #include them in the
 
main C source file, as shown in the linked examples in that thread. | 
			 
		  | 
	
	
		  | 
	
	
		 |