Hello I'm try compilate the program open source PRZM3

Hi I’m new in the program fortran.
I’m try compilate the program open source, the fortran PRZM3,
but of the compilate, I’ll take the follow error:
error LNK2019: unresolved external symbol;
I’ve don’t know if work right.
Somebody help?
thanks for advanced…

Hi joaomariomlk,

error LNK2019: unresolved external symbol;

This means that your program is using a symbol (such as a function or global variable) not found in the objects that are provided during the link. The most typical cause is that you’ve forgot to add a library on the link.

What you need to do is determine what symbol is missing and which library or object where this symbol can be found. Can you post the which symbols are missing?

  • Mat

Hi, thank for answer.
How I’ll do send this error in the form plaintext?!!?
thanks again…

up!!

Are you using PVF? If so, then select the “output” tab right next to the “Error List” tab. Note the symbol should also be shown in the “Error List” as well.

  • Mat

No, I’m used CMD PGI workstations…

How I’ll do send this error in the form plaintext?!!?

The plain text output should be printed to the command window so I guess I’m not understanding the question. Can you please rephrase the question?

Thanks,
Mat

Hi follow this link for screen the error:

http://postimage.org/image/z2zitlmo5/

thanks

I downloaded the source for PRZM3 to see where these symbols are coming from. It looks like they ship pre-compiled libraries which you’re suppose to link in. The problem on 32-bit Windows is that there are multiple calling conventions and that you need to have all objects and library use the same one. So by adding the PGI flag “-Munix” to the compile, I can match the call convension used in these libraries.

However, it appears the libraries were compiled with Lahey and as such rely on their runtime libraries. No much we can do here.

You’ll need to find the source for these external libraries and compile them with PGI or request PGI built versions from the authors.

  • Mat

Thanks a lot for answer!!!
So I’ll need talk about people of lahey, or the people of program PRZM3??
Because this source of runtime libraries with developers of lahey, if get much harder…

If you want to use PGI to compile the code, you’ll need to talk with the authors of PRZM3 to see if you can get them to support other compilers besides Lahey.

  • Mat

Neither. They (the PRZM3 people) appear to have compiled, using the Lahey compiler, some of the libraries from the sources available at http://water.usgs.gov/software/LIB/code/UNIX/lib3.2.source.tar.gz. You may attempt to compile just those libraries that are needed for PRZM3 (Adwdm.lib, Wdm.lib, Util.lib) using PGF95 instead. That leaves f2kcli.lib, which you may have to obtain from the f2kcli Web page.

Thanks a lot for answers!!! I’ll try compilate this lib with pgf95.

anyway, how compilate correctly, in the format lib, in the pgfortran!?!?
thanks a lot!!

Hi joaomariomlk,

how compilate correctly, in the format lib, in the pgfortran!?!?

Sorry, but I’m not clear on what you’re asking. Can you please be more specific?

Thanks,
Mat

the’m sorry, how do I correctly compile a lib in pgfortran??

See chapter 10 of the PGI Compiler User’s Guide. The section on building Windows libraries starts at page 125.

  • Mat