[MacPorts] #36548: libmatheval doesn't work with gfortran
#36548: libmatheval doesn't work with gfortran -------------------------------+-------------------------------- Reporter: angelo.graziosi@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Keywords: matheval, fortran | Port: libmatheval -------------------------------+-------------------------------- The attachment contains examples from libmatheval manual... ...and while this works, {{{ gcc evaluator.c $(pkg-config --cflags --libs libmatheval) \ -o evaluator.out gcc evaluator.c -I /opt/local/include -L /opt/local/lib -lmatheval \ -o evaluator.out ./evaluator.out [...] }}} this DOESN'T work, {{{ gfortran evaluator.f -ff90 -ffree-form -L /opt/local/lib -lmatheval -o evaluator.out gfortran: error: unrecognized command line option '-ff90' gfortran evaluator.f90 $(pkg-config --cflags --libs libmatheval) -o evaluator.out Undefined symbols for architecture x86_64: "_evaluator_create_", referenced from: _MAIN__ in cc7JYcDA.o "_evaluator_derivative_x_", referenced from: _MAIN__ in cc7JYcDA.o "_evaluator_destroy_", referenced from: _MAIN__ in cc7JYcDA.o "_evaluator_evaluate_x_", referenced from: _MAIN__ in cc7JYcDA.o ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status gfortran evaluator.f90 -L/opt/local/lib -lmatheval -o evaluator.outUndefined symbols for architecture x86_64: "_evaluator_create_", referenced from: _MAIN__ in cclTxXgn.o "_evaluator_derivative_x_", referenced from: _MAIN__ in cclTxXgn.o "_evaluator_destroy_", referenced from: _MAIN__ in cclTxXgn.o "_evaluator_evaluate_x_", referenced from: _MAIN__ in cclTxXgn.o ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status }}} gfortran comes from Macports gcc47... Ciao, Angelo. -- Ticket URL: <https://trac.macports.org/ticket/36548> MacPorts <http://www.macports.org/> Ports system for Mac OS
#36548: libmatheval doesn't work with gfortran --------------------------------+------------------- Reporter: angelo.graziosi@… | Owner: mww@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: Port: libmatheval | --------------------------------+------------------- Changes (by macsforever2000@…): * cc: mww@… (removed) * keywords: matheval, fortran => * owner: macports-tickets@… => mww@… -- Ticket URL: <https://trac.macports.org/ticket/36548#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#36548: libmatheval doesn't work with gfortran --------------------------------+------------------- Reporter: angelo.graziosi@… | Owner: mww@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: Port: libmatheval | --------------------------------+------------------- Comment (by angelo.graziosi@…): I have just discovered that adding "-fsecond-underscore" works also with gfortran :-), i.e. all the following works {{{ $ gfortran -fsecond-underscore evaluator.f90 $(pkg-config --cflags --libs libmatheval) -o evaluator.out $ gfortran -fsecond-underscore evaluator.f90 -L /opt/local/lib -lmatheval -o evaluator.out $ gfortran -fsecond-underscore evaluator.f -ffree-form -L /opt/local/lib -lmatheval -o evaluator.out }}} Ciao, Angelo. -- Ticket URL: <https://trac.macports.org/ticket/36548#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#36548: libmatheval doesn't work with gfortran --------------------------------+-------------------- Reporter: angelo.graziosi@… | Owner: mww@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: invalid | Keywords: Port: libmatheval | --------------------------------+-------------------- Changes (by jmr@…): * status: new => closed * resolution: => invalid Comment: AIUI, that's just the way it is when mixing fortran code with C libraries. -- Ticket URL: <https://trac.macports.org/ticket/36548#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts