Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

popen close on MacOs

tkibedi
Novice
1,035 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
Honored Contributor III
1,025 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

0 Kudos
Steve_Lionel
Honored Contributor III
1,014 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.

0 Kudos
Reply