Re: [Dclib-devel] dlib C++ library Compilation Errors
Brought to you by:
davisking
From: Davis K. <dav...@us...> - 2008-07-22 11:16:13
|
Don't put anything into the /home/Bill/dlib/dlib folder. That is probably your problem. Try just going into the examples folder and doing "g++ -DNO_MAKEFILE bayes_net_ex.cpp -I ..". You might also get linker errors about gdi32, comctl32, user32, ws2_32, or imm32. So if that happens try adding -l gdi32 -l imm32, etc... Let me know if that doesn't fix your problem. -Davis On Tue, Jul 22, 2008 at 3:35 AM, Nabeel Alzahrani <nza...@ho...> wrote: > > Hello Davis > > I tried to run the example bayes_net_ex.cpp but I got many error messages. > I am using Cygwin version 1.5.25 (you can tell using the command uname -r) > under Windows XP Home edition with service pack 3. > I downloaded the library to a folder named dlib, so I have the following > folders: > /home/Bill/dlib/dlib > /home/Bill/dlib/docs > /home/Bill/dlib/examples > I moved the example bayes_net_ex.cpp from the folder > /home/Bill/dlib/examples to the folder /home/Bill/dlib/dlib and compiled it > using the command g++ bayes_net_ex.cpp and gcc bayes_net_ex.cpp with and > without using the compiler director #define NO_MAKEFILE as the first line. > > The error messages are: > $ g++ bayes_net_ex.cpp > > -------------------------------------------------------------------------------------------------------- > In file included from > dlib/bayes_utils/../string.h:6, > > > from > dlib/bayes_utils/bayes_utils.h:8, > > > from > dlib/bayes_utils.h:6, > > > from > bayes_net_ex.cpp:39: > > > dlib/bayes_utils/../string/string.h:88: > error: expected init-declarator before " > > > cast_to_wstring" > > > dlib/bayes_utils/../string/string.h:88: > error: expected `;' before "cast_to_wstr > > > ing" > > > dlib/bayes_utils/../string/string.h: In > function `const T dlib::string_cast(cons > > > t wchar_t*)': > > > dlib/bayes_utils/../string/string.h:214: > error: `wstring' is not a member of `st > > > d' > > > In file included from > dlib/bayes_utils/../map/../unicode.h:6, > > > from > dlib/bayes_utils/../map/../serialize.h:121, > > > from > dlib/bayes_utils/../map/map_kernel_1.h:11, > > > from > dlib/bayes_utils/../map.h:6, > > > from > dlib/bayes_utils/bayes_utils.h:9, > > > from > dlib/bayes_utils.h:6, > > > from > bayes_net_ex.cpp:39: > > > dlib/bayes_utils/../map/../unicode/unicode.h: > At global scope: > > > dlib/bayes_utils/../map/../unicode/unicode.h:521: > error: expected unqualified-id > > > before '&' token > > > dlib/bayes_utils/../map/../unicode/unicode.h:521: > error: expected `,' or `...' b > > > efore '&' token > > > dlib/bayes_utils/../map/../unicode/unicode.h:522: > error: ISO C++ forbids declara > > > tion of `parameter' with no type > > > dlib/bayes_utils/../map/../unicode/unicode.h:524: > error: expected init-declarato > > > r before "convert_utf32_to_wstring" > > > dlib/bayes_utils/../map/../unicode/unicode.h:524: > error: expected `,' or `;' bef > > > ore "convert_utf32_to_wstring" > > > dlib/bayes_utils/../map/../unicode/unicode.h:528: > error: expected init-declarato > > > r before "convert_mbstring_to_wstring" > > > dlib/bayes_utils/../map/../unicode/unicode.h:528: > error: expected `,' or `;' bef > > > ore "convert_mbstring_to_wstring" > > > dlib/bayes_utils/../map/../unicode/unicode.h:533: > error: expected unqualified-id > > > before '&' token > > > dlib/bayes_utils/../map/../unicode/unicode.h:533: > error: expected `,' or `...' b > > > efore '&' token > > > dlib/bayes_utils/../map/../unicode/unicode.h:534: > error: ISO C++ forbids declara > > > tion of `parameter' with no type > > > In file included from > dlib/bayes_utils/../map/map_kernel_1.h:11, > > > from > dlib/bayes_utils/../map.h:6, > > > from > dlib/bayes_utils/bayes_utils.h:9, > > > from > dlib/bayes_utils.h:6, > > > from > bayes_net_ex.cpp:39: > > > dlib/bayes_utils/../map/../serialize.h:738: > error: expected unqualified-id befor > > > e '&' token > > > dlib/bayes_utils/../map/../serialize.h:738: > error: expected `,' or `...' before > > > '&' token > > > dlib/bayes_utils/../map/../serialize.h:741: > error: ISO C++ forbids declaration o > > > f `parameter' with no type > > > dlib/bayes_utils/../map/../serialize.h: > In function `void dlib::serialize(int)': > > > > > > dlib/bayes_utils/../map/../serialize.h:742: > error: `item' undeclared (first use > > > this function) > > > dlib/bayes_utils/../map/../serialize.h:742: > error: (Each undeclared identifier i > > > s reported only once for each function > it appears in.) > > > dlib/bayes_utils/../map/../serialize.h:743: > error: `out' undeclared (first use t > > > his function) > > > dlib/bayes_utils/../map/../serialize.h: > At global scope: > > > dlib/bayes_utils/../map/../serialize.h:752: > error: variable or field `deserializ > > > e' declared void > > > dlib/bayes_utils/../map/../serialize.h:752: > error: `dlib::deserialize' declared > > > as an `inline' variable > > > dlib/bayes_utils/../map/../serialize.h:752: > error: `int dlib::deserialize' redec > > > lared as different kind of symbol > > > dlib/bayes_utils/../map/../serialize.h:677: > error: previous declaration of `temp > > > late void > dlib::deserialize(std::vector&, std > > > ::istream&)' > > > dlib/bayes_utils/../map/../serialize.h:752: > error: declaration of `int dlib::des > > > erialize' > > > dlib/bayes_utils/../map/../serialize.h:677: > error: conflicts with previous decla > > > ration ` namespace dlib { > }::deserialize' > > > dlib/bayes_utils/../map/../serialize.h:753: > error: `wstring' is not a member of > > > `std' > > > dlib/bayes_utils/../map/../serialize.h:753: > error: `item' was not declared in th > > > is scope > > > dlib/bayes_utils/../map/../serialize.h:754: > error: expected primary-expression b > > > efore '&' token > > > dlib/bayes_utils/../map/../serialize.h:755: > error: `in' was not declared in this > > > scope > > > dlib/bayes_utils/../map/../serialize.h:756: > error: initializer expression list t > > > reated as compound expression > > > dlib/bayes_utils/../map/../serialize.h:756: > error: expected `,' or `;' before '{ > > > ' token > > > > > > > > > _________________________________________________________________ > Time for vacation? WIN what you need- enter now! > http://www.gowindowslive.com/summergiveaway/?ocid=tag_jlyhm |