add libfile error

Questions on using the PGI Compilers and Tools
Post Reply
yaoshunyu
Posts: 1
Joined: Aug 30 2019

add libfile error

Post by yaoshunyu » Fri Oct 11, 2019 8:34 pm

pgf90 -Bstatic -fPIC libjsonfortrand.lib libjsonfortran.lib
when I use -Bstatic add any libfile,it would throw out 90main.obj : error LNK2019: 无法解析的外部符号 MAIN_,该符号在函数 main 中被引用

mkcolg
Posts: 8067
Joined: Jun 30 2004

Re: add libfile error

Post by mkcolg » Mon Oct 14, 2019 7:48 am

Hi yaoshunyu,

This isn't a problem with -Bstatic but rather you're missing a main program.

-Mat

Post Reply