develooper Front page | perl.perl6.internals | Postings from October 2002

How to portably link on Win32 (all flavors), OS/2 and VMS?

Thread Next
Andy Dougherty
October 28, 2002 09:53
How to portably link on Win32 (all flavors), OS/2 and VMS?
Message ID:
I need some portability help.  In config/auto/ (the stack
growth direction test) I want to portably compile and link together three
files.  (The functions are in separate files to prevent compiler
optimizations from fouling up the stack direction test.)

Currently, config/auto/ runs the following commands:

    $cc $ccflags -I./include -c test0.c
    $cc $ccflags -I./include -c test1.c
    $cc $ccflags -I./include -c test2.c
    $link $linkflags ${cc_exe_out}test$exe test0$o test1$o test2$o $libs

Unfortunately, that doesn't work with Microsoft's Visual C because the
cc_exe_out flag is -Fe, and that doesn't work for the linker.  I'd like to
change that last command to 
    $link $linkflags ${link_exe_out}test$exe test0$o test1$o test2$o $libs

but I'm unsure what to put for link_exe_out for each of the three
compilers mentioned in config/init/hints/, nor for the
compilers used under OS/2 and VMS.

NOTE:  The variable is called $link, but it could be 'cc' or 'cl' or
something like that.  It's whatever command I should call to link together
the three object files to create an executable.

So, my simple request:  What is the correct command line invocation
for each of those systems to link together object files?

    Andy Dougherty

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About