[Insight-users] Errors building ITK+Qt Programs

Zein Salah salah at gris.uni-tuebingen.de
Fri Jan 9 15:48:13 EST 2009


Hi everybody
 
My program was working fine using the following configuration:
ITK 2.x (I think 2.8 !)
Qt 2.3 non commercial
CMake 2.0.6
 
Now, I am trying to upgrade to a neuer version of ITK, I tried  ITK 3.2 and ITK 3.10 with CMake 2.4 and CMake 2.6.2.  Qt is the same, i..e. qt 2.3. I had troubles with all configurations. E.g. using ITK 3.2 + CMake 2.4.6 + Qt 2.3, I get the follwing error (the CMakefile of the corresponding subproject is attached):
 

1>------ Build started: Project: qglviewer, Configuration: Debug Win32 ------

1>QT Wrapped File

1>moc: D:/NPRTool/qglviewer/qglviewer_MOC_SRCS: No such file

1>Project : error PRJ0019: A tool returned an error code from "QT Wrapped File"

1>Build log was saved at "file://d:\NPRTool-BIN\qglviewer\qglviewer.dir\Debug\BuildLog.htm"

1>qglviewer - 1 error(s), 0 warning(s)

========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========

 

 

Now, if I modify the QT_WRAP_CPP command in the CMakefile to 

QT_WRAP_CPP(qglviewer  qglviewer_SRCS  ${qglviewer_MOC_SRCS})

 
I get the following error, repeated 10 times:
 

1> C:\Program Files\Microsoft Visual Studio 8\VC\include\exception(83) : error C2732: linkage specification contradicts earlier specification for 'qstrlen' 

1> C:\Program Files\Microsoft Visual Studio 8\VC\include\exception(83) : see declaration of 'qstrlen'

Together with a long list of the following warning:
 

1>c:\qt23\include\qcstring.h(93) : warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

1> C:\Program Files\Microsoft Visual Studio 8\VC\include\string.h(74) : see declaration of 'strcpy'

 

Any idea what my error is? As I mentioned before, the same program  was working with old versions of ITK and CMake. I appreciate any kind of help.

Thanks,

Zein

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090109/b76bdd71/attachment.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CMakeLists.txt
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090109/b76bdd71/attachment.txt>


More information about the Insight-users mailing list