On 29/11/2014 12:02, Bill Somerville wrote:
On 29/11/2014 11:58, Bill Somerville wrote:
Hi,
I have just tried 3.1.0-rc2 and my executable links are failing
because all the link libraries are not being added.
I use:
add_executable (jt65code lib/jt65code.f90 wsjtx.rc)
target_link_libraries (jt65code wsjt)
where wsjt is a static library target with Fortran and C functions.
This normally gives a link edit step of:
C:\Tools\Qt\Tools\mingw48_32\bin\g++.exe -Wall -Wextra -std=c++11
-fexceptions -frtti -pthread -g -Wl,--whole-archive
CMakeFiles\jt65code.dir/objects.a -Wl,--no-whole-archive -o
jt65code.exe -Wl,--out-implib,libjt65code.dll.a
-Wl,--major-image-version,0,--minor-image-version,0 libwsjt.a
-lgfortran -lquadmath -lm -lkernel32 -luser32 -lgdi32 -lwinspool
-lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
but in 3.1.0-rc2 I get:
C:\Tools\Qt\Tools\mingw48_32\bin\ar.exe cr
CMakeFiles\jt65code.dir/objects.a @CMakeFiles\jt65code.dir\objects1.rsp
C:\Tools\Qt\Tools\mingw48_32\bin\g++.exe -Wall -Wextra -std=c++11
-fexceptions -frtti -pthread -g -Wl,--whole-archive
CMakeFiles\jt65code.dir/objects.a -Wl,--no-whole-archive -o
jt65code.exe -Wl,--out-implib,libjt65code.dll.a
-Wl,--major-image-version,0,--minor-image-version,0
@CMakeFiles\jt65code.dir\linklibs.rsp
So it looks like the linklibs.rsp response file doesn't have the
required entries.
Looking at the build tree I find a linklibs.rsp in the top level
directory (CMakeFIles/jt65code.dir) with the correct entries but the
link edit command is passing a file in the subordinate 'lib'
directory that doesn't exist. Something wrong with the use of a
source in a subdirectory perhaps?
Sorry, I am talking rubbish here!
So something is wrong with the response file itself, here it is:
libwsjt.a -lquadmath -lm -lkernel32 -luser32 -lgdi32 -lwinspool
-lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32
and the problem is in fact that -lgfortran is missing!
No ideas?
Is mixed language support in v3.1 no longer supporting Fortran?
Should I be asking somewhere else?
Regards
Bill Somerville.
Regards
Bill Somerville.
Regards
Bill Somerville.
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake