boost::program_options
When I try to use the boost::program_options library to read a property file, I got the error when I run "make" on Cygwin (I installed Cygwin on WIndows XP).
make g++.exe -I /cygdrive/c/MyTest/Test1/include/boost-1_34_1/ -c TestInit.cpp Test.cpp TestDriver.cpp g++.exe -I /cygdrive/c/MyTest/Test1/include/boost-1_34_1/ -c TestInit.cpp Test.cpp TestDriver.cpp g++.exe -I /cygdrive/c/MyTest/Test1/include/boost-1_34_1/ -c TestInit.cpp Test.cpp TestDriver.cpp g++.exe TestInit.o Test.o TestDriver.o -o "TestDriver" -L/cygdrive/c/MyTest/Test1/lib -lboost_program_options-gcc34-mt-d-1_34_1 -lg2c
Info: resolving vtable for boost::program_options::variables_mapby linking to __imp___ZTVN5boost15program_options13variables_mapE (auto-import) Then when I run my program, it does not work. If I comment out the "try ... catch" block which uses the boost::propram_options library then it compiles and works fine. Please show me how to fix it. Thank you.
I see the function create_directory( "foobar" ); in an example on http://www.boost.org/libs/filesystem/doc/index.htm but wanted more details, such as if the function does a recursive create?
Bill Nortman wrote:
I see the function create_directory( "foobar" ); in an example on http://www.boost.org/libs/filesystem/doc/index.htm but wanted more details, such as if the function does a recursive create?
Look here: http://www.boost.org/libs/filesystem/doc/tr2_proposal.html Maybe create_directories is what you want? - Rush
Bill Nortman wrote:
I see the function create_directory( "foobar" ); in an example on http://www.boost.org/libs/filesystem/doc/index.htm but wanted more details, such as if the function does a recursive create?
Please note the subject line change. It's customary to specify the library name and the particulars of your problem in the subject line. Did you mean create_directories? Did you see: http://www.boost.org/libs/filesystem/doc/tr2_proposal.html#Convenience-funct... In particular: template <class Path> bool create_directories(const Path & p); Requires: p.empty() || forall px: px == p || is_parent(px, p): is_directory(px) || !exists( px ) Returns: The value of !exists(p) prior to the establishment of the postcondition. Postcondition: is_directory(p) Throws: basic_filesystem_error<Path> if exists(p) && !is_directory(p)
Duy Nguyen
When I try to use the boost::program_options library to read a property file, I got the error when I run "make" on Cygwin (I installed Cygwin on WIndows XP).
make g++.exe -I /cygdrive/c/MyTest/Test1/include/boost-1_34_1/
-c TestInit.cpp Test.cpp TestDriver.cppg++.exe -I /cygdrive/c/MyTest/Test1/include/boost-1_34_1/ -c TestInit.cpp Test.cpp TestDriver.cppg++.exe -I /cygdrive/c/MyTest/Test1/include/boost-1_34_1/ -c TestInit.cpp Test.cpp TestDriver.cppg++.exe TestInit.o Test.o TestDriver.o -o "TestDriver" -L/cygdrive/c/MyTest/Test1/lib
-lboost_program_options-gcc34-mt-d-1_34_1 -lg2c Info: resolving vtable for boost::program_options::variables_mapby linking to __imp___ZTVN5boost15program_options13variables_mapE (auto-import)
Then when I run my program, it does not work. If I comment out the "try ... catch" block which uses the boost::propram_options library then it compiles and works fine.
Please show me how to fix it.
Thank you.
I am getting exactly the same error with boost lib 1.34, 1.35, 1.36 and the gcc 4.3.0 that I built myself. On the latest and current cygwin. The program simply doesn't work, silently exits, as if no arg processing is ever done. Can you guys help me out? The same program builds and works fine on Mac OS and linux. Best, Eray Ozkural
AMDG Eray Ozkural wrote:
I am getting exactly the same error with boost lib 1.34, 1.35, 1.36 and the gcc 4.3.0 that I built myself. On the latest and current cygwin. The program simply doesn't work, silently exits, as if no arg processing is ever done.
Can you guys help me out? The same program builds and works fine on Mac OS and linux.
What is the program's exit status? Does it work if you link to the static library? In Christ, Steven Watanabe
participants (6)
-
Bill Nortman
-
Duy Nguyen
-
Eray Ozkural
-
Jeff Flinn
-
Rush Manbert
-
Steven Watanabe