Joachim Geiger wrote:
> Hi,
> I have troubles building the fortran examples on my linux system
> (openSUSE 11.2, x86_64, gcc (SUSE Linux) 4.4.2 [gcc-4_4-branch revision
> 155802])
> for plplot version 5.9.5. Everything works fine with building the examples
> up to the point where x01f should be linked. There I get:
> Linking CXX executable x01f
> cd /home/geiger/build_dir/plplot-5.9.5_gfortran/examples/f77&&
> /usr/bin/cmake -E cmake_link_script CMakeFiles/x01f.dir/link.txt --verbose=1
> /usr/bin/c++      CMakeFiles/x01f.dir/x01f.f.o  -o x01f -rdynamic
> ../../bindings/f77/libplplotf77d.a ../../bindings/f77/libplplotf77cd.a
> ../../src/libplplotd.a -lpangocairo-1.0 -lpango-1.0 -lcairo
> -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lSM -lICE -lX11 -lXext -lSM
> -lICE -lX11 -lXext -lpthread -pthread -lwx_baseu-2.8 -lwx_gtk2u_core-2.8
> ../../lib/csa/libcsirocsa.a ../../lib/qsastime/libqsastime.a -lm
> /usr/lib64/gcc/x86_64-suse-linux/4.4/../../../../lib64/crt1.o: In
> function `_start':
> /usr/src/packages/BUILD/glibc-2.10.1/csu/../sysdeps/x86_64/elf/start.S:109:
> undefined reference to `main'
> CMakeFiles/x01f.dir/x01f.f.o: In function `MAIN__':
> x01f.f:(.text+0x16): undefined reference to `_gfortran_set_options'
> x01f.f:(.text+0x88): undefined reference to `_gfortran_st_write'
> ...
>
> The obvious point I noted is that the linking is done with c++ and not
> with gfortran. Entering the folder CMakefiles/x01f.dir and executing
> the link-command with gfortran instead of c++ gives a nice working
> executable.
> Any idea where things could have went wrong? Or has anyone encountered the
> problem before?
> Best regards,
> Joachim
>
>
>    
Sorry, I need to add something, because I may have misunderstood something.
I started the building with the following line:
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/gfortran_plplot595 
-DBUILD_TEST=ON -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_DYNDRIVERS=OFF 
-DBUILD_SHARED_LIBS=OFF -DENABLE_octave=OFF -DPLD_plmeta=ON 
~/svn_work/programming/plplot/plplot-5.9.5

The main point is that it is done in the external build-directory
prior to installation with setting -DBUILD_TEST=ON.
If I follow the wiki
http://www.miscdebris.net/plplot_wiki/index.php?title=Testing_PLplot
then the compilation and linking works ok (actually both are done with 
one command,
the object file is not built separately).
Best regards,
Joachim

-- 
Joachim Geiger -----------------------------...@\\
Max-Planck-Institute for Plasma Physics,        @\\
   Euratom Association                            \\\
Department Stellaratortheorie (ST)                \\\__
Wendelsteinstr. 1                                (  \\ \
D-17491 Greifswald, Germany                       \_ \\(_
Tel.: ++49 3834/88-2327   Fax: ++49 3834/88-2409    ) \\ \
e-mail: joachim.gei...@ipp.mpg.de                   \  -  |
---------------------------------------------------  \____/


------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Plplot-general mailing list
Plplot-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-general

Reply via email to