Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

popen close on MacOs

tkibedi
Beginner
193 Views

I am writing a code to use GnuPlot for graphics. I successfully implemented the code for Windows, using the M_processModule using "use, intrinsic :: ISO_C_BINDING" directive. However compiling the code on MacOs, it fails:

Undefined symbols for architecture x86_64:

  "__pclose", referenced from:

      _m_process_mp_process_close_ in M_processModule.o

      _m_process_mp_process_writeline_scalar_ in M_processModule.o

  "__popen", referenced from:

      _m_process_mp_process_open_ in M_processModule.o

ld: symbol(s) not found for architecture x86_64

 

Can anybody help, how to resolve this problem?

0 Kudos
2 Replies
jimdempseyatthecove
Black Belt
183 Views

Your Mac may not support a blended platform (x86_64). I do not use Mac, but see if you can configure for x64 or x32 only.

Jim Dempsey

Steve_Lionel
Black Belt Retired Employee
172 Views

"x86_64" is not "blended" - that's a term I often see for x64. It can be useful to indicate that this is the x86 extension to 64 bits and not some other 64-bit architecture (Itanium, for example).

It may be that you have given an incorrect external symbol name in the BIND(C) attribute. You'll need to examine the symbols exported by the library you're linking to and see what's there. Remember that BIND(C) will add any name decoration also used by the "companion C processor". I am skeptical that the external name begins with two underscores.

Reply