<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;">man g++<br>
add_definition is a preprocessor directive not linking flag<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>Alin<br>
-- <br>
 ______________________________________________________________________<br>
 "If the Universities will not study useless subjects, who will?"<br>
                             G. F. FitzGerald, Nature, 45/46, 392 (1892)<br>
 ______________________________________________________________________<br>
 Mr  Alin M ELENA<br>
 Irish Centre for High-End Computing -- www.ichec.ie<br>
 The Design Tower, Trinity Technology &amp; Enterprise Campus<br>
 Grand Canal Quay,  Dublin 2, Ireland<br>
 Tel:   +353 (0) 1 5241608 ext 29<br>
 Fax: +353 (0) 1 7645845<br>
 http://alin.elenaworld.net<br>
 alin.elena@ichec.ie<br>
 alinm.elena@gmail.com<br>
 ______________________________________________________________________<br>
On Tuesday 31 March 2009 17:27:39 you wrote:<br>
&gt; &gt; Should not the flag be passed to the linker? So in this case the<br>
&gt; &gt; linker flags are read from the c++ compiler flags?<br>
&gt;<br>
&gt; I tried adding<br>
&gt;         add_definitions( ${CMAKE_Fortran_FLAGS} )<br>
&gt; But the g++ linker complained about an unrecognized option (the -<br>
&gt; fconvert=big-endian option).<br>
&gt;<br>
&gt; When linking, I pull in the gfortran library,<br>
&gt;         target_link_libraries( readx gfortran )<br>
&gt;<br>
&gt; When creating the fortran object files the appropriate flags are<br>
&gt; passed, but the g++ compiler has no notion of endian-ness...<br>
&gt;<br>
&gt; Any other ideas?<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p></body></html>