Installing dcmtk-3.6.0

Compilation and installation of DCMTK

Moderator: Moderator Team

Message
Author
kb
Posts: 15
Joined: Wed, 2011-02-23, 05:04
Location: chandigarh

#16 Post by kb »

Yes this may be the reason.


Thanks for your support

ahirnish
Posts: 38
Joined: Wed, 2012-01-04, 10:18

How can I compile any subproject in verbose mode in VS 10?

#17 Post by ahirnish »

I'm getting same kind of errors while compiling the subproject. I tried all of the steps described here in this thead but I am unable to see the output in verbose mode. Its still showing me only errors and warnings. Do I have to compile it from the command line to see the list of the libraries being linked or will it show it in the IDE? Also how can I change the path of the std win libraries being discussed here?

ahirnish
Posts: 38
Joined: Wed, 2012-01-04, 10:18

#18 Post by ahirnish »

Instead of changing the paths of the libraries, I copied them to C:/Microsoft Visual Studio 10/VC/lib but there is still no improvement.
After compiling, I am getting errors which are almost of same type :
error C2894 : Templates cannot be declared to have C linkage
in the iosfwd, limits and xstddef file of dcm2pdf subproject. Google, upon searching says that this error occurs when we declare extern "C"before the template declaration, which is not the case in the above said files. How can I remove them in order to compile DCMTK

PFA the list of errors

Code: Select all


Error	1	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xstddef	78	1	dcm2pdf
Error	2	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xstddef	87	1	dcm2pdf
Error	3	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xstddef	132	1	dcm2pdf
Error	4	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xstddef	141	1	dcm2pdf
Error	5	error C2526: 'std::_Exception_ptr::_Current_exception' : C linkage function cannot return C++ class 'std::_Exception_ptr'	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\exception	449	1	dcm2pdf
Error	6	error C2526: 'std::_Exception_ptr::_Copy_exception' : C linkage function cannot return C++ class 'std::_Exception_ptr'	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\exception	455	1	dcm2pdf
Error	7	error C2562: 'std::_Exception_ptr::_Current_exception' : 'void' function returning a value	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\exception	452	1	dcm2pdf
Error	8	error C2562: 'std::_Exception_ptr::_Copy_exception' : 'void' function returning a value	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\exception	460	1	dcm2pdf
Error	9	error C2562: 'std::_Exception_ptr::_Copy_exception' : 'void' function returning a value	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\exception	463	1	dcm2pdf
Error	10	error C2733: second C linkage of overloaded function 'std::operator ==' not allowed	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\exception	476	1	dcm2pdf
Error	11	error C2733: second C linkage of overloaded function 'std::operator ==' not allowed	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\exception	482	1	dcm2pdf
Warning	12	warning C4190: 'current_exception' has C-linkage specified, but returns UDT 'std::_Exception_ptr' which is incompatible with C	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\exception	489	1	dcm2pdf
Error	13	error C2352: 'std::_Exception_ptr::_Current_exception' : illegal call of non-static member function	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\exception	490	1	dcm2pdf
Error	14	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\exception	498	1	dcm2pdf
Error	15	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\exception	500	1	dcm2pdf
Warning	16	warning C4190: 'copy_exception' has C-linkage specified, but returns UDT 'std::_Exception_ptr' which is incompatible with C	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\exception	503	1	dcm2pdf
Error	17	error C2732: linkage specification contradicts earlier specification for 'operator delete'	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\new	49	1	dcm2pdf
Error	18	error C2732: linkage specification contradicts earlier specification for 'operator new'	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\new	51	1	dcm2pdf
Error	19	error C2733: second C linkage of overloaded function 'operator delete[]' not allowed	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\new	77	1	dcm2pdf
Error	20	error C2733: second C linkage of overloaded function 'operator new[]' not allowed	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\new	80	1	dcm2pdf
Error	21	error C2733: second C linkage of overloaded function 'operator new' not allowed	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\new	85	1	dcm2pdf
Error	22	error C2733: second C linkage of overloaded function 'operator new[]' not allowed	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\new	88	1	dcm2pdf
Error	23	error C2733: second C linkage of overloaded function 'operator delete' not allowed	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\new	91	1	dcm2pdf
Error	24	error C2733: second C linkage of overloaded function 'operator delete[]' not allowed	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\new	94	1	dcm2pdf
Error	25	error C2732: linkage specification contradicts earlier specification for 'operator new[]'	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\crtdbg.h	1078	1	dcm2pdf
Error	26	error C2732: linkage specification contradicts earlier specification for 'operator delete[]'	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\crtdbg.h	1095	1	dcm2pdf
Error	27	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\iosfwd	32	1	dcm2pdf
Error	28	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\iosfwd	120	1	dcm2pdf
Error	29	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\iosfwd	133	1	dcm2pdf
Error	30	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\iosfwd	256	1	dcm2pdf
Error	31	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\iosfwd	279	1	dcm2pdf
Error	32	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\iosfwd	375	1	dcm2pdf
Error	33	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\iosfwd	474	1	dcm2pdf
Error	34	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\iosfwd	568	1	dcm2pdf
Error	35	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\iosfwd	571	1	dcm2pdf
Error	36	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\iosfwd	574	1	dcm2pdf
Error	37	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\iosfwd	577	1	dcm2pdf
Error	38	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\iosfwd	580	1	dcm2pdf
Error	39	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\iosfwd	583	1	dcm2pdf
Error	40	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\iosfwd	586	1	dcm2pdf
Error	41	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\iosfwd	589	1	dcm2pdf
Error	42	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\iosfwd	592	1	dcm2pdf
Error	43	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\iosfwd	596	1	dcm2pdf
Error	44	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\iosfwd	600	1	dcm2pdf
Error	45	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\iosfwd	604	1	dcm2pdf
Error	46	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\iosfwd	608	1	dcm2pdf
Error	47	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\iosfwd	611	1	dcm2pdf
Error	48	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\iosfwd	614	1	dcm2pdf
Error	49	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\iosfwd	617	1	dcm2pdf
Error	50	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\limits	80	1	dcm2pdf
Error	51	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\limits	133	1	dcm2pdf
Error	52	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\limits	139	1	dcm2pdf
Error	53	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\limits	145	1	dcm2pdf
Error	54	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\limits	186	1	dcm2pdf
Error	55	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\limits	251	1	dcm2pdf
Error	56	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\limits	317	1	dcm2pdf
Error	57	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\limits	381	1	dcm2pdf
Error	58	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\limits	444	1	dcm2pdf
Error	59	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\limits	507	1	dcm2pdf
Error	60	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\limits	573	1	dcm2pdf
Error	61	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\limits	701	1	dcm2pdf
Error	62	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\limits	766	1	dcm2pdf
Error	63	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\limits	831	1	dcm2pdf
Error	64	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\limits	896	1	dcm2pdf
Error	65	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\limits	1024	1	dcm2pdf
Error	66	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\limits	1089	1	dcm2pdf
Error	67	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\limits	1155	1	dcm2pdf
Error	68	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\limits	1222	1	dcm2pdf
Error	69	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\limits	1289	1	dcm2pdf
Error	70	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	153	1	dcm2pdf
Error	71	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	158	1	dcm2pdf
Error	72	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	171	1	dcm2pdf
Error	73	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	185	1	dcm2pdf
Error	74	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	188	1	dcm2pdf
Error	75	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	194	1	dcm2pdf
Error	76	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	200	1	dcm2pdf
Error	77	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	206	1	dcm2pdf
Error	78	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	213	1	dcm2pdf
Error	79	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	215	1	dcm2pdf
Error	80	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	221	1	dcm2pdf
Error	81	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	228	1	dcm2pdf
Error	82	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	234	1	dcm2pdf
Error	83	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	240	1	dcm2pdf
Error	84	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	246	1	dcm2pdf
Error	85	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	252	1	dcm2pdf
Error	86	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	259	1	dcm2pdf
Error	87	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	266	1	dcm2pdf
Error	88	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	272	1	dcm2pdf
Error	89	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	278	1	dcm2pdf
Error	90	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	284	1	dcm2pdf
Error	91	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	290	1	dcm2pdf
Error	92	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	296	1	dcm2pdf
Error	93	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	303	1	dcm2pdf
Error	94	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	309	1	dcm2pdf
Error	95	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	317	1	dcm2pdf
Error	96	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	323	1	dcm2pdf
Error	97	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	329	1	dcm2pdf
Error	98	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	335	1	dcm2pdf
Error	99	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	342	1	dcm2pdf
Error	100	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	348	1	dcm2pdf
Error	101	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	354	1	dcm2pdf
Error	102	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	361	1	dcm2pdf
Error	103	error C2894: templates cannot be declared to have 'C' linkage	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	367	1	dcm2pdf
Error	104	error C1003: error count exceeds 100; stopping compilation	c:\Program Files\Microsoft Visual Studio 10.0\VC\include\xtr1common	367	1	dcm2pdf

Michael Onken
DCMTK Developer
Posts: 2072
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#19 Post by Michael Onken »

Hi,

sorry, no idea about the problem. Something basic seems to be wrong. You might disable the dcm2pdf subproject, however, I guess the error will show up for the rest of the projects where dcm2pdf is just the first in the alphabet.

Is this actually the first error that shows up? Are you sure you have Visual studio installed correctly and working (did you try another "big" project?)?

Michael

ahirnish
Posts: 38
Joined: Wed, 2012-01-04, 10:18

#20 Post by ahirnish »

Is it necessary to build all sub-projects in ALL_BUILD on order to use DCMTK library. As I wrote in my last post that I am having certain unidentified errors in the dcm2pdf, so I deleted that project from ALL_BUILD and now there are no errors. Will that be alright?

Now, what do I've to do in order to use the library in my separate project? How should I link the DCMTK library in my source code?

Michael Onken
DCMTK Developer
Posts: 2072
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#21 Post by Michael Onken »

Hi,

you should link every of the libraries that you actually use, e.g. dcmdata.lib, oflog.lib and ofstd.lib if you only want to do DICOM reading/writing. If you want network, add at least dcmnet.lib and dcmtls.lib. And so on. Use the right order for linking the libraries. You find several FAQs in FAQ section of this forum that help you getting started.

HTH,
Michael

ahirnish
Posts: 38
Joined: Wed, 2012-01-04, 10:18

#22 Post by ahirnish »

I want to build a simple dicom server which can do query for the dicom images and give me the list. I dont want to fetch the images. Which libraries should I use and in what order? Since it includes networking as I have to set up a connection from a remote server, I got to include dcmnet.lib and dcmtls.lib, as you said in last reply. What else?

Also, I am confused here. Do i need to include a Cmakelist.txt for every project that I've created and then build the binaries of the libraries required and source file using Cmake? I am not getting how to start my new project? I went through FA@ #40 but I am not getting what do you want to say by #4 in procedure list? Please help me?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest