View previous topic :: View next topic |
Author |
Message |
Diogo melo Guest
|
Problem with multiple compilations units |
Posted: Fri Aug 01, 2008 2:54 pm |
|
|
Hi, i'm trying to link a series of .c files in my project but i keep getting this error from the CCS compiler:
Code: | Executing: "C:\Program files\Picc\CCSC.exe" +FM LINK="MIDIToCV.hex=main.o,menu.o,maqEstadosMIDI.o,DACSPI.o" +DF +LN +T -A +M -Z +Y=9 +EA
--- Info 300 "C:\Documents and Settings\Diogo\Desktop\Projecto Final de Curso\MIDIToCV\MIDIToCV.C" Line 1(0,1): More info: * List index out of bounds (0)
*** Error 44 "C:\Documents and Settings\Diogo\Desktop\Projecto Final de Curso\MIDIToCV\MIDIToCV.C" Line 1(0,1): Internal Error - Contact CCS OUTPUT FILE O
|
the files compile correctly but the linkage process seems to fail.
i have four source files with their respective header files, respecting the example given in the CCS help file under "multiple compilations units".
Could anyone give me a hand?
TIA
Diogo Melo |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Fri Aug 01, 2008 7:00 pm |
|
|
What is your compiler version number?
It is a four digit number like 4.074 and can be found at the top of the list file (*.lst), or for Windows compilers you can find the number under 'Start/Programs/PIC-C/Compiler Version'. |
|
|
diogo melo Guest
|
|
Posted: Fri Aug 01, 2008 7:24 pm |
|
|
ckielstra wrote: | What is your compiler version number?
It is a four digit number like 4.074 and can be found at the top of the list file (*.lst), or for Windows compilers you can find the number under 'Start/Programs/PIC-C/Compiler Version'. |
sorry about that:
CCS PCM C Compiler, Version 4.018, 19694 02-Ago-08 02:12 |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Sat Aug 02, 2008 5:21 am |
|
|
Your version is very old, current release is v4.077.
The first releases of the new v4 compiler were bad quality and for testing purposes only. Starting with release v4.030 it was possible to compile most programs again like in the v3 compiler. The new features did take a bit longer to compile correctly, especially multi-unit compilation had some problems. Your v4.018 is known to be not-working. For more info see the v4 sticky thread on top of this forum. |
|
|
diogo melo Guest
|
|
Posted: Sat Aug 02, 2008 6:45 pm |
|
|
ckielstra wrote: | Your version is very old, current release is v4.077.
The first releases of the new v4 compiler were bad quality and for testing purposes only. Starting with release v4.030 it was possible to compile most programs again like in the v3 compiler. The new features did take a bit longer to compile correctly, especially multi-unit compilation had some problems. Your v4.018 is known to be not-working. For more info see the v4 sticky thread on top of this forum. |
Thanks! That worked perfectly! I can now divide my project into modules like i wanted.
Thanks again!
Diogo Melo |
|
|
diogo melo Guest
|
|
Posted: Sat Aug 02, 2008 7:18 pm |
|
|
actually it just solved half the problem: i have one main module(main.c and main.h) and three other auxiliary ones(DACSPI.c MIDI.C and MENU.C and their respective header files). In the main.h i include in the end all of the other .h files. The auxiliary modules have the implementation of each function.The functions are only used in the main module not on any other.
What happens is i manage to compile correctly all of the files but for the MIDI.C and the MENU.C the source code has to be in the main.c.That does not happen with the DACSPI.c.
i get something like this:
Code: | Executing: "C:\Program Files\PICC\Ccsc.exe" +FM LINK="MIDIToCV.hex=main.o,DACSPI.o,maqEstadosMIDI.o,menu.o" +DF +LN +T -A +M -Z +Y=9 +EA
*** Error 112 "main.c" Line 46(1,1): Function used but not defined: ... MIDIFrameRecieverSM SCR=5609
1 Errors, 0 Warnings. |
I've have now the 4.057 version compiler.
diogo |
|
|
Diogo Melo
Joined: 04 Aug 2008 Posts: 4 Location: ISEL,Lisbon, Portugal
|
|
Posted: Mon Aug 04, 2008 6:59 pm |
|
|
anyone please? |
|
|
|