473,795 Members | 2,418 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C++/Fortran mixing

NM
Hi all
I am trying to link C++ and Fortran.I am not very familiar with Fortran.
I have been successful in linking C++ and fortran using g++ and ifc for
simple program. So adding _ to at the end of fortran subroutine names when
calling from C++ is working. Now I want to move to bigger program. I have a
rather big Fortran code which compiles and links fine under ifc. Now I
changed the program main in Fortran into a subroutine main_sub so that I can
call this subroutine main_sub from C++. I am getting error in linking. For
your convenience I am pasting the output of both linking the main program in
ifc and linking the program with g++. Any help will be appreciated regarding
the undefined reference. Thanks

NM

linking the main program in ifc
------------------------------

workstation:~/1D> make
ifc -o a.out ./module/control.o ./module/typed.o ./module/data_structure1 D.o
../module/h_refinements.o ./module/typehp.o ./module/hp_refinements. o
../module/frsolmod.o ./module/interpolation.o ./module/tree.o ./main/main.o
../main/main_sub.o ./main/read_control.o ./constr_util/history.o
../constr_util/history2.o ./constr_util/setcnstr.o ./data/exact.o
../data/getc.o ./data/getd.o ./data/getf.o ./data/get_values.o
../data/write_values.o ./data/get_nreles.o ./data/get_nreles2.o ./data/getg.o
../data/getmat.o ./datstrs/dumpin.o ./datstrs/dumpout.o ./datstrs/faminf.o
../datstrs/faminf2.o ./datstrs/findap.o ./datstrs/findap2.o
../datstrs/nelcon.o ./datstrs/nelcon2.o ./datstrs/nodcor.o
../datstrs/nodcor2.o ./datstrs/result.o ./datstrs/solelm2.o
../datstrs/solelm.o ./elem_util/const.o ./elem_util/shape1.o
../meshgen/allocds.o ./meshgen/deallocds.o ./meshgen/meshgen.o
../solver1/preout.o ./solver1/solin1.o ./solver1/solin2.o ./solver1/solout.o
../mysolver/mysolver.o ./solver1/solve1.o ./laplace/elem.o
../laplace/elem_info.o ./laplace/elem_matrix.o ./laplace/elem_ld.o
../laplace/elem_bc.o ./laplace/elem_error.o ./laplace/elem_error2.o
../laplace/elem_load.o ./laplace/error_contr.o ./laplace/error_contr2.o
../laplace/load_contr.o ./meshmods/break.o ./meshmods/break2.o
../meshmods/break_mdle.o ./meshmods/break_mdle2.o ./meshmods/cluster_mdle.o
../meshmods/cluster_mdle2.o ./meshmods/nodmod2.o ./meshmods/nodmod.o
../graph_1D/display_error.o ./graph_1D/graph.o ./graph_1D/graph1D.o
../graph_1D/graph1D_zoom.o ./graph_1D/rates.o ./graph_util/arctan.o
../graph_util/clip_line.o ./graph_util/clip_poly.o ./graph_util/colorset.o
../graph_util/dpbox.o ./graph_util/draw_line.o ./graph_util/finstr.o
../graph_util/initwin.o ./graph_util/mat3prod.o ./graph_util/selwin.o
../graph_interf/closwind.o ./graph_interf/clrwind.o ./graph_interf/drawline.o
../graph_interf/fillpoly.o ./graph_interf/flushx.o ./graph_interf/initcm.o
../graph_interf/openwind.o ./graph_interf/selwind.o ./graph_interf/setpost.o
../graph_interf/symbol.o ./graph_interf/wverr.o ./graph_interf/wvwarn.o
../graph_interf/inout.o ./graph_interf/psgr.o ./graph_interf/xglibf.o
../utilities/findmax.o ./utilities/locate.o ./utilities/opfil.o
../utilities/pause.o ./blas/blas.o ./blas/gausse.o ./blas/rhsub.o
../blas/tri.o ./blas/zrhsub.o ./frontsol/bckwrd.o ./frontsol/complt.o
../frontsol/dest.o ./frontsol/desvec.o ./frontsol/elmrhs.o
../frontsol/elmsol.o ./frontsol/frwcp.o ./frontsol/frwrs.o ./frontsol/locls.o
../frontsol/loclu.o ./frontsol/locr.o ./frontsol/resol.o ./frontsol/semrhs.o
../frontsol/surfsp.o ./frontsol/surfss.o ./frontsol/symasm.o
../frontsol/symelm.o ./frontsol/unsasm.o ./frontsol/unselm.o
../frontsol/zdirio.o ./frontsol/zecond.o ./frontsol/zeror.o
../frontsol/zeros.o ./frontsol/zerou.o ./adapt_hp/compute_error.o
../adapt_hp/print_nodes.o ./adapt_hp/get_values_1_co mpute_error.o
../adapt_hp/get_values_2_co mpute_error.o
../adapt_hp/write_values_co mpute_error.o
../adapt_hp/get_values_1_gl obal_hpref.o
../adapt_hp/get_values_2_gl obal_hpref.o
../adapt_hp/write_values_gl obal_hpref.o ./adapt_hp/get_values_1_hp _elements.o
../adapt_hp/get_values_2_hp _elements.o ./adapt_hp/write_values_hp _elements.o
../adapt_hp/element1D_error .o ./adapt_hp/element_ext.o
../adapt_hp/global_hpref.o ./adapt_hp/hp_elements.o ./adapt_hp/hp_strategy.o
../adapt_hp/increase_order. o ./adapt_hp/optimize.o ./adapt_hp/precompute.o
../adapt_hp/project_element .o ./adapt_h/compute_herror. o
../adapt_h/h_strategy.o -L/usr/X11R6/lib -lX11 -lIEPCF90

No error and a.out is generated.
linking using ifc and g++
------------------------

workstation:~/temp/t/test_1d_fortran/psl_fortran.mpi > make
g++ -DMPI -g -I/u/user1/code2/lib/runtime/unified -I/u/user1/mpi-1.2.5/inc
lude -c c2_main.cpp
g++ -DMPI -g -I/u/user1/code2/lib/runtime/unified -I/u/user1/mpi-1.2.5/inc
lude -c main.cpp
mpiCC c2_main.o main.o /u/user1/ICES/1D/module/control.o
/u/user1/ICES/1D/module/typed.o /u/user1/ICES/1D/module/data_structure1 D.o
/u/user1/ICES/1D/module/h_refinements.o /u/user1/ICES/1D/module/typehp.o
/u/user1/ICES/1D/module/hp_refinements. o /u/user1/ICES/1D/module/frsolmod.o
/u/user1/ICES/1D/module/interpolation.o /u/user1/ICES/1D/module/tree.o
/u/user1/ICES/1D/main/main_sub.o /u/user1/ICES/1D/main/read_control.o
/u/user1/ICES/1D/constr_util/history.o
/u/user1/ICES/1D/constr_util/history2.o
/u/user1/ICES/1D/constr_util/setcnstr.o /u/user1/ICES/1D/data/exact.o
/u/user1/ICES/1D/data/getc.o /u/user1/ICES/1D/data/getd.o
/u/user1/ICES/1D/data/getf.o /u/user1/ICES/1D/data/get_values.o
/u/user1/ICES/1D/data/write_values.o /u/user1/ICES/1D/data/get_nreles.o
/u/user1/ICES/1D/data/get_nreles2.o /u/user1/ICES/1D/data/getg.o
/u/user1/ICES/1D/data/getmat.o /u/user1/ICES/1D/datstrs/dumpin.o
/u/user1/ICES/1D/datstrs/dumpout.o /u/user1/ICES/1D/datstrs/faminf.o
/u/user1/ICES/1D/datstrs/faminf2.o /u/user1/ICES/1D/datstrs/findap.o
/u/user1/ICES/1D/datstrs/findap2.o /u/user1/ICES/1D/datstrs/nelcon.o
/u/user1/ICES/1D/datstrs/nelcon2.o /u/user1/ICES/1D/datstrs/nodcor.o
/u/user1/ICES/1D/datstrs/nodcor2.o /u/user1/ICES/1D/datstrs/result.o
/u/user1/ICES/1D/datstrs/solelm2.o /u/user1/ICES/1D/datstrs/solelm.o
/u/user1/ICES/1D/elem_util/const.o /u/user1/ICES/1D/elem_util/shape1.o
/u/user1/ICES/1D/meshgen/allocds.o /u/user1/ICES/1D/meshgen/deallocds.o
/u/user1/ICES/1D/meshgen/meshgen.o /u/user1/ICES/1D/solver1/preout.o
/u/user1/ICES/1D/solver1/solin1.o /u/user1/ICES/1D/solver1/solin2.o
/u/user1/ICES/1D/solver1/solout.o /u/user1/ICES/1D/mysolver/mysolver.o
/u/user1/ICES/1D/solver1/solve1.o /u/user1/ICES/1D/laplace/elem.o
/u/user1/ICES/1D/laplace/elem_info.o /u/user1/ICES/1D/laplace/elem_matrix.o
/u/user1/ICES/1D/laplace/elem_ld.o /u/user1/ICES/1D/laplace/elem_bc.o
/u/user1/ICES/1D/laplace/elem_error.o /u/user1/ICES/1D/laplace/elem_error2.o
/u/user1/ICES/1D/laplace/elem_load.o /u/user1/ICES/1D/laplace/error_contr.o
/u/user1/ICES/1D/laplace/error_contr2.o
/u/user1/ICES/1D/laplace/load_contr.o /u/user1/ICES/1D/meshmods/break.o
/u/user1/ICES/1D/meshmods/break2.o /u/user1/ICES/1D/meshmods/break_mdle.o
/u/user1/ICES/1D/meshmods/break_mdle2.o
/u/user1/ICES/1D/meshmods/cluster_mdle.o
/u/user1/ICES/1D/meshmods/cluster_mdle2.o
/u/user1/ICES/1D/meshmods/nodmod2.o /u/user1/ICES/1D/meshmods/nodmod.o
/u/user1/ICES/1D/graph_1D/display_error.o /u/user1/ICES/1D/graph_1D/graph.o
/u/user1/ICES/1D/graph_1D/graph1D.o /u/user1/ICES/1D/graph_1D/graph1D_zoom.o
/u/user1/ICES/1D/graph_1D/rates.o /u/user1/ICES/1D/graph_util/arctan.o
/u/user1/ICES/1D/graph_util/clip_line.o
/u/user1/ICES/1D/graph_util/clip_poly.o
/u/user1/ICES/1D/graph_util/colorset.o /u/user1/ICES/1D/graph_util/dpbox.o
/u/user1/ICES/1D/graph_util/draw_line.o /u/user1/ICES/1D/graph_util/finstr.o
/u/user1/ICES/1D/graph_util/initwin.o /u/user1/ICES/1D/graph_util/mat3prod.o
/u/user1/ICES/1D/graph_util/selwin.o
/u/user1/ICES/1D/graph_interf/closwind.o
/u/user1/ICES/1D/graph_interf/clrwind.o
/u/user1/ICES/1D/graph_interf/drawline.o
/u/user1/ICES/1D/graph_interf/fillpoly.o
/u/user1/ICES/1D/graph_interf/flushx.o
/u/user1/ICES/1D/graph_interf/initcm.o
/u/user1/ICES/1D/graph_interf/openwind.o
/u/user1/ICES/1D/graph_interf/selwind.o
/u/user1/ICES/1D/graph_interf/setpost.o
/u/user1/ICES/1D/graph_interf/symbol.o /u/user1/ICES/1D/graph_interf/wverr.o
/u/user1/ICES/1D/graph_interf/wvwarn.o /u/user1/ICES/1D/graph_interf/inout.o
/u/user1/ICES/1D/graph_interf/psgr.o /u/user1/ICES/1D/graph_interf/xglibf.o
/u/user1/ICES/1D/utilities/findmax.o /u/user1/ICES/1D/utilities/locate.o
/u/user1/ICES/1D/utilities/opfil.o /u/user1/ICES/1D/utilities/pause.o
/u/user1/ICES/1D/blas/blas.o /u/user1/ICES/1D/blas/gausse.o
/u/user1/ICES/1D/blas/rhsub.o /u/user1/ICES/1D/blas/tri.o
/u/user1/ICES/1D/blas/zrhsub.o /u/user1/ICES/1D/frontsol/bckwrd.o
/u/user1/ICES/1D/frontsol/complt.o /u/user1/ICES/1D/frontsol/dest.o
/u/user1/ICES/1D/frontsol/desvec.o /u/user1/ICES/1D/frontsol/elmrhs.o
/u/user1/ICES/1D/frontsol/elmsol.o /u/user1/ICES/1D/frontsol/frwcp.o
/u/user1/ICES/1D/frontsol/frwrs.o /u/user1/ICES/1D/frontsol/locls.o
/u/user1/ICES/1D/frontsol/loclu.o /u/user1/ICES/1D/frontsol/locr.o
/u/user1/ICES/1D/frontsol/resol.o /u/user1/ICES/1D/frontsol/semrhs.o
/u/user1/ICES/1D/frontsol/surfsp.o /u/user1/ICES/1D/frontsol/surfss.o
/u/user1/ICES/1D/frontsol/symasm.o /u/user1/ICES/1D/frontsol/symelm.o
/u/user1/ICES/1D/frontsol/unsasm.o /u/user1/ICES/1D/frontsol/unselm.o
/u/user1/ICES/1D/frontsol/zdirio.o /u/user1/ICES/1D/frontsol/zecond.o
/u/user1/ICES/1D/frontsol/zeror.o /u/user1/ICES/1D/frontsol/zeros.o
/u/user1/ICES/1D/frontsol/zerou.o /u/user1/ICES/1D/adapt_hp/compute_error.o
/u/user1/ICES/1D/adapt_hp/print_nodes.o
/u/user1/ICES/1D/adapt_hp/get_values_1_co mpute_error.o
/u/user1/ICES/1D/adapt_hp/get_values_2_co mpute_error.o
/u/user1/ICES/1D/adapt_hp/write_values_co mpute_error.o
/u/user1/ICES/1D/adapt_hp/get_values_1_gl obal_hpref.o
/u/user1/ICES/1D/adapt_hp/get_values_2_gl obal_hpref.o
/u/user1/ICES/1D/adapt_hp/write_values_gl obal_hpref.o
/u/user1/ICES/1D/adapt_hp/get_values_1_hp _elements.o
/u/user1/ICES/1D/adapt_hp/get_values_2_hp _elements.o
/u/user1/ICES/1D/adapt_hp/write_values_hp _elements.o
/u/user1/ICES/1D/adapt_hp/element1D_error .o
/u/user1/ICES/1D/adapt_hp/element_ext.o
/u/user1/ICES/1D/adapt_hp/global_hpref.o
/u/user1/ICES/1D/adapt_hp/hp_elements.o
/u/user1/ICES/1D/adapt_hp/hp_strategy.o
/u/user1/ICES/1D/adapt_hp/increase_order. o
/u/user1/ICES/1D/adapt_hp/optimize.o /u/user1/ICES/1D/adapt_hp/precompute.o
/u/user1/ICES/1D/adapt_hp/project_element .o
/u/user1/ICES/1D/adapt_h/compute_herror. o
/u/user1/ICES/1D/adapt_h/h_strategy.o -L/u/user1/code2/lib -L/usr/X11R6/lib
-lX11 -L/lusr/share/software/intel/compiler70/ia32/lib -lIEPCF90 -lcode_uni
fied -o psl_fortran -lm -lpthread
/u/user1/ICES/1D/graph_1D/rates.o: In function `rates':
graph_1D/rates.f:118: undefined reference to `f_powdd'
graph_1D/rates.f:118: undefined reference to `f_powdd'
graph_1D/rates.f:155: undefined reference to `f_powdd'
graph_1D/rates.f:157: undefined reference to `f_powdd'
graph_1D/rates.f:157: undefined reference to `f_powdd'
/u/user1/ICES/1D/graph_1D/rates.o:graph_1 D/rates.f:157: more undefined
references to `f_powdd' follow
/u/user1/ICES/1D/frontsol/dest.o: In function `dest':
frontsol/dest.f:126: undefined reference to `f_ldnint_val'
frontsol/dest.f:179: undefined reference to `f_ldnint_val'
frontsol/dest.f:180: undefined reference to `f_ldnint_val'
frontsol/dest.f:181: undefined reference to `f_ldnint_val'
/u/user1/ICES/1D/frontsol/symelm.o: In function `symelm':
frontsol/symelm.f:56: undefined reference to `f_ldnint_val'
/lusr/share/software/intel/compiler70/ia32/lib/libIEPCF90.so.3 : undefined
reference to `a_qtoi'
/lusr/share/software/intel/compiler70/ia32/lib/libIEPCF90.so.3 : undefined
reference to `a_eqq'
/lusr/share/software/intel/compiler70/ia32/lib/libIEPCF90.so.3 : undefined
reference to `a_geq'
/lusr/share/software/intel/compiler70/ia32/lib/libIEPCF90.so.3 : undefined
reference to `a_divq'
/lusr/share/software/intel/compiler70/ia32/lib/libIEPCF90.so.3 : undefined
reference to `a_addq'
/lusr/share/software/intel/compiler70/ia32/lib/libIEPCF90.so.3 : undefined
reference to `a_dtoq'
/lusr/share/software/intel/compiler70/ia32/lib/libIEPCF90.so.3 : undefined
reference to `a_ftoq'
/lusr/share/software/intel/compiler70/ia32/lib/libIEPCF90.so.3 : undefined
reference to `a_mulq'
/lusr/share/software/intel/compiler70/ia32/lib/libIEPCF90.so.3 : undefined
reference to `a_subq'
/lusr/share/software/intel/compiler70/ia32/lib/libIEPCF90.so.3 : undefined
reference to `a_neq'
/lusr/share/software/intel/compiler70/ia32/lib/libIEPCF90.so.3 : undefined
reference to `a_ltq'
/lusr/share/software/intel/compiler70/ia32/lib/libIEPCF90.so.3 : undefined
reference to `a_leq'
/lusr/share/software/intel/compiler70/ia32/lib/libIEPCF90.so.3 : undefined
reference to `a_itoq'
/lusr/share/software/intel/compiler70/ia32/lib/libIEPCF90.so.3 : undefined
reference to `a_floorq'
collect2: ld returned 1 exit status
make: *** [psl_fortran] Error 1
workstation:~/temp/t/test_1d_fortran/psl_fortran.mpi >
Jul 22 '05 #1
5 4026
NM
I forgot to post lines from rates.f and dest.f
rates.f:118 dx = x_max**alpha - x_min**alpha
dest.f:126 l = iabs(nint(Amdes t(km-1)))

Jul 22 '05 #2
NM wrote:

I am trying to link C++ and Fortran.I am not very familiar with Fortran.
I have been successful in linking C++ and fortran using g++ and ifc for
simple program. So adding _ to at the end of fortran subroutine names when
calling from C++ is working. Now I want to move to bigger program. I have a
rather big Fortran code which compiles and links fine under ifc. Now I
changed the program main in Fortran into a subroutine main_sub so that I can
call this subroutine main_sub from C++. I am getting error in linking. For
your convenience I am pasting the output of both linking the main program in
ifc and linking the program with g++. Any help will be appreciated regarding
the undefined reference.


[snip]

Everything looks OK
except that the link editor ld can't resolve some references.
Most likely this is because you have neglected to include
a [Fortran] library which defines these references.
Your Fortran compiler ifc knows which libraries are required
but your C++ compiler mpiCC does not.

cd to a directory containing your Fortran libraries

/lusr/share/software/intel/compiler70/ia32/lib/

for example and type

nm -o *.a *.so *.so.3 | grep a_floorq

You should get a list of references to a_floorq.
The ones labeled U are undefined but those labeled T are defined.
Just include the corresponding library along with

-lIEPCF90 -lcode_unified

in your Makefile.

Jul 22 '05 #3
NM
Thanks. It is working :-)

"E. Robert Tisdale" <E.************ **@jpl.nasa.gov > wrote in message
news:40******** ******@jpl.nasa .gov...
NM wrote:

I am trying to link C++ and Fortran.I am not very familiar with Fortran.
I have been successful in linking C++ and fortran using g++ and ifc for
simple program. So adding _ to at the end of fortran subroutine names when calling from C++ is working. Now I want to move to bigger program. I have a rather big Fortran code which compiles and links fine under ifc. Now I
changed the program main in Fortran into a subroutine main_sub so that I can call this subroutine main_sub from C++. I am getting error in linking. For your convenience I am pasting the output of both linking the main program in ifc and linking the program with g++. Any help will be appreciated regarding the undefined reference.


[snip]

Everything looks OK
except that the link editor ld can't resolve some references.
Most likely this is because you have neglected to include
a [Fortran] library which defines these references.
Your Fortran compiler ifc knows which libraries are required
but your C++ compiler mpiCC does not.

cd to a directory containing your Fortran libraries

/lusr/share/software/intel/compiler70/ia32/lib/

for example and type

nm -o *.a *.so *.so.3 | grep a_floorq

You should get a list of references to a_floorq.
The ones labeled U are undefined but those labeled T are defined.
Just include the corresponding library along with

-lIEPCF90 -lcode_unified

in your Makefile.

Jul 22 '05 #4
On Thu, 26 Feb 2004 15:30:43 -0600, "NM" <nm@nm.com> wrote in
comp.lang.c++:
Hi all
I am trying to link C++ and Fortran.I am not very familiar with Fortran.
I have been successful in linking C++ and fortran using g++ and ifc for
simple program. So adding _ to at the end of fortran subroutine names when
calling from C++ is working. Now I want to move to bigger program. I have a
rather big Fortran code which compiles and links fine under ifc. Now I
changed the program main in Fortran into a subroutine main_sub so that I can
call this subroutine main_sub from C++. I am getting error in linking. For
your convenience I am pasting the output of both linking the main program in
ifc and linking the program with g++. Any help will be appreciated regarding
the undefined reference. Thanks

NM


I can't speak for the group comp.lang.fortr an, but your question is
off-topic here in comp.lang.c++. The C++ language does not define an
interface to Fortran, or indeed any other language except C in some
circumstances, and all such mechanisms are completely
compiler-specific and beyond the pale here.

If you need advice on the C++ side of things, you need to ask in a
compiler-specific support group.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.l earn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Jul 22 '05 #5


Jack Klein wrote:
On Thu, 26 Feb 2004 15:30:43 -0600, "NM" <nm@nm.com> wrote in
comp.lang.c++:
Hi all
I am trying to link C++ and Fortran.I am not very familiar with Fortran.
I have been successful in linking C++ and fortran using g++ and ifc for
simple program. So adding _ to at the end of fortran subroutine names when
calling from C++ is working. Now I want to move to bigger program. I have a
rather big Fortran code which compiles and links fine under ifc. Now I
changed the program main in Fortran into a subroutine main_sub so that I can
call this subroutine main_sub from C++. I am getting error in linking. For
your convenience I am pasting the output of both linking the main program in
ifc and linking the program with g++. Any help will be appreciated regarding
the undefined reference. Thanks

NM


I can't speak for the group comp.lang.fortr an, but your question is
off-topic here in comp.lang.c++. The C++ language does not define an
interface to Fortran, or indeed any other language except C in some
circumstances, and all such mechanisms are completely
compiler-specific and beyond the pale here.
<snip>


FWIW - Two points

1. The only current standard conforming way to do this is via Ada. Ada 95(?)
defines conventions to "link" with Fortran 77 and C89, so you can, in principle
do this if you
a. have an Ada compiler available (GNAT is widely portable and free)
b. learn enough Ada to deal with the details of this issue.
c. Learn the C++ C linkage conventions
c. Have C++ and Fortran compilers compatible with the Ada compiler, e.g., g77 and
the g++ compiler are compatible with gnat. Be aware that many Fortran codes use
extensions of F77. g77 incorporates the omnipresent MIL-STD extensions, but few
others. G95 is a work in progress.

2. There will "soon" be a n Ada independent standard conforming means of doing
this, as Fortran 2003 defines C linkage conventions, is near the end of its
second review, and is not expectted to require a third review. Although this is
one of the largest additions by F03 to F95, it is also perhaps the most requested
feature, so the most recent version of "many" (anyway more than 3) F95 compilers
already incorporate versions of these conventions (based on earlier drafts) as an
extension.

--

-------------------------------------------------------------
William B. Clodius Space & Remote Sensing Sciences
Tech. Staff Member, ISR-2 Phone: (505) 665-9370
Mail Stop B244 FAX: (505) 665-4414
Los Alamos National Lab. Group office: (505) 667-5776
Fed Ex add: Bikini Atoll Rd. Email: remove gibberish
Los Alamos, NM 87545
-------------------------------------------------------------
Jul 22 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

44
3425
by: Carl | last post by:
"Nine Language Performance Round-up: Benchmarking Math & File I/O" http://www.osnews.com/story.php?news_id=5602 I think this is an unfair comparison! I wouldn't dream of developing a numerical application in Python without using prebuilt numerical libraries and data objects such as dictionaries and lists. I have been experimenting with numerical algorithms in Python with a heavy use of the Numeric module. My experience is that Python...
15
2104
by: Nick Coghlan | last post by:
Thought some folks here might find this one interesting. No great revelations, just a fairly sensible piece on writing readable code :) The whole article: http://www.acmqueue.com/modules.php?name=Content&pa=showpage&pid=271&page=1 The section specifically on white space: http://www.acmqueue.com/modules.php?name=Content&pa=showpage&pid=271&page=3 Cheers,
4
2860
by: NM | last post by:
Hello All I am writing some progam that involves both C++ and Fortran. Some of the existing code is in Fortran. The main program will be in C++ and it will call some Fortran subroutine. All the memory allocation has to be done in C++. For arrays of structures and arrays (including multi-dimensional array) of primitive data types declared in Fortran, I know the corresponding data structures in C++. So I can declare those data structures...
6
3529
by: Adrian | last post by:
I am trying to pass the address of a C++ function into a Fortran routine to enable the Fortran routine to call this C++ function. I have to do it this way as our build process does not allow circular dependencies of DLL's. Does anyone know how to do this, I have tried everything in my book. I have a C++ function GetP: DllExport void GetP()
1
6436
by: Sam | last post by:
Hello all I have a two dimensional array (the dimensions are not known) that needs to be passed to fortran from c++, allocate the dimensions of the array in fortran code, do some filling up of the array in fortran and then accessing it in my c++ code. Say in my c++ code I have; extern "C" { void foo_(float **, int &, int &); }
2
3325
by: NM | last post by:
Hello all, I am supposed to do some mixed programming with c++ and fortran. I was succeeful in exchanging the 2D arrays from fortran to c++ and the other way, but was unable to that same with the 3D arrays, the values passed are not all the same. I am also pasting the fortran and c++ codes so that you could have a look at them. ////C++ Code
81
7358
by: Matt | last post by:
I have 2 questions: 1. strlen returns an unsigned (size_t) quantity. Why is an unsigned value more approprate than a signed value? Why is unsighned value less appropriate? 2. Would there be any advantage in having strcat and strcpy return a pointer to the "end" of the destination string rather than returning a
10
2693
by: Julian | last post by:
I get the following error when i try to link a fortran library to a c++ code in .NET 2005. LINK : fatal error LNK1104: cannot open file 'libc.lib' the code was working fine when built using .NET2003. also, when I do not try to link the fortran library (just to see if that was the cause), it builds the exe without any problems. i don't even know how to begin addressing this problem...any help would be
2
4438
by: luis | last post by:
I'm using ctypes to call a fortran dll from python. I have no problems passing integer and double arryas, but I have an error with str arrys. For example: ..... StringVector = c_char_p * len(id) # id is a list of strings Id_dat=StringVector() for i in range(len(Id)): ....Id_dat=id
0
9672
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9519
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10438
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10214
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10001
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3727
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.