Kyu Posted October 20, 2007 at 10:54 PM Report Share #141674 Posted October 20, 2007 at 10:54 PM Ao fim de muitas tentativas frustradas e de ler a documentação toda sem encontrar o que procuro, venho recorrer aos amigos do p@p 😉 O meu problema é o seguinte: como passar argumentos com múltiplos parâmetros através do gengetopt? (não confundir com a tag multiple, que significa que o argumento pode aparecer mais do que uma vez) Exemplo: >aplicacaoX -arg parametro1 parametro2 eu sei que é fácil de fazer sem o recurso ao gengetopt, mas se existe maneira de o fazer com o recurso ao gengetopt gostava imenso de o saber 🙂 sei também que podia separar o argumento em questão em dois argumentos diferentes, mas não é esse o objectivo desta pergunta 🙂 cumprimentos e obrigado em avanço 😄 "You leave nothing but death and horror in your wake!""Now, that's not fair, sometimes there's fire too" Link to comment Share on other sites More sharing options...
Triton Posted October 21, 2007 at 12:40 AM Report Share #141701 Posted October 21, 2007 at 12:40 AM Será algo deste género que procuras? 😉 http://www.gnu.org/software/libc/manual/html_node/Suboptions-Example.html#Suboptions-Example <3 life Link to comment Share on other sites More sharing options...
Rui Carlos Posted October 21, 2007 at 09:48 AM Report Share #141724 Posted October 21, 2007 at 09:48 AM E juntar o argumento, separando cada parte por ':'? Já agora, esse gengetopt é o mesmo que o getopt que temos habitualmente nos sistemas UNIX? E se não for, há alguma razão especial para usar um e não o outro? Rui Carlos Gonçalves Link to comment Share on other sites More sharing options...
Triton Posted October 21, 2007 at 10:55 AM Report Share #141748 Posted October 21, 2007 at 10:55 AM Já agora, esse gengetopt é o mesmo que o getopt que temos habitualmente nos sistemas UNIX? E se não for, há alguma razão especial para usar um e não o outro? Nem reparei nisso, afinal o gengetopt é um wrapper para o getopt. <3 life Link to comment Share on other sites More sharing options...
Kyu Posted October 21, 2007 at 12:54 PM Author Report Share #141778 Posted October 21, 2007 at 12:54 PM O getopt é o código, o gengetopt é o gerador de código 😉 Facilita muito as coisas, se estiverem interessados está aqui um mini-tutorial: http://hpux.cs.utah.edu/hppd/hpux/Gnu/gengetopt-2.3/readme.html Obrigado pelas soluções sugeridas até agora, no entanto elas não se aplicam ao gengetopt 🙂 "You leave nothing but death and horror in your wake!""Now, that's not fair, sometimes there's fire too" Link to comment Share on other sites More sharing options...
Kyu Posted October 29, 2007 at 04:37 PM Author Report Share #143773 Posted October 29, 2007 at 04:37 PM Hoje tive a resposta através de um professor. Fica aqui a resposta para o caso de surgir alguém no futuro com a mesma dúvida: Não, não é possível. 😉 "You leave nothing but death and horror in your wake!""Now, that's not fair, sometimes there's fire too" Link to comment Share on other sites More sharing options...
Zed_Blade Posted October 24, 2011 at 11:31 PM Report Share #417395 Posted October 24, 2011 at 11:31 PM Boas, Primeiro de tudo, desculpem resuscitar esta thread, mas visto que a dúvida é a mesma, escuso de estar a abrir uma nova. A razão da thread tem a ver com os links já estarem mortos e portanto, não servirem de ajuda. Tenho exactamente a mesma dúvida, para fazer no gengetopt: Preciso de fazer um input do tipo "--arg1 <parametro1> --arg2 <parametro2>" Como raio é que faço isto no gengetopt? O google não tem sido lá grande ajuda, ou então tenho sido eu que não sei procurar bem pelo que quero.. Espero que haja alguém que me consiga ajudar. Cumps. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now