getopt.h is missing

532 views
Skip to first unread message

Luis Gustavo Spern Barreto

unread,
Jun 28, 2011, 9:17:58 AM6/28/11
to razo...@googlegroups.com
Hello I got compilation error:
/home/gustavo/tmp/razor-qt/razorqt-session/src/main.cpp:91: error:
'getopt' was not declared in this scope
/home/gustavo/tmp/razor-qt/razorqt-session/src/main.cpp:95: error:
'optarg' was not declared in this scope

I added #include <getopt.h> to the file and it works just fine. Anyone
else having this problem?

Luis Gustavo Spern Barreto,
http://www.gustavobarreto.net
+55 53 9144.4318

Alexander Sokolov

unread,
Jun 28, 2011, 9:38:50 AM6/28/11
to razo...@googlegroups.com
I had no problems with getopts. How you build before?
IMHO we can add this line.

pe...@scribus.info

unread,
Jun 28, 2011, 9:44:09 AM6/28/11
to razo...@googlegroups.com

On Tue, 28 Jun 2011 10:17:58 -0300, Luis Gustavo Spern Barreto
<gustavo...@gmail.com> wrote:
> Hello I got compilation error:
> /home/gustavo/tmp/razor-qt/razorqt-session/src/main.cpp:91: error:
> 'getopt' was not declared in this scope
> /home/gustavo/tmp/razor-qt/razorqt-session/src/main.cpp:95: error:
> 'optarg' was not declared in this scope
>
> I added #include <getopt.h> to the file and it works just fine. Anyone
> else having this problem?

Strange. What distro do you use, please?

Anyway - you should have SVN commit rights now. So you can fix it
yourself (to test svn commit). I suggest to use "unistd.h" instead of
getopt.h because of it's standardized location of getopt inclusion...

p.

Luis Gustavo Spern Barreto

unread,
Jun 28, 2011, 9:47:53 AM6/28/11
to razo...@googlegroups.com
I always did it. My distro is Ubuntu 10.10 and my Qt version is 4.8 git branch

Luis Gustavo Spern Barreto,
http://www.gustavobarreto.net
+55 53 9144.4318

2011/6/28 pe...@scribus.info <pe...@scribus.info>:

> --
> You received this message because you are subscribed to the Google
> Groups "Razor-qt" group.
> For more options, visit this group at
> http://groups.google.com/group/razor-qt?hl=en
>

Maciej Płaza

unread,
Jun 28, 2011, 9:55:54 AM6/28/11
to razo...@googlegroups.com
2011/6/28 Luis Gustavo Spern Barreto <gustavo...@gmail.com>:
Hi,

It works fine fro me without problem. Maybe it's Qt 4.8 fault? I'm
using Qt 4.7.3.

Regards,
Maciej Płaza.

Luis Gustavo Spern Barreto

unread,
Jun 28, 2011, 10:02:36 AM6/28/11
to razo...@googlegroups.com
Yes. Maybe the 4.8 version no longer include it "automatically".

Luis Gustavo Spern Barreto,
http://www.gustavobarreto.net
+55 53 9144.4318

2011/6/28 Maciej Płaza <plaza....@gmail.com>:

Maciej Płaza

unread,
Jun 28, 2011, 10:05:27 AM6/28/11
to razo...@googlegroups.com
OMG I don't know what I wanted to say in my previous mail Oo I think I
should go sleep :D

Anyway, can you try test it with 4.7.x from Ubuntu repo?

Regards,
Maciej Płaza.

Luis Gustavo Spern Barreto

unread,
Jun 28, 2011, 10:09:44 AM6/28/11
to razo...@googlegroups.com
LOL I could understand 100% of what you said perfectly

Luis Gustavo Spern Barreto

unread,
Jun 29, 2011, 8:09:19 AM6/29/11
to razo...@googlegroups.com
> Anyway, can you try test it with 4.7.x from Ubuntu repo?
Works fine with 4.7 from Ubuntu repo

Md Muazzam

unread,
Feb 15, 2018, 1:13:53 AM2/15/18
to Razor-qt
It also works for me thanks
Reply all
Reply to author
Forward
0 new messages