[CMake] regarding linking functionality and overloading in cmake
aaron.meadows at thomsonreuters.com
aaron.meadows at thomsonreuters.com
Thu Jun 23 14:09:40 EDT 2011
Unless "ImageFileArrayConst" is a typedef for "double **", there is not
an ImageFile::statistics() function which takes a double** as the first
parameter. (Line 288 and 296 have the two versions of
ImageFile::statistics())
If you look in views.cpp at the function ImageFileView::OnProperties()
function where it is calling the ImageFile::statistics() function, what
is the type of the first parameter? Do you have an extra & on the front
of a double* variable there?
Aaron C. Meadows
From: Leila Baghdadi [mailto:baghdadi at phenogenomics.ca]
Sent: Thursday, June 23, 2011 12:56 PM
To: Meadows, Aaron C.; cmake at cmake.org
Subject: RE: [CMake] regarding linking functionality and overloading in
cmake
Hello
I have attached the CMakeLists.txt file (note, I commented the source in
question line 76) and I get the following error, If I leave line 76 in,
I get a clean build
Linking CXX executable opt_ctsim
CMakeFiles/opt_ctsim.dir/src/views.cpp.o: In function
`ImageFileView::OnProperties(wxCommandEvent&)':
views.cpp:(.text+0x1bfd9): undefined reference to
`ImageFile::statistics(double**, double&, double&, double&, double&,
double&, double&) const'
views.cpp:(.text+0x1c57a): undefined reference to
`ImageFile::statistics(double**, double&, double&, double&, double&,
double&, double&) const'
collect2: ld returned 1 exit status
I am also attaching the source imagefile.cpp located in libctsim
subdirectory.
thanks
________________________________
From: aaron.meadows at thomsonreuters.com
Sent: Thu, 6/23/2011 11:29am
To: Leila Baghdadi <baghdadi at phenogenomics.ca> ; cmake at cmake.org
Subject: RE: [CMake] regarding linking functionality and overloading in
cmake
This sounds like poorly formed c++, not a CMake issue. Can you include
your CMakeLists.txt, a copy of the error, and possibly a simple example
which shows the problem?
Aaron C. Meadows
From: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] On Behalf
Of Leila Baghdadi
Sent: Wednesday, June 22, 2011 3:57 PM
To: cmake at cmake.org
Subject: [CMake] regarding linking functionality and overloading in
cmake
hi everyone,
I have been trying to use cmake to build ctsim(need to add my own code
to it later) and finally managed to do it however I have difficulty
understanding why my puny solution works!
I have 3 different directories (a,b,c) in ctsim , so I set up cmake
files in each one and built liba.so and so on,
now I am trying to build the executable cstim by linking to the above
three libraries and I kept getting an error, regarding an overloading
function in directory a,
I thought that using TARGET_LINK_LIBRARIES(target a b c) would address
that but instead I had to add the source code with the overloading
function from directory a into the list of source codes for the ctsim
executable,
does that make sense?
any thought
thanks
Leila
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110623/9726da6e/attachment.htm>
More information about the CMake
mailing list