add libfile error

Questions on using the PGI Compilers and Tools
Post Reply
Posts: 15
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 中被引用

Posts: 8388
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.


Post Reply