yep that's how its defined. (note, this is not my code, it is backprojection 
code free for download at ctsim.org)

typedef double kfloat64;
typedef kfloat64** const ImageFileArrayConst;

the code has diversions between 32 and 64 bit, anyways, that's how it is 
defined.

Leila

From: aaron.mead...@thomsonreuters.com
Sent: Thu, 6/23/2011 2:09pm
To: Leila Baghdadi <baghd...@phenogenomics.ca> ; cmake@cmake.org
Subject: RE: [CMake] regarding linking functionality and overloading in cmake

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:baghd...@phenogenomics.ca] 
Sent: Thursday, June 23, 2011 12:56 PM
To: Meadows, Aaron C.; cmake@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.mead...@thomsonreuters.com
Sent: Thu, 6/23/2011 11:29am
To: Leila Baghdadi <baghd...@phenogenomics.ca> ; cmake@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-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of 
Leila Baghdadi
Sent: Wednesday, June 22, 2011 3:57 PM
To: cmake@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
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to