MPLINK 4.38, Linker
Copyright (c) 1998-2010 Microchip Technology Inc.
Error - could not find definition of symbol 'OpenADC' in file './GenBoost1.o'.
Errors : 1
Device is declared in main.c code correctly as #include <p18f458.h> and also in configure- select device..
The C18 adc.h file that includes 'OpenADC' is in the project dir and is declared in the project .h file.
Any other ideas would be most appreciated....
More info.........
Device => PIC18F458
Compiler => Microchip C18 V3.37.01
Debug tools => Real ICE, ICD3 are configured, but no h/w as yet so just want to step through code at present...
Operating sys => XP sp3
MPLAB => MPLAB IDE v8.66
adc.h contains the function prototype that allows the compiler to correctly compiles the calls to OpenADC.
The code for actual function OpenADC is compiled from adc.c or the linker can used the compile object file adc.o.
Thinking if you lib path is correct it should find them. But I am not thinking clearly . So add adc.c to your project. May not be the right way but it will fix the problem.
Could you post your code? If I'm understanding you correctly, you only have #include <p18f458.h>, but you may also need to have #include <adc.h> in the actual code, not just in the project directory. I may have misunderstood what you were saying, though, so that is why I asked for your code.
Der Strom
Thanks 3V0, Can you confirm which is the linker file, do you mean the device header file? I have a linker script declared within MPLAB IDE as 18f458_g.lkr but I think you mean the file 18f458.h in my project dir.
So just removed the 18f458.h file and Genboost1 project and workspace files and used the project the wizard to generate a new project. Do I just need to add genboost1.c & .h files or do I also need to add all the other header files ie. stdl.h adc.h etc.....
Now I get the following :-
Make: The target "U:\MOD FESS project\Single Ph Inv project\GenBoost1.o" is up to date.
Make: The target "U:\MOD FESS project\Single Ph Inv project\GenBoost1.cof" is out of date.
Executing: "C:\Program Files\Microchip\mplabc18\v3.37.01\bin\_mplink.exe" "GenBoost1.o" /o"GenBoost1.cof" /M"GenBoost1.map" /W
MPLINK 4.38, Linker
Copyright (c) 1998-2010 Microchip Technology Inc.
Error - Device not specified. Use /p option to specify a device.
Errors : 1
Looks like I need to start adding the .h files again???
Thanks 3V0, Can you confirm which is the linker file, do you mean the device header file? I have a linker script declared within MPLAB IDE as 18f458_g.lkr but I think you mean the file 18f458.h in my project dir.
Hi 3V0, looks Ive sorted it now by adding C:\Program Files\Microchip\mplabc18\v3.37.01\lib to the Library search path, from the project build options. Not sure why the wizard didnt do this but it seems to compile ok now.