0

Hello,

I am using the handle_options function in a client program written in C that is using the MySQL API. Considering there is no actual reference to this function (to my knowledge) except the book 'MySQL' (or something) written by DuBois, I'm asking for help here.

So I want to process some command line arguments that aren't mysql options. The problem is, they arguments are going to sometimes be negative numbers. The dash (-) representing the negative number gets recognised by handle_options as a mysql option and I then receive the following error message in console.

unknown option '-2'

Anyone know any way to tell handle_options to only look for the options that I have defined in my my_option struct and to leave everything else prefixed with a '-' alone? Or will I have to resort to using a different symbol to represent a negative number for the command line arguments :(

Cheers.

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by kathoneil27
0

Hi,

Try having your application processes argv and argc, and remove those options before passing them to the library. The options processing code is a minefield! :)

For help help with your MySQL database, visit www.skysql.com

Cheers!

Kath

Edited by kathoneil27: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.