I have a library which has its own command-line arguments parsing mechanism when the library is compiled as stand alone binary and here is the code:
int main( int argc, char **argv )
{
int result;
argc = wool_init( argc, argv );
....
}
int wool_init( int argc, char **argv )
{
us_elapsed();
argc = decode_options( argc, argv );
.....
}
Now I am linking this library statically into another one which has its own Command-line parsing mechanism and arguments. I would like to initialize this first library with some arguments at run-time for example I am passing these arguments as follows to mimic command-line:
/* initializing wool run-time environment */
char **woolArg;
*woolArg[0] = "-p 3";
wool_init(1, woolArg);
But I am getting following error.
:113:14: error: assignment makes integer from pointer without a cast [-Werror]
*woolArg[0] = "-p 3";
^
Can somebody please help?