This message was bounced back due to youe email problemq
Gloria, Jing wrote:
Maurice,
thanks for your inputs.
I followed your suggestion using the old style __asmname__ and I get the Pascal module to compile without errors. But now I get the following error during link.
rigor% make gpc -c try_hello.pas try_hello.pas:2: warning: missing program header gpc -o try2 try_main.o try_hello.o c_hello.o Undefined first referenced symbol in file testcode try_hello.o ld: fatal: Symbol referencing errors. No output written to try2 collect2: ld returned 1 exit status *** Error code 1 make: Fatal error: Command failed for target `try2'
try_hello.pas is the module that is exporting Testcode.
How ?
Is
there any other flag or directive that I am missing? It looks like try_hello.pas is expecting testcode to be external.
Difficult to say without having the codes at hand ...
I may have to bite the bullet here and build the latest released GPC code. I am avoiding this since I am a newbie on Solaris/Unix systems.
Probably so. You seem to try not to use the automake features of gpc, and use C-style programming, with independent compilations of the modules, final linking and the like. But if your programs are properly written, you should have only to type gpc try_main.pas -o try2 --automake and gpc manages to compile all C modules and pascal units that are needed, because all needed information is in the source files. But I do not remember what was posible two years ago, and probably very few people can do. Much effort have been made on the compiler for this to work well. So probably install the last gpc alpha and look in the demos directory the programs gpc_c_pas.pas c_gpc.pas and friends which show how to do that properly.
Maurice