AvO> There are known problems with --autobuild and --automake. Anyway, since AvO> these options will be deprecated in the near future, try "gp" AvO> (http://fjf.gnu.de/) instead.
Adriaan, thank you very much! It works ... partially:)
It works fine with my native gpc compiler (it is of version "gpc version 20050217, based on gcc-3.4.3").
I'm also forced to use cross compiler (for arm-elf- target). Here is the problem. More detailed:
I have the main program file program.pas, it uses a few units unit1.pas, unit2.pas, ... After the compilation process is finished, file program.o contains unresolved links to the functions init_Unit1, init_Unit2, ... Some of the units don't have such a functions. It is the units that don't have the code that is executed on unit initialization time. So these references cannot be resolved and build process stopped with error. Is it possible that the problem is caused by my cross compiler which is a bit old? (my arm-elf-gpc is "gpc version 20030830, based on gcc-3.3.1"). Actually, I'm confused because this very compiler can build the project if it is called in another way. When build process is inited in "arm-elf-gpc --autobuild ..." fashion (an old fashion), there is no program.o file in current directory - compiler builds main program object file in a temporary directory and all works fine (obviously, it doesn't add links to non-existing functions). When build process is inited as "gp PC=arm-elf-gpc ..." (a new fashion), there is program.o file in current directory which contains unresolved links.
waiting for any ideas, Regards, Igor Marnat mailto:marny@rambler.ru
AvO> There are known problems with --autobuild and --automake. Anyway, since AvO> these options will be deprecated in the near future, try "gp" AvO> (http://fjf.gnu.de/) instead.
Adriaan, thank you very much! It works ... partially:)
It works fine with my native gpc compiler (it is of version "gpc version 20050217, based on gcc-3.4.3").
I'm also forced to use cross compiler (for arm-elf- target). Here is the problem. More detailed:
I have the main program file program.pas, it uses a few units unit1.pas, unit2.pas, ... After the compilation process is finished, file program.o contains unresolved links to the functions init_Unit1, init_Unit2, ...
gp will create each of the .o files for each unit, it
unit1.o, unit2.o, program.o
unit1.o will include the init_Unit1 function.
You then need to link them all together.
You could also merge all the .o files into a library (.a) using libtool or possibly even in to a single .o (I think I've done this before but could not find the command for it off hand).
gp should create the final program for you unless you specify the -c switch.
Alternatively you can link the .o files together using gpcgcc.
Enjoy, Peter.
Some of the units don't have such a functions. It is the units that don't have the code that is executed on unit initialization time. So these references cannot be resolved and build process stopped with error. Is it possible that the problem is caused by my cross compiler which is a bit old? (my arm-elf-gpc is "gpc version 20030830, based on gcc-3.3.1"). Actually, I'm confused because this very compiler can build the project if it is called in another way. When build process is inited in "arm-elf-gpc --autobuild ..." fashion (an old fashion), there is no program.o file in current directory - compiler builds main program object file in a temporary directory and all works fine (obviously, it doesn't add links to non-existing functions). When build process is inited as "gp PC=arm-elf-gpc ..." (a new fashion), there is program.o file in current directory which contains unresolved links.
waiting for any ideas, Regards, Igor Marnat mailto:marny@rambler.ru