zhongligang / gflags

Automatically exported from code.google.com/p/gflags
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Flags always have default value #84

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Defined flags and builtin flags seem non-functional. The FLAGS_ variables just 
have the default values.

gflags was built with cmake and Makefiles.

clang++ use_flags.cpp -I. -L. -lgflags
$ ./a.out --help --big_menu --doesnt_exist
big_menu is false
Hi, here's big_menu: 0
argc = 4
argv: ./a.out --help --big_menu --doesnt_exist

$ ./a.out --nobig_menu
big_menu is false
Hi, here's big_menu: 0
argc = 2
argv: ./a.out --nobig_menu

What is the expected output? What do you see instead?

The expected output is that the flags will affect the FLAGS_ variables and that 
--help will produce a message.

What version of the product are you using? On what operating system?

gflags eversion 2.1.1
Mac OS X 10.9.3
$ clang -v
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.2.0

Please provide any additional information below.

.cpp attached

Original issue reported on code.google.com by KHo...@gmail.com on 19 Jun 2014 at 12:00

Attachments:

GoogleCodeExporter commented 9 years ago
Please refer to the documentation. You seem to have forgotten to actually parse 
the command-line flags.

https://gflags.googlecode.com/git-history/master/doc/gflags.html#together

Original comment by andreas....@gmail.com on 19 Jun 2014 at 12:06