dclib-devel Mailing List for dlib C++ Library (Page 8)
Brought to you by:
davisking
You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(6) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
(7) |
Aug
|
Sep
|
Oct
(7) |
Nov
(3) |
Dec
|
2009 |
Jan
(4) |
Feb
(3) |
Mar
(4) |
Apr
(3) |
May
(9) |
Jun
(5) |
Jul
(7) |
Aug
(2) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
(1) |
2010 |
Jan
(1) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2011 |
Jan
(1) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(3) |
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(8) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
(4) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(5) |
2017 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(10) |
Sep
|
Oct
(12) |
Nov
(1) |
Dec
(20) |
2018 |
Jan
(11) |
Feb
(10) |
Mar
(8) |
Apr
|
May
(8) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Davis K. <dav...@us...> - 2008-07-25 02:52:17
|
No problem. You should be able to compile the bayes_net_gu_ex in visual studio or mingw (and even cygwin now). In fact, I use it in Windows XP all the time. But I guess you are having trouble getting it compiled in Windows XP still? -Davis On Thu, Jul 24, 2008 at 10:43 PM, Nabeel Alzahrani <nza...@ho...> wrote: > Thank you so much for your help. I have tried the library with Mingw and > it is working. > Actually I need to see the GUI of the bayes network of the > "bayes_net_gui_ex" example , so it is inevitable to install Linux in my > Windows XP :-( > > Nabeel > > ------------------------------ > Date: Thu, 24 Jul 2008 20:10:26 -0400 > From: dav...@us... > To: nza...@ho...; dcl...@li... > > Subject: Re: dlib C++ library Compilation Errors > > I just installed cygwin and modified the library so that it compiles > without any of these errors. I put a snapshot of it in > http://dclib.sf.net/snapshot so you can give that copy a try. > > -Davis > > On Tue, Jul 22, 2008 at 3:42 PM, Davis King < > dav...@us...> wrote: > > Ah, it is the std::wstring. Some of the windows ports of gcc to windows > are missing the wide character stuff from the standard C++ library. You can > maybe get it working by adding a #ifdef around the offending bits of code to > disable them when they are used on the version of gcc used by cygwin 1.5. > > Or you could try using mingw. I believe it's newest version isn't missing > these things from its library. > > I'll play around with cygwin when I get some free time and see if I can't > find a workaround. But let me know if you find an easy solution :) > > -Davis > > > On Tue, Jul 22, 2008 at 3:23 PM, Nabeel Alzahrani <nza...@ho...> > wrote: > > I did not put anything into the /home/Bill/dlib/dlib folder. If I just go > to the examples folder and do ""g++ -DNO_MAKEFILE bayes_net_ex.cpp", I got > the error messages: > ------------------------------------------------------ > > Bill@pc ~ > $ ls > dlib > > Bill@pc ~ > $ cd dlib > > Bill@pc ~/dlib > $ ls > New Text Document.txt dlib documentation.html makefile.txt > bayes_net_ex.cpp docs examples project.cpp > > Bill@pc ~/dlib > $ pwd > /home/Bill/dlib > > Bill@pc ~/dlib > $ cd examples > > Bill@pc ~/dlib/examples > $ g++ -DNO_MAKEFILE bayes_net_ex.cpp > bayes_net_ex.cpp:38:30: dlib/bayes_utils.h: No such file or directory > bayes_net_ex.cpp:39:30: dlib/graph_utils.h: No such file or directory > bayes_net_ex.cpp:40:24: dlib/graph.h: No such file or directory > bayes_net_ex.cpp:41:33: dlib/directed_graph.h: No such file or directory > bayes_net_ex.cpp:45: error: expected namespace-name before ';' token > bayes_net_ex.cpp:45: error: `<type error>' is not a namespace > bayes_net_ex.cpp: In function `int main()': > bayes_net_ex.cpp:59: error: expected namespace-name before ';' token > bayes_net_ex.cpp:59: error: `<type error>' is not a namespace > bayes_net_ex.cpp:64: error: `directed_graph' undeclared (first use this > function > ) > bayes_net_ex.cpp:64: error: (Each undeclared identifier is reported only > once fo > r each function it appears in.) > bayes_net_ex.cpp:64: error: `bayes_node' undeclared (first use this > function) > bayes_net_ex.cpp:64: error: `::kernel_1a_c' has not been declared > bayes_net_ex.cpp:64: error: expected `;' before "bn" > bayes_net_ex.cpp:80: error: `bn' undeclared (first use this function) > bayes_net_ex.cpp:88: error: `set_node_num_values' undeclared (first use > this fun > ction) > bayes_net_ex.cpp:93: error: `assignment' undeclared (first use this > function) > bayes_net_ex.cpp:93: error: expected `;' before "parent_state" > bayes_net_ex.cpp:102: error: `parent_state' undeclared (first use this > function) > > bayes_net_ex.cpp:102: error: `set_node_probability' undeclared (first use > this f > unction) > bayes_net_ex.cpp:167: error: expected init-declarator before '<' token > bayes_net_ex.cpp:167: error: expected `,' or `;' before '<' token > bayes_net_ex.cpp:168: error: `join_tree_type' undeclared (first use this > functio > n) > bayes_net_ex.cpp:168: error: expected `;' before "join_tree" > bayes_net_ex.cpp:174: error: `join_tree' undeclared (first use this > function) > bayes_net_ex.cpp:174: error: `create_moral_graph' undeclared (first use > this fun > ction) > bayes_net_ex.cpp:175: error: `create_join_tree' undeclared (first use this > funct > ion) > bayes_net_ex.cpp:180: error: `bayesian_network_join_tree' undeclared (first > use > this function) > bayes_net_ex.cpp:180: error: expected `;' before "solution" > bayes_net_ex.cpp:185: error: `solution' undeclared (first use this > function) > bayes_net_ex.cpp:200: error: `set_node_value' undeclared (first use this > functio > n) > bayes_net_ex.cpp:201: error: `set_node_as_evidence' undeclared (first use > this f > unction) > bayes_net_ex.cpp:205: error: expected `;' before "solution_with_evidence" > bayes_net_ex.cpp:209: error: `solution_with_evidence' undeclared (first use > this > function) > bayes_net_ex.cpp:255: error: `bayesian_network_gibbs_sampler' undeclared > (first > use this function) > bayes_net_ex.cpp:255: error: expected `;' before "sampler" > bayes_net_ex.cpp:274: error: `sampler' undeclared (first use this function) > bayes_net_ex.cpp:276: error: `node_value' undeclared (first use this > function) > > Bill@pc ~/dlib/examples > $ > ------------------------------------------------------ > However, if I changed the paths in the bayes_net_ex.cpp file to reflect the > location of the dlib library by changing the includes to: > #include "../dlib/bayes_utils.h" > #include "../dlib/graph_utils.h" > #include "../dlib/graph.h" > #include "../dlib/directed_graph.h" > and do ""g++ -DNO_MAKEFILE bayes_net_ex.cpp", I got the error messages: > ------------------------------------------------------- > > Bill@pc ~ > $ ls > dlib > > Bill@pc ~ > $ cd dlib > > Bill@pc ~/dlib > $ ls > New Text Document.txt dlib documentation.html makefile.txt > bayes_net_ex.cpp docs examples project.cpp > > Bill@pc ~/dlib > $ cd examples > > Bill@pc ~/dlib/examples > $ 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:38: > ../dlib/bayes_utils/../string/string.h:88: error: expected init-declarator > befor > e "cast_to_wstring" > ../dlib/bayes_utils/../string/string.h:88: error: expected `;' before > "cast_to_w > string" > ../dlib/bayes_utils/../string/string.h: In function `const T > dlib::string_cast(c > onst wchar_t*)': > ../dlib/bayes_utils/../string/string.h:214: error: `wstring' is not a > member of > `std' > 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:38: > ../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 > `... > ' before '&' token > ../dlib/bayes_utils/../map/../unicode/unicode.h:522: error: ISO C++ forbids > decl > aration of `parameter' with no type > ../dlib/bayes_utils/../map/../unicode/unicode.h:524: error: expected > init-declar > ator before "convert_utf32_to_wstring" > ../dlib/bayes_utils/../map/../unicode/unicode.h:524: error: expected `,' or > `;' > before "convert_utf32_to_wstring" > ../dlib/bayes_utils/../map/../unicode/unicode.h:528: error: expected > init-declar > ator before "convert_mbstring_to_wstring" > ../dlib/bayes_utils/../map/../unicode/unicode.h:528: error: expected `,' or > `;' > before "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 > `... > ' before '&' token > ../dlib/bayes_utils/../map/../unicode/unicode.h:534: error: ISO C++ forbids > decl > aration 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:38: > ../dlib/bayes_utils/../map/../serialize.h:738: error: expected > unqualified-id be > fore '&' token > ../dlib/bayes_utils/../map/../serialize.h:738: error: expected `,' or `...' > befo > re '&' token > ../dlib/bayes_utils/../map/../serialize.h:741: error: ISO C++ forbids > declaratio > n of `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 u > se this function) > ../dlib/bayes_utils/../map/../serialize.h:742: error: (Each undeclared > identifie > r is reported only once for each function it appears in.) > ../dlib/bayes_utils/../map/../serialize.h:743: error: `out' undeclared > (first us > e this function) > ../dlib/bayes_utils/../map/../serialize.h: At global scope: > ../dlib/bayes_utils/../map/../serialize.h:752: error: variable or field > `deseria > lize' declared void > ../dlib/bayes_utils/../map/../serialize.h:752: error: `dlib::deserialize' > declar > ed as an `inline' variable > ../dlib/bayes_utils/../map/../serialize.h:752: error: `int > dlib::deserialize' re > declared as different kind of symbol > ../dlib/bayes_utils/../map/../serialize.h:677: error: previous declaration > of `t > emplate<class T, class alloc> void dlib::deserialize(std::vector<_Tp, > _Alloc>&, > std::istream&)' > ../dlib/bayes_utils/../map/../serialize.h:752: error: declaration of `int > dlib:: > deserialize' > ../dlib/bayes_utils/../map/../serialize.h:677: error: conflicts with > previous de > claration ` 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 > this scope > ../dlib/bayes_utils/../map/../serialize.h:754: error: expected > primary-expressio > n before '&' token > ../dlib/bayes_utils/../map/../serialize.h:755: error: `in' was not declared > in t > his scope > ../dlib/bayes_utils/../map/../serialize.h:756: error: initializer > expression lis > t treated as compound expression > ../dlib/bayes_utils/../map/../serialize.h:756: error: expected `,' or `;' > before > '{' token > > Bill@pc ~/dlib/examples > $ > ------------------------------------------------------- > ------------------------------ > Date: Tue, 22 Jul 2008 07:16:09 -0400 > From: dav...@us... > To: nza...@ho... > Subject: Re: dlib C++ library Compilation Errors > CC: dcl...@li... > > > 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 > > > > ------------------------------ > Time for vacation? WIN what you need. Enter Now!<http://www.gowindowslive.com/summergiveaway/?ocid=tag_jlyhm> > > > > > ------------------------------ > With Windows Live for mobile, your contacts travel with you. Connect on > the go.<http://www.windowslive.com/mobile/overview.html?ocid=TXT_TAGLM_WL_mobile_072008> > |
From: Davis K. <dav...@us...> - 2008-07-25 00:10:29
|
I just installed cygwin and modified the library so that it compiles without any of these errors. I put a snapshot of it in http://dclib.sf.net/snapshotso you can give that copy a try. -Davis On Tue, Jul 22, 2008 at 3:42 PM, Davis King <dav...@us...> wrote: > Ah, it is the std::wstring. Some of the windows ports of gcc to windows > are missing the wide character stuff from the standard C++ library. You can > maybe get it working by adding a #ifdef around the offending bits of code to > disable them when they are used on the version of gcc used by cygwin 1.5. > > Or you could try using mingw. I believe it's newest version isn't missing > these things from its library. > > I'll play around with cygwin when I get some free time and see if I can't > find a workaround. But let me know if you find an easy solution :) > > -Davis > > > On Tue, Jul 22, 2008 at 3:23 PM, Nabeel Alzahrani <nza...@ho...> > wrote: > >> I did not put anything into the /home/Bill/dlib/dlib folder. If I just go >> to the examples folder and do ""g++ -DNO_MAKEFILE bayes_net_ex.cpp", I got >> the error messages: >> ------------------------------------------------------ >> >> Bill@pc ~ >> $ ls >> dlib >> >> Bill@pc ~ >> $ cd dlib >> >> Bill@pc ~/dlib >> $ ls >> New Text Document.txt dlib documentation.html makefile.txt >> bayes_net_ex.cpp docs examples project.cpp >> >> Bill@pc ~/dlib >> $ pwd >> /home/Bill/dlib >> >> Bill@pc ~/dlib >> $ cd examples >> >> Bill@pc ~/dlib/examples >> $ g++ -DNO_MAKEFILE bayes_net_ex.cpp >> bayes_net_ex.cpp:38:30: dlib/bayes_utils.h: No such file or directory >> bayes_net_ex.cpp:39:30: dlib/graph_utils.h: No such file or directory >> bayes_net_ex.cpp:40:24: dlib/graph.h: No such file or directory >> bayes_net_ex.cpp:41:33: dlib/directed_graph.h: No such file or directory >> bayes_net_ex.cpp:45: error: expected namespace-name before ';' token >> bayes_net_ex.cpp:45: error: `<type error>' is not a namespace >> bayes_net_ex.cpp: In function `int main()': >> bayes_net_ex.cpp:59: error: expected namespace-name before ';' token >> bayes_net_ex.cpp:59: error: `<type error>' is not a namespace >> bayes_net_ex.cpp:64: error: `directed_graph' undeclared (first use this >> function >> ) >> bayes_net_ex.cpp:64: error: (Each undeclared identifier is reported only >> once fo >> r each function it appears in.) >> bayes_net_ex.cpp:64: error: `bayes_node' undeclared (first use this >> function) >> bayes_net_ex.cpp:64: error: `::kernel_1a_c' has not been declared >> bayes_net_ex.cpp:64: error: expected `;' before "bn" >> bayes_net_ex.cpp:80: error: `bn' undeclared (first use this function) >> bayes_net_ex.cpp:88: error: `set_node_num_values' undeclared (first use >> this fun >> ction) >> bayes_net_ex.cpp:93: error: `assignment' undeclared (first use this >> function) >> bayes_net_ex.cpp:93: error: expected `;' before "parent_state" >> bayes_net_ex.cpp:102: error: `parent_state' undeclared (first use this >> function) >> >> bayes_net_ex.cpp:102: error: `set_node_probability' undeclared (first use >> this f >> unction) >> bayes_net_ex.cpp:167: error: expected init-declarator before '<' token >> bayes_net_ex.cpp:167: error: expected `,' or `;' before '<' token >> bayes_net_ex.cpp:168: error: `join_tree_type' undeclared (first use this >> functio >> n) >> bayes_net_ex.cpp:168: error: expected `;' before "join_tree" >> bayes_net_ex.cpp:174: error: `join_tree' undeclared (first use this >> function) >> bayes_net_ex.cpp:174: error: `create_moral_graph' undeclared (first use >> this fun >> ction) >> bayes_net_ex.cpp:175: error: `create_join_tree' undeclared (first use this >> funct >> ion) >> bayes_net_ex.cpp:180: error: `bayesian_network_join_tree' undeclared >> (first use >> this function) >> bayes_net_ex.cpp:180: error: expected `;' before "solution" >> bayes_net_ex.cpp:185: error: `solution' undeclared (first use this >> function) >> bayes_net_ex.cpp:200: error: `set_node_value' undeclared (first use this >> functio >> n) >> bayes_net_ex.cpp:201: error: `set_node_as_evidence' undeclared (first use >> this f >> unction) >> bayes_net_ex.cpp:205: error: expected `;' before "solution_with_evidence" >> bayes_net_ex.cpp:209: error: `solution_with_evidence' undeclared (first >> use this >> function) >> bayes_net_ex.cpp:255: error: `bayesian_network_gibbs_sampler' undeclared >> (first >> use this function) >> bayes_net_ex.cpp:255: error: expected `;' before "sampler" >> bayes_net_ex.cpp:274: error: `sampler' undeclared (first use this >> function) >> bayes_net_ex.cpp:276: error: `node_value' undeclared (first use this >> function) >> >> Bill@pc ~/dlib/examples >> $ >> ------------------------------------------------------ >> However, if I changed the paths in the bayes_net_ex.cpp file to reflect >> the location of the dlib library by changing the includes to: >> #include "../dlib/bayes_utils.h" >> #include "../dlib/graph_utils.h" >> #include "../dlib/graph.h" >> #include "../dlib/directed_graph.h" >> and do ""g++ -DNO_MAKEFILE bayes_net_ex.cpp", I got the error messages: >> ------------------------------------------------------- >> >> Bill@pc ~ >> $ ls >> dlib >> >> Bill@pc ~ >> $ cd dlib >> >> Bill@pc ~/dlib >> $ ls >> New Text Document.txt dlib documentation.html makefile.txt >> bayes_net_ex.cpp docs examples project.cpp >> >> Bill@pc ~/dlib >> $ cd examples >> >> Bill@pc ~/dlib/examples >> $ 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:38: >> ../dlib/bayes_utils/../string/string.h:88: error: expected init-declarator >> befor >> e "cast_to_wstring" >> ../dlib/bayes_utils/../string/string.h:88: error: expected `;' before >> "cast_to_w >> string" >> ../dlib/bayes_utils/../string/string.h: In function `const T >> dlib::string_cast(c >> onst wchar_t*)': >> ../dlib/bayes_utils/../string/string.h:214: error: `wstring' is not a >> member of >> `std' >> 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:38: >> ../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 `... >> ' before '&' token >> ../dlib/bayes_utils/../map/../unicode/unicode.h:522: error: ISO C++ >> forbids decl >> aration of `parameter' with no type >> ../dlib/bayes_utils/../map/../unicode/unicode.h:524: error: expected >> init-declar >> ator before "convert_utf32_to_wstring" >> ../dlib/bayes_utils/../map/../unicode/unicode.h:524: error: expected `,' >> or `;' >> before "convert_utf32_to_wstring" >> ../dlib/bayes_utils/../map/../unicode/unicode.h:528: error: expected >> init-declar >> ator before "convert_mbstring_to_wstring" >> ../dlib/bayes_utils/../map/../unicode/unicode.h:528: error: expected `,' >> or `;' >> before "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 `... >> ' before '&' token >> ../dlib/bayes_utils/../map/../unicode/unicode.h:534: error: ISO C++ >> forbids decl >> aration 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:38: >> ../dlib/bayes_utils/../map/../serialize.h:738: error: expected >> unqualified-id be >> fore '&' token >> ../dlib/bayes_utils/../map/../serialize.h:738: error: expected `,' or >> `...' befo >> re '&' token >> ../dlib/bayes_utils/../map/../serialize.h:741: error: ISO C++ forbids >> declaratio >> n of `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 u >> se this function) >> ../dlib/bayes_utils/../map/../serialize.h:742: error: (Each undeclared >> identifie >> r is reported only once for each function it appears in.) >> ../dlib/bayes_utils/../map/../serialize.h:743: error: `out' undeclared >> (first us >> e this function) >> ../dlib/bayes_utils/../map/../serialize.h: At global scope: >> ../dlib/bayes_utils/../map/../serialize.h:752: error: variable or field >> `deseria >> lize' declared void >> ../dlib/bayes_utils/../map/../serialize.h:752: error: `dlib::deserialize' >> declar >> ed as an `inline' variable >> ../dlib/bayes_utils/../map/../serialize.h:752: error: `int >> dlib::deserialize' re >> declared as different kind of symbol >> ../dlib/bayes_utils/../map/../serialize.h:677: error: previous declaration >> of `t >> emplate<class T, class alloc> void dlib::deserialize(std::vector<_Tp, >> _Alloc>&, >> std::istream&)' >> ../dlib/bayes_utils/../map/../serialize.h:752: error: declaration of `int >> dlib:: >> deserialize' >> ../dlib/bayes_utils/../map/../serialize.h:677: error: conflicts with >> previous de >> claration ` 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 >> this scope >> ../dlib/bayes_utils/../map/../serialize.h:754: error: expected >> primary-expressio >> n before '&' token >> ../dlib/bayes_utils/../map/../serialize.h:755: error: `in' was not >> declared in t >> his scope >> ../dlib/bayes_utils/../map/../serialize.h:756: error: initializer >> expression lis >> t treated as compound expression >> ../dlib/bayes_utils/../map/../serialize.h:756: error: expected `,' or `;' >> before >> '{' token >> >> Bill@pc ~/dlib/examples >> $ >> ------------------------------------------------------- >> ------------------------------ >> Date: Tue, 22 Jul 2008 07:16:09 -0400 >> From: dav...@us... >> To: nza...@ho... >> Subject: Re: dlib C++ library Compilation Errors >> CC: dcl...@li... >> >> >> 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 >> >> >> >> ------------------------------ >> Time for vacation? WIN what you need. Enter Now!<http://www.gowindowslive.com/summergiveaway/?ocid=tag_jlyhm> >> > > |
From: Davis K. <dav...@us...> - 2008-07-22 19:42:18
|
Ah, it is the std::wstring. Some of the windows ports of gcc to windows are missing the wide character stuff from the standard C++ library. You can maybe get it working by adding a #ifdef around the offending bits of code to disable them when they are used on the version of gcc used by cygwin 1.5. Or you could try using mingw. I believe it's newest version isn't missing these things from its library. I'll play around with cygwin when I get some free time and see if I can't find a workaround. But let me know if you find an easy solution :) -Davis On Tue, Jul 22, 2008 at 3:23 PM, Nabeel Alzahrani <nza...@ho...> wrote: > I did not put anything into the /home/Bill/dlib/dlib folder. If I just go > to the examples folder and do ""g++ -DNO_MAKEFILE bayes_net_ex.cpp", I got > the error messages: > ------------------------------------------------------ > > Bill@pc ~ > $ ls > dlib > > Bill@pc ~ > $ cd dlib > > Bill@pc ~/dlib > $ ls > New Text Document.txt dlib documentation.html makefile.txt > bayes_net_ex.cpp docs examples project.cpp > > Bill@pc ~/dlib > $ pwd > /home/Bill/dlib > > Bill@pc ~/dlib > $ cd examples > > Bill@pc ~/dlib/examples > $ g++ -DNO_MAKEFILE bayes_net_ex.cpp > bayes_net_ex.cpp:38:30: dlib/bayes_utils.h: No such file or directory > bayes_net_ex.cpp:39:30: dlib/graph_utils.h: No such file or directory > bayes_net_ex.cpp:40:24: dlib/graph.h: No such file or directory > bayes_net_ex.cpp:41:33: dlib/directed_graph.h: No such file or directory > bayes_net_ex.cpp:45: error: expected namespace-name before ';' token > bayes_net_ex.cpp:45: error: `<type error>' is not a namespace > bayes_net_ex.cpp: In function `int main()': > bayes_net_ex.cpp:59: error: expected namespace-name before ';' token > bayes_net_ex.cpp:59: error: `<type error>' is not a namespace > bayes_net_ex.cpp:64: error: `directed_graph' undeclared (first use this > function > ) > bayes_net_ex.cpp:64: error: (Each undeclared identifier is reported only > once fo > r each function it appears in.) > bayes_net_ex.cpp:64: error: `bayes_node' undeclared (first use this > function) > bayes_net_ex.cpp:64: error: `::kernel_1a_c' has not been declared > bayes_net_ex.cpp:64: error: expected `;' before "bn" > bayes_net_ex.cpp:80: error: `bn' undeclared (first use this function) > bayes_net_ex.cpp:88: error: `set_node_num_values' undeclared (first use > this fun > ction) > bayes_net_ex.cpp:93: error: `assignment' undeclared (first use this > function) > bayes_net_ex.cpp:93: error: expected `;' before "parent_state" > bayes_net_ex.cpp:102: error: `parent_state' undeclared (first use this > function) > > bayes_net_ex.cpp:102: error: `set_node_probability' undeclared (first use > this f > unction) > bayes_net_ex.cpp:167: error: expected init-declarator before '<' token > bayes_net_ex.cpp:167: error: expected `,' or `;' before '<' token > bayes_net_ex.cpp:168: error: `join_tree_type' undeclared (first use this > functio > n) > bayes_net_ex.cpp:168: error: expected `;' before "join_tree" > bayes_net_ex.cpp:174: error: `join_tree' undeclared (first use this > function) > bayes_net_ex.cpp:174: error: `create_moral_graph' undeclared (first use > this fun > ction) > bayes_net_ex.cpp:175: error: `create_join_tree' undeclared (first use this > funct > ion) > bayes_net_ex.cpp:180: error: `bayesian_network_join_tree' undeclared (first > use > this function) > bayes_net_ex.cpp:180: error: expected `;' before "solution" > bayes_net_ex.cpp:185: error: `solution' undeclared (first use this > function) > bayes_net_ex.cpp:200: error: `set_node_value' undeclared (first use this > functio > n) > bayes_net_ex.cpp:201: error: `set_node_as_evidence' undeclared (first use > this f > unction) > bayes_net_ex.cpp:205: error: expected `;' before "solution_with_evidence" > bayes_net_ex.cpp:209: error: `solution_with_evidence' undeclared (first use > this > function) > bayes_net_ex.cpp:255: error: `bayesian_network_gibbs_sampler' undeclared > (first > use this function) > bayes_net_ex.cpp:255: error: expected `;' before "sampler" > bayes_net_ex.cpp:274: error: `sampler' undeclared (first use this function) > bayes_net_ex.cpp:276: error: `node_value' undeclared (first use this > function) > > Bill@pc ~/dlib/examples > $ > ------------------------------------------------------ > However, if I changed the paths in the bayes_net_ex.cpp file to reflect the > location of the dlib library by changing the includes to: > #include "../dlib/bayes_utils.h" > #include "../dlib/graph_utils.h" > #include "../dlib/graph.h" > #include "../dlib/directed_graph.h" > and do ""g++ -DNO_MAKEFILE bayes_net_ex.cpp", I got the error messages: > ------------------------------------------------------- > > Bill@pc ~ > $ ls > dlib > > Bill@pc ~ > $ cd dlib > > Bill@pc ~/dlib > $ ls > New Text Document.txt dlib documentation.html makefile.txt > bayes_net_ex.cpp docs examples project.cpp > > Bill@pc ~/dlib > $ cd examples > > Bill@pc ~/dlib/examples > $ 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:38: > ../dlib/bayes_utils/../string/string.h:88: error: expected init-declarator > befor > e "cast_to_wstring" > ../dlib/bayes_utils/../string/string.h:88: error: expected `;' before > "cast_to_w > string" > ../dlib/bayes_utils/../string/string.h: In function `const T > dlib::string_cast(c > onst wchar_t*)': > ../dlib/bayes_utils/../string/string.h:214: error: `wstring' is not a > member of > `std' > 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:38: > ../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 > `... > ' before '&' token > ../dlib/bayes_utils/../map/../unicode/unicode.h:522: error: ISO C++ forbids > decl > aration of `parameter' with no type > ../dlib/bayes_utils/../map/../unicode/unicode.h:524: error: expected > init-declar > ator before "convert_utf32_to_wstring" > ../dlib/bayes_utils/../map/../unicode/unicode.h:524: error: expected `,' or > `;' > before "convert_utf32_to_wstring" > ../dlib/bayes_utils/../map/../unicode/unicode.h:528: error: expected > init-declar > ator before "convert_mbstring_to_wstring" > ../dlib/bayes_utils/../map/../unicode/unicode.h:528: error: expected `,' or > `;' > before "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 > `... > ' before '&' token > ../dlib/bayes_utils/../map/../unicode/unicode.h:534: error: ISO C++ forbids > decl > aration 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:38: > ../dlib/bayes_utils/../map/../serialize.h:738: error: expected > unqualified-id be > fore '&' token > ../dlib/bayes_utils/../map/../serialize.h:738: error: expected `,' or `...' > befo > re '&' token > ../dlib/bayes_utils/../map/../serialize.h:741: error: ISO C++ forbids > declaratio > n of `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 u > se this function) > ../dlib/bayes_utils/../map/../serialize.h:742: error: (Each undeclared > identifie > r is reported only once for each function it appears in.) > ../dlib/bayes_utils/../map/../serialize.h:743: error: `out' undeclared > (first us > e this function) > ../dlib/bayes_utils/../map/../serialize.h: At global scope: > ../dlib/bayes_utils/../map/../serialize.h:752: error: variable or field > `deseria > lize' declared void > ../dlib/bayes_utils/../map/../serialize.h:752: error: `dlib::deserialize' > declar > ed as an `inline' variable > ../dlib/bayes_utils/../map/../serialize.h:752: error: `int > dlib::deserialize' re > declared as different kind of symbol > ../dlib/bayes_utils/../map/../serialize.h:677: error: previous declaration > of `t > emplate<class T, class alloc> void dlib::deserialize(std::vector<_Tp, > _Alloc>&, > std::istream&)' > ../dlib/bayes_utils/../map/../serialize.h:752: error: declaration of `int > dlib:: > deserialize' > ../dlib/bayes_utils/../map/../serialize.h:677: error: conflicts with > previous de > claration ` 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 > this scope > ../dlib/bayes_utils/../map/../serialize.h:754: error: expected > primary-expressio > n before '&' token > ../dlib/bayes_utils/../map/../serialize.h:755: error: `in' was not declared > in t > his scope > ../dlib/bayes_utils/../map/../serialize.h:756: error: initializer > expression lis > t treated as compound expression > ../dlib/bayes_utils/../map/../serialize.h:756: error: expected `,' or `;' > before > '{' token > > Bill@pc ~/dlib/examples > $ > ------------------------------------------------------- > ------------------------------ > Date: Tue, 22 Jul 2008 07:16:09 -0400 > From: dav...@us... > To: nza...@ho... > Subject: Re: dlib C++ library Compilation Errors > CC: dcl...@li... > > > 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 > > > > ------------------------------ > Time for vacation? WIN what you need. Enter Now!<http://www.gowindowslive.com/summergiveaway/?ocid=tag_jlyhm> > |
From: Davis K. <dav...@us...> - 2008-07-22 18:20:58
|
Huh, that is a bizarre warning. Does it happen whenever something mentions long double? Do you have any extra compiler flags set or anything other than the defaults? -Davis On Tue, Jul 22, 2008 at 9:06 AM, Mark de Jong <mar...@ma...> wrote: > P.P.S. (Sorry) There are lots of "warning" like the following: > Compiling array2d.cpp > In file included from ../../dlib/array2d/array2d_kernel_1.h:7, > from ../../dlib/array2d.h:7, > from array2d.cpp:10: > ../../dlib/algs.h:467: warning: use of `long double' type; its size may > change > in a future release > ../../dlib/algs.h:467: warning: (Long double usage is reported only once > for > each file. > ../../dlib/algs.h:467: warning: To disable this warning, use > -Wno-long-double.) > > On Jul 22, 2008, at 5:28 AM, Davis King wrote: > > All those errors in the dlib/test/makefile are dependency lines added in by > the makedepend program. So you can type make dep and it will remake them on > OS X assuming you have makedep installed and it is in your path. But it > has been my experience with OS X that a lot of the unix utilities like > makedepend either aren't installed by default or aren't in your path. So > you might have to address that. But you can just remove all the lines below > the # DO NOT DELETE and it will build fine. > > You can also use cmake (www.cmake.org) to build the test program and in > fact that is probably the easiest solution. > > > As for the example programs you have to compile with some command line > statement like g++ example.cpp /source/dlib/all/source.cpp -I /source -l X11 > > (That is a capitol -i and then a lower case -l) > > You might also have to tell it where to find the X11 development libraries > if the compiler can't find them automatically. They are usually somewhere > like > > /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/ > > > Or if you aren't doing any X11 GUI stuff then you can #define > DLIB_NO_GUI_SUPPORT and then you won't have to worry about linking to X11. > > > Hope that helps, > Davis > > On Tue, Jul 22, 2008 at 1:19 AM, Mark de Jong <mar...@ma...> wrote: > >> Hi, again, >> >> I was able to compile two of your samples, "GUI" and "HTTP Server", and >> they execute as expected. >> >> However, I'm still not sure what to do with the "test" samples, mentioned >> in my previous email, below. >> >> Any suggestions would be appreciated. >> >> Thanks, >> >> -- Mark >> >> On Jul 21, 2008, at 9:14 PM, Mark de Jong wrote: >> >> Hi! >>> >>> I just downloaded your library to use on Mac OS X 10.5.4. I have Xcode >>> 3.1 (and all its associated components) installed and can build other C and >>> Obj-C programs. I'm running this on a PowerBook G4 (a PowerPC laptop). >>> >>> When I try to compile the "test" using the "makefile", I get the >>> following error: >>> >>> djembe:dlib/dlib-17.6/dlib/test mdj$ make >>> make: *** No rule to make target `/usr/include/features.h', needed >>> by `main.o'. Stop. >>> >>> So, I created a dummy "features.h" file and placed it in /usr/include, >>> after which I get the following error: >>> >>> djembe:dlib/dlib-17.6/dlib/test mdj$ make >>> make: *** No rule to make target `/usr/include/bits/wordsize.h', >>> needed by `main.o'. Stop. >>> >>> So, I'm thinking I missed something in your documentation. I did look >>> through a lot of it, but could not find something obvious to help me get >>> started. >>> >>> The examples don't compile easily from the command line, either. However, >>> there I think I'm probably not linking in some important library (like, >>> possibly, libcpp ... or something like that.) Regular C programs compile >>> just fine. >>> >>> I'll admit that my C++ is a bit rusty, so I'm guessing I'm missing >>> something simple and obvious. >>> >>> Do you have any suggestions that might be of help here? >>> >>> Thanks! >>> >>> -- Mark >>> >>> P.S. I did look in the "help" section of your sourceforge forum, but >>> nothing Mac OS X related jumped out. >>> >> >> > > |
From: Davis K. <dav...@us...> - 2008-07-22 12:28:32
|
All those errors in the dlib/test/makefile are dependency lines added in by the makedepend program. So you can type make dep and it will remake them on OS X assuming you have makedep installed and it is in your path. But it has been my experience with OS X that a lot of the unix utilities like makedepend either aren't installed by default or aren't in your path. So you might have to address that. But you can just remove all the lines below the # DO NOT DELETE and it will build fine. You can also use cmake (www.cmake.org) to build the test program and in fact that is probably the easiest solution. As for the example programs you have to compile with some command line statement like g++ example.cpp /source/dlib/all/source.cpp -I /source -l X11 (That is a capitol -i and then a lower case -l) You might also have to tell it where to find the X11 development libraries if the compiler can't find them automatically. They are usually somewhere like /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/ Or if you aren't doing any X11 GUI stuff then you can #define DLIB_NO_GUI_SUPPORT and then you won't have to worry about linking to X11. Hope that helps, Davis On Tue, Jul 22, 2008 at 1:19 AM, Mark de Jong <mar...@ma...> wrote: > Hi, again, > > I was able to compile two of your samples, "GUI" and "HTTP Server", and > they execute as expected. > > However, I'm still not sure what to do with the "test" samples, mentioned > in my previous email, below. > > Any suggestions would be appreciated. > > Thanks, > > -- Mark > > On Jul 21, 2008, at 9:14 PM, Mark de Jong wrote: > > Hi! >> >> I just downloaded your library to use on Mac OS X 10.5.4. I have Xcode >> 3.1 (and all its associated components) installed and can build other C and >> Obj-C programs. I'm running this on a PowerBook G4 (a PowerPC laptop). >> >> When I try to compile the "test" using the "makefile", I get the following >> error: >> >> djembe:dlib/dlib-17.6/dlib/test mdj$ make >> make: *** No rule to make target `/usr/include/features.h', needed >> by `main.o'. Stop. >> >> So, I created a dummy "features.h" file and placed it in /usr/include, >> after which I get the following error: >> >> djembe:dlib/dlib-17.6/dlib/test mdj$ make >> make: *** No rule to make target `/usr/include/bits/wordsize.h', >> needed by `main.o'. Stop. >> >> So, I'm thinking I missed something in your documentation. I did look >> through a lot of it, but could not find something obvious to help me get >> started. >> >> The examples don't compile easily from the command line, either. However, >> there I think I'm probably not linking in some important library (like, >> possibly, libcpp ... or something like that.) Regular C programs compile >> just fine. >> >> I'll admit that my C++ is a bit rusty, so I'm guessing I'm missing >> something simple and obvious. >> >> Do you have any suggestions that might be of help here? >> >> Thanks! >> >> -- Mark >> >> P.S. I did look in the "help" section of your sourceforge forum, but >> nothing Mac OS X related jumped out. >> > > |
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 |
From: Davis K. <dav...@us...> - 2008-04-04 18:30:23
|
On Fri, Apr 4, 2008 at 12:44 PM, Nils Labugt <el...@on...> wrote: > > > An almost complete rewrite. I only recognize the two drawing functions > and the PNG loader. Yeah, it sort of turned out that way. Initially I thought it would be easier but as I was writing the abstract files it was simpler to just rewrite a lot of parts than understand and merge everything. I also don't want to have any pointers in the code so that necessitated a bunch of changes too. There is a lot to be said for having a working prototype while doing it though :) > > > so it is hard to keep track of the differences or parts I might be > > missing. But the things that are in there now are a menu_bar, > > popup_menu, 3 popup_menu_item styles (a text style, a submenu style, > > and a horizontal line style), the dlib::button now takes a style > > argument as well but I only have two styles in there, and there is > > also a tooltip widget. > > I haven't compiled anything yet, I have only looked at the code. I don't > see any icon button? And what about the user_action classes? They would > make it easier to separate GUI code from the rest of the program. I just added a button_style_toolbar_icon1 style into subversion. There are certainly a lot more to add though. I had a hard time understanding exactly what the user_actions were doing from looking at the code. I get the general idea I think but it isn't obvious to me how they are better than just having member_function_pointers? > > > you know how to get unicode key codes out of X11 and win32 events? > > I have attached some code I found in xterm. It is a script that > generates a C file (keysym2ucs.c) that converts keysyms to Unicode. The > file header of the generated file says it is in the public domain. (I'm > not sure about the comments, they seem to be derived from > UnicodeData.txt.) I think there is a different way to obtain Unicode > input in newer versions of X11. (Languages like Chinese require more > complicated methods for keyboard input.) > Ok, I'll look at all of this stuff. |
From: Davis K. <dav...@us...> - 2008-04-04 14:52:33
|
Nils, I just uploaded a snapshot of the library to http://dclib.sf.net/snapshot. It contains everything I have done with this stuff up now. I think I have got most of what you sent me in there but can you take a look at it and let me know what you think? I ended up changing a lot of stuff so it is hard to keep track of the differences or parts I might be missing. But the things that are in there now are a menu_bar, popup_menu, 3 popup_menu_item styles (a text style, a submenu style, and a horizontal line style), the dlib::button now takes a style argument as well but I only have two styles in there, and there is also a tooltip widget. What is notably missing is all your button styles. So there is still that part to do. But I believe that can be done by just adding more style objects to what is now in the library. I also haven't added any unicode strings to the widget interfaces. I think this can be easily done by overloading the set_text() functions to take ustring and wstring as well as just string. But I'm not sure what to do about the on_keydown event since I never even thought about having it emit unicode characters when I made it way back when. Do you know how to get unicode key codes out of X11 and win32 events? The PNG code you sent me works fine near as I can tell. I ran valgrind on it and it didn't detect any resource leaks so I guess the png_read_end thing doesn't matter. I also looked at the png documentation and it didn't seem to say anything about it being a problem if we don't call it. Anyway, I added it into the library under the name of png_loader. I also added some template and preprocessor magic that should direct a user to a message saying "you have to install libpng" if they haven't and they try to use png_loader. Anyway, take a look at let me know what your thoughts are. -Davis P.S. I also sent this to the dlib development mailing list. I'm not sure it is even configured correctly but I'm trying to get it all setup :) On Sun, Mar 23, 2008 at 12:39 PM, Davis King < dav...@us...> wrote: > Ok. I'll look over it all and integrate it into the library however seems > appropriate and see what I can do about the TODOs and what not. I'll email > you once I have it all in so you can give me your feedback. Should be a > week or two. > > -Davis > > > On Sun, Mar 23, 2008 at 12:04 PM, Nils Labugt <el...@on...> wrote: > > > I'm getting a bit tired of this GUI stuff now, so I'm tempted to leave > > the rest to you. I haven't written any abstract.h file. There are still > > TODOs left in the list (see top of menu.h), but some are just ideas, and > > most are not release blockers. If there are specific classes or > > functions that needs more comments then just say so. > > > > I hope you review the code before you release it, especially the mutex > > stuff, because I don't know how to test that, and I don't have much > > experience with them. Some of the class interfaces are a bit arbitrary > > WRT constructor argument vs. set-function, and I didn't even consider > > the requirements of a future layout manager. I have fixed a lot of bugs, > > but there are probably more left (I think this must be some of the > > buggiest code I have written). Both menu.h and menu.cpp are too long and > > hard to scroll. There are a lot of magic constants, but I think I have > > managed to confine them (mostly) to the style classes. There is no > > support for Tab-key cycling, but I think that would require changes to > > existing widgets (text fields at least). > > > > Note that the images aren't mine, except for the button backgrounds. (I > > downloaded the icons from http://www.openclipart.org/ .) > > > > I found a forum thread about PNG where you say you would consider adding > > optional PNG support. I have no opinion on whether you should do that, > > but before I found that thread I had already written a few lines of glue > > code, which I have included just in case it would be useful. (Note the > > problem with png_read_end, I don't know if it leaks any resources > > because of it.) > > > > > > Nils > > > > > |
From: Davis K. <dav...@gm...> - 2007-11-28 04:57:09
|
test |
From: Davis K. <dav...@us...> - 2007-11-27 13:26:02
|
test |
From: Davis K. <dav...@us...> - 2007-11-26 22:35:18
|
test |
From: Davis K. <dav...@gm...> - 2007-11-26 22:33:13
|
test |