Creating lib and exp instead of exe

I’ve tried to link object files and libraries to make exe file.

Command is as follows;

pgfortran -Mpreprocess -DPGI -Difdef_flow -fast -Mbackslash -mp -o abcdefg.exe {object files} {libraries}

After I executed the command above,I got the standard out message as follows;

—standard out message--------------
Creating library abcdefg.lib and object abcdefg.exp
./abcdefg.exf: warning: unknown section “.fnp_dir” found, executable not
stripped. Use the linker’s /merge option to merge this section
with another. Example: “/merge:.fnp_dir=.data”
./abcdefg.exf: warning: unknown section “.fnp_mar” found, executable not
stripped. Use the linker’s /merge option to merge this section
with another. Example: “/merge:.fnp_mar=.data”
./abcdefg.exf: warning: unknown section “.tls” found, executable not
stripped. Use the linker’s /merge option to merge this section
with another. Example: “/merge:.tls=.data”
—standard out message--------------

In this way, I couldn’t get the abcdefg.exe.

All object files and libraries are compiled using -Bstatic option and
All libraries are static libraries.

Thanks for any help with this.

Hi HaruhikoMitsuhata86360,

Are you using PVF? And if so, did you start with a Static Lib project?

These messages are what I would expect if you are running the “ar” wrapper or calling MS’s linker.exe directly to build a static library. Given the command line you show, it doesn’t make sense why you’d get these messages. Hence, my best guess is that these are coming from a different command such as ar.

-Mat

Hi Mat.
Thank you for your kind advice.

I used both PVF and PVF_BASH. Both had the same result.
In case of PVF, I started with the PVF project (object) which I compiled with PVF compiler.
Main program was as follows;

PROGRAM MAIN
IMPLICIT NONE
INTEGER :: I,J,RET
:
:

Some static libraries included those compiled by Microsoft Visual C++, and I didn’t use “ar” wrapper.

Do you have any knowledge?
Thank you.

From the original message, it appears that link is trying to create a library. If you’re not using link directly (or ar, or lib), then it could be that you’ve added a option such as -Mmakedll or -Mmakeimplib which would cause a library to be created. Though, you don’t show that you are using either option so I’m thinking that there’s missing information.

Can you please post the full compiler command line that you are using (from Bash) as well as all generated compiler messages?

Thanks,
Mat