I could not find thegetopt1.c file

Hi

When I debugged https://github.com/jacksonliam/mjpg-streamer/tree/master/mjpg-streamer-experimental with GDB, I could not find the getopt1.c file.
Can someone @ogra tell me where i can find getopt1.c?

Thanks

You may want to search for it on packages.ubuntu.com

This is a pretty generic linux development question, @Lin-Buo-Ren is right, you can use packages.ubuntu.com or install apt-file (as a commandline way) to search for files in ubuntu source packages that snaps use for building.

1 Like

Hi

I tried, failed.
First i search getopt1.c on ubuntu package like this

then i typed "sudo apt-get install gnulib“ in terminal .

When all operations are done, i reboot system and got the same words “getopt_long (argc=1, argv=0x7fffffffe608, options=0x4040b9 “hi:o:vb”,
long_options=0x605160 <long_options>, opt_index=0x0) at getopt1.c:64
64 getopt1.c: No such file or directory.”

How can i fix it?

Thanks

these are all prettty generic C development questions that do not really fit into the snap forum …

there is also no issue with getopt here at all but getopt is telling you that you are using a long option for the application that seems to point to a file or directory that can not be found…

what exactly are you trying to achieve ?

I am a green hand and i just want to figure out how it works.

Thank you very much.

This doesn’t seem to be a snap package, as @ogra pointed out this is not a generic programming forum but a forum specifically designed for the Snappy ecosystem. You may want to forward this question to a generic programming Q&A site like Stack Overflow - Where Developers Learn, Share, & Build Careers.

As for the original problem, it should be possible to notify GDB the proper location of the source files.