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

help on function definition!!!!

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



Joined: 10 Apr 2007
Posts: 18

View user's profile Send private message

help on function definition!!!!
PostPosted: Fri Apr 20, 2007 8:29 am     Reply with quote

i've this code for my project and when i compile i have the following error message :"Function used but not defined: ... init_mc104p" but as u can see i've define the function Mc104P????
Shocked
where is the problem please

Code:
#include <18f8722.h>
#include <pc104.h>
#DEVICE ICD=TRUE
#fuses hs,nowdt
#use delay (clock=4000000)
#include <stdio.h>


void MC104P(void);
void main (void)
{
int i,k[256],v[256];

init_MC104P();            // configure MC104P inputs, outputs, analog and pc104 bus
init_cirrus_video();       // initialize the VGA video card with the Cirrus Logic


do

   {

      output_F(i);
      setup_adc_ports( ALL_ANALOG );
    setup_adc(adc_clock_internal);
   set_adc_channel(0);
   k[i]=read_adc();
   delay_us(50);
   set_adc_channel(1);
   v[i]=read_adc();
   delay_us(50);
 
      i++;
      delay_ms(500);
   }
while(1);
}
Ttelmah
Guest







PostPosted: Fri Apr 20, 2007 8:49 am     Reply with quote

You have declared a _prototype_ for a function called MC104P, but have no defintion for the function init_MC104P at all....

Best Wishes
rnielsen



Joined: 23 Sep 2003
Posts: 852
Location: Utah

View user's profile Send private message

PostPosted: Fri Apr 20, 2007 12:59 pm     Reply with quote

MC104P()
and
init_MC104P()

are two completely different functions. You've delcared MC104P() but are trying to call init_MC104P(). I'm not sure what you're trying to do with the init_ before MC104P().

Plus, you are calling init_cirrus_video() but have no definition for it so it will choke as well.

Ronald
TheBeginner



Joined: 10 Apr 2007
Posts: 18

View user's profile Send private message

PostPosted: Sun Apr 22, 2007 3:18 am     Reply with quote

please i'ne still having the problem "function used but not defined... init_mc104p"!!!how can i define this function ????you should know that i'me using the calmotion MC104P single card computer which include pic18f8722, and in its manual they tell to use the function " init_MC104P()" such as on top code!!!!!!!!!!!!!!!!
thanks best regards
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Sun Apr 22, 2007 4:16 am     Reply with quote

Quote:
you should know that i'me using the calmotion MC104P single card computer
This is very important information. I had a look at the website of Calmotion and downloaded the Software & Examples Manual.
On page 2 of this manual it reads:
Quote:
Requirements
All of the libraries used as examples in this manual were created using the C18 library builder from Microchip. The compiler and linker used for your project must be compatible with this library builder.


The error messages you get are caused by several functions being defined inside the libraries, the compiler can't find these functions.

Which compiler version are you using? Only in the new v4.xxx CCS compilers the use of libraries is supported. The v4.xxx compiler is still very new and contains many bugs, the v4.03x versions seem to be the first more or less stable versions. I have read many problems about the use of libraries but don't know the status for the v4.032 version, maybe someone else can answer on this?

Does someone know if the Microchip C18 libraries are compatible to the CCS compiler?
TheBeginner



Joined: 10 Apr 2007
Posts: 18

View user's profile Send private message

PostPosted: Sun Apr 22, 2007 4:46 am     Reply with quote

thanks a lot for the effort you've made for me,y'es i've read that remark and i d'ont know if my compiler (pcwh ccs v.4.013) is compatible with their libraries???i've send them many mails but i'm still without answers Crying or Very sad
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