|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
get_tracking_state()
I have a question about how to use get_tracking_state(). I have included the tracking.h header file in my code, and I call the function in a normal if statement like this: if (get_tracking_state() == CAMERA_ON_TARGET)
{ our code; } anyways no where in user_routines_fast.c have I defined get_tracking_state(), and the only reason it compiles most of he way is because its prototyped in tracking.h. So my question is how I do I define it, or is there a global variable I can use that will suit my need. The error I get at the end of the compile looks like this; MPLINK 3.90, Linker Copyright (c) 2004 Microchip Technology Inc. Error - could not find definition of symbol 'get_tracking_state' in file 'C:\Feb 3rd\frc_camera_21\user_routines_fast.o'. Errors : 1 thanks for any help!!! |
|
#2
|
|||||
|
|||||
|
Re: get_tracking_state()
The function prototype is in tracking.h which you should #include at the beginning of any file which uses it. The function definition is in tracking.c which you should have added to your project at the same time tracking.h was added.
Did you actually add the files to your project using MPLAB, or did you just copy them to the directory with your code? |
|
#3
|
|||
|
|||
|
Re: get_tracking_state()
hey I included the tracking.h and tracking.c is included in my project, but I get this error!
Code:
Clean: Deleting intermediary and output files. Clean: Deleted file "C:\Feb 3rd\frc_camera_21\camera.o". Clean: Deleted file "C:\Feb 3rd\frc_camera_21\camera_menu.o". Clean: Deleted file "C:\Feb 3rd\frc_camera_21\eeprom.o". Clean: Deleted file "C:\Feb 3rd\frc_camera_21\ifi_startup.o". Clean: Deleted file "C:\Feb 3rd\frc_camera_21\ifi_utilities.o". Clean: Deleted file "C:\Feb 3rd\frc_camera_21\main.o". Clean: Deleted file "C:\Feb 3rd\frc_camera_21\serial_ports.o". Clean: Deleted file "C:\Feb 3rd\frc_camera_21\terminal.o". Clean: Deleted file "C:\Feb 3rd\frc_camera_21\tracking.o". Clean: Deleted file "C:\Feb 3rd\frc_camera_21\tracking_menu.o". Clean: Deleted file "C:\Feb 3rd\frc_camera_21\user_routines.o". Clean: Deleted file "C:\Feb 3rd\frc_camera_21\user_routines_fast.o". Clean: Deleted file "C:\Feb 3rd\frc_camera_21\pwm.o". Clean: Done. Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8722 "camera.c" -fo="camera.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw=2066 -D_FRC_BOARD Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8722 "camera_menu.c" -fo="camera_menu.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw=2066 -D_FRC_BOARD Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8722 "eeprom.c" -fo="eeprom.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw=2066 -D_FRC_BOARD Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8722 "ifi_startup.c" -fo="ifi_startup.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw=2066 -D_FRC_BOARD Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8722 "ifi_utilities.c" -fo="ifi_utilities.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw=2066 -D_FRC_BOARD Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8722 "main.c" -fo="main.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw=2066 -D_FRC_BOARD Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8722 "serial_ports.c" -fo="serial_ports.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw=2066 -D_FRC_BOARD Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8722 "terminal.c" -fo="terminal.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw=2066 -D_FRC_BOARD Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8722 "tracking.c" -fo="tracking.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw=2066 -D_FRC_BOARD Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8722 "tracking_menu.c" -fo="tracking_menu.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw=2066 -D_FRC_BOARD Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8722 "user_routines.c" -fo="user_routines.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw=2066 -D_FRC_BOARD Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8722 "user_routines_fast.c" -fo="user_routines_fast.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw=2066 -D_FRC_BOARD C:\Feb 3rd\frc_camera_21\user_routines_fast.c:233:Warning [2058] call of function without prototype Executing: "C:\mcc18\bin\mcc18.exe" -p=18F8722 "pwm.c" -fo="pwm.o" -Ou- -Ot- -Ob- -Op- -Or- -Od- -Opa- -nw=2066 -D_FRC_BOARD Executing: "C:\mcc18\bin\mplink.exe" /l"C:\mcc18\lib" "18f8722.lkr" "C:\Feb 3rd\frc_camera_21\camera.o" "C:\Feb 3rd\frc_camera_21\camera_menu.o" "C:\Feb 3rd\frc_camera_21\eeprom.o" "C:\Feb 3rd\frc_camera_21\ifi_startup.o" "C:\Feb 3rd\frc_camera_21\ifi_utilities.o" "C:\Feb 3rd\frc_camera_21\main.o" "C:\Feb 3rd\frc_camera_21\serial_ports.o" "C:\Feb 3rd\frc_camera_21\terminal.o" "C:\Feb 3rd\frc_camera_21\tracking.o" "C:\Feb 3rd\frc_camera_21\tracking_menu.o" "C:\Feb 3rd\frc_camera_21\user_routines.o" "C:\Feb 3rd\frc_camera_21\user_routines_fast.o" "C:\Feb 3rd\frc_camera_21\pwm.o" "C:\Feb 3rd\frc_camera_21\FRC_alltimers_8722.lib" /o"camera.cof" /M"camera.map" MPLINK 3.90, Linker Copyright (c) 2004 Microchip Technology Inc. Error - could not find definition of symbol 'get_tracking_state' in file 'C:\Feb 3rd\frc_camera_21\user_routines_fast.o'. Errors : 1 BUILD FAILED: Sun Feb 04 11:33:37 2007 |
|
#4
|
|||
|
|||
|
Re: get_tracking_state()
oh! I figured it out, apparently I added in extra space before my if statement like if (get_camera_state() == CAMERA_ON_TARGET), so I had to delete the space like this if(get_camera_state() == CAMERA_ON_TARGET). thanks for your help!
|
|
#5
|
||||
|
||||
|
Re: get_tracking_state()
Quote:
If you fixed the case of your function call, that's what solved your problem. If you didn't (and left it lower case), I would really appreciate knowing that... always have to be on the lookout for the dumb quirks of the compiler. ![]() |
|
#6
|
|||||
|
|||||
|
Re: get_tracking_state()
The name of the function is Get_Tracking_State(). Capitalization matters.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|