instalation error in FreeBSD system

Compilation and installation of DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
meandog
Posts: 6
Joined: Mon, 2004-12-06, 23:13

instalation error in FreeBSD system

#1 Post by meandog »

Hi all,
during instalation's "make all" stage, I get the following error:

In file included from /usr/include/c++/3.4/bits/postypes.h:46,
from /usr/include/c++/3.4/iosfwd:50,
from /usr/include/c++/3.4/ios:44,
from /usr/include/c++/3.4/ostream:45,
from /usr/include/c++/3.4/iostream:45,
from ../include/ofstream.h:41,
from ../include/ofstring.h:70,
from ofstring.cc:47:
/usr/include/c++/3.4/cwchar:166: error: `::vfwscanf' has not been declared
/usr/include/c++/3.4/cwchar:170: error: `::vswscanf' has not been declared
/usr/include/c++/3.4/cwchar:174: error: `::vwscanf' has not been declared
/usr/include/c++/3.4/cwchar:191: error: `::wcstof' has not been declared
In file included from ../include/ofstring.h:70,
from ofstring.cc:47:
../include/ofstream.h:84: error: `stringstream' does not name a type
../include/ofstream.h:85: error: `ostringstream' does not name a type
../include/ofstream.h:86: error: `istringstream' does not name a type
In file included from ofstring.cc:47:
../include/ofstring.h:824: error: expected constructor, destructor, or type conversion before '&' token
../include/ofstring.h:824: error: expected `,' or `;' before '&' token
../include/ofstring.h:832: error: expected constructor, destructor, or type conversion before '&' token
../include/ofstring.h:832: error: expected `,' or `;' before '&' token
ofstring.cc:770: error: expected constructor, destructor, or type conversion before '&' token
ofstring.cc:770: error: expected `,' or `;' before '&' token
ofstring.cc:778: error: expected constructor, destructor, or type conversion before '&' token
ofstring.cc:778: error: expected `,' or `;' before '&' token
*** Error code 1


then instalation exits, what's wrong?
System: freebsd 5.3, gcc version 3.4.2
Thanks in advance

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#2 Post by Jörg Riesmeier »

Does your compiler work for other C++ projects?
What is the value of USE_STD_CXX_INCLUDES in config/include/cfunix.h?
Did you check whether the settings (e.g. flags) in config/Makefile.def are correct?

meandog
Posts: 6
Joined: Mon, 2004-12-06, 23:13

#3 Post by meandog »

Strings from config/Makefile.def:

CC = gcc
CFLAGS = -O -I/usr/local/include/libxml2 -I/usr/local/include -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_BS
D_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L -Wall
CXX = c++
CXXFLAGS = -O -I/usr/local/include/libxml2 -I/usr/local/include -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_
BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L -Wall
CPPFLAGS =
LDFLAGS =
RANLIB = ranlib
AR = ar
ARFLAGS = cruv


And from cfunix.h:

/* Define if ANSI standard C++ includes are used */
#define USE_STD_CXX_INCLUDES

Should I change something?
p.s. Other projects compile in the system without any serious problem

Marco Eichelberg
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 1437
Joined: Tue, 2004-11-02, 17:22
Location: Oldenburg, Germany
Contact:

#4 Post by Marco Eichelberg »

The first error message

Code: Select all

/usr/include/c++/3.4/cwchar:166: error: `::vfwscanf' has not been declared 
seems to indicate that there is a dependency in one of the standard header files that is not resolved in the header file itself, i.e. <cwchar> uses ::vfwscanf but does not declare it. This could very well be a bug in the compiler (environment) you are using. Most probably this could be solved by adding an #include directive in ofstd/include/ofstream.h before the inclusion of <iostream>. You would have to check your system header files or man pages, though, to determine which header file is actually needed, i.e. where vfwscan etc. are declared.

meandog
Posts: 6
Joined: Mon, 2004-12-06, 23:13

#5 Post by meandog »

I have include wchar.h before iostream declaration in ofstream.h, but i get the following error:
(cd config; make ARCH="" all)
(cd ofstd; make ARCH="" all)
(cd include; make ARCH="" all)
(cd libsrc; make ARCH="" all)
c++ -DHAVE_CONFIG_H -DNDEBUG -c -I. -I. -I../include -I../../config/include -O -I/usr/local/include/libxml2 -I/usr/local/include -D_REENTRANT -D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L -Wall ofstring.cc
In file included from /usr/include/c++/3.4/bits/postypes.h:46,
from /usr/include/c++/3.4/iosfwd:50,
from /usr/include/c++/3.4/ios:44,
from /usr/include/c++/3.4/ostream:45,
from /usr/include/c++/3.4/iostream:45,
from ../include/ofstream.h:41,
from ../include/ofstring.h:70,
from ofstring.cc:47:
/usr/include/c++/3.4/cwchar:166: error: `::vfwscanf' has not been declared
/usr/include/c++/3.4/cwchar:170: error: `::vswscanf' has not been declared
/usr/include/c++/3.4/cwchar:174: error: `::vwscanf' has not been declared
/usr/include/c++/3.4/cwchar:191: error: `::wcstof' has not been declared
In file included from ../include/ofstring.h:70,
from ofstring.cc:47:
../include/ofstream.h:84: error: `stringstream' does not name a type
../include/ofstream.h:85: error: `ostringstream' does not name a type
../include/ofstream.h:86: error: `istringstream' does not name a type
In file included from ofstring.cc:47:
../include/ofstring.h:824: error: expected constructor, destructor, or type conversion before '&' token
../include/ofstring.h:824: error: expected `,' or `;' before '&' token
../include/ofstring.h:832: error: expected constructor, destructor, or type conversion before '&' token
../include/ofstring.h:832: error: expected `,' or `;' before '&' token
ofstring.cc:770: error: expected constructor, destructor, or type conversion before '&' token
ofstring.cc:770: error: expected `,' or `;' before '&' token
ofstring.cc:778: error: expected constructor, destructor, or type conversion before '&' token
ofstring.cc:778: error: expected `,' or `;' before '&' token
*** Error code 1

Stop in /root/dicom/dcmtk-3.5.3/ofstd/libsrc.
*** Error code 1

Stop in /root/dicom/dcmtk-3.5.3/ofstd.
*** Error code 1

Stop in /root/dicom/dcmtk-3.5.3.


What should I do next?
thanks in advance

Marco Eichelberg
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 1437
Joined: Tue, 2004-11-02, 17:22
Location: Oldenburg, Germany
Contact:

#6 Post by Marco Eichelberg »

Since the error message is still the same, <wchar.h> is obviously not what was needed here. Sorry, but we cannot give you more detailed instructions than explained before since we don't have any FreeBSD 5.x installation currently. Determine where ::vfwscan et al are declared and make sure this header file is included from ofstream.h prior to the inclusion of <iostream>.

ken2002
Posts: 1
Joined: Fri, 2005-08-05, 12:26

#7 Post by ken2002 »

compiled dcmtk 3.5.3 on freebsd 5.4
after making a lot of change to the source code
but the function 'strlcpy' course most commands core dump....

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest