Site Admin
|
take a look into /usr/include/unistd.h
maybe it's possible to bypass declaration of getopt() in it. For example, there might be some #ifdef around getopt() ... In this case it would be sufficient to define them and have getopt() declared only once in getopt.h |
||||||||||||
|
|
Ok...this is really kludgy, but it works. I really don't see the need for unistd.h to need to define getopt because any autoconf will find getopt.h on its own, so this workaround will do for this build. I'll keep it around until I see something breaking with future compiles.
Here is a diff for my new unistd.h:
Here are the commands that I used to compile the program:
That's it! This build assumes pcre, readline, and ncurses are installed (in my case, via fink). Hopefully this helps some people. Now I have to figure out how to use this properly. Thanks for all the help, Dmitiri! |
||||||||||||||||
|
|
Kludgy? Hell, that's vomit-inducing. I can't even believe you'd consider doing it. There is no excuse, I repeat, NO excuse for a piece of user software requiring you to modify system headers. What you're risking there is getting dbg-cli to build and having other stuff mysteriously fail to compile. The problem here is in the dbg-cli code, and in particular it's autoconfigure setup. As you have noted, the code uses getopt_long_only, which appears to be used in the place of getopt_long despite having the option of short options. Funky. OSX has no getopt_long_only, but does have getopt_long. So, we can replace the call to getopt_long_only with a call to getopt_long, remove all reference to the included ../getopt and all should be well. A quick hack to dbg/main.cpp and dbg/Makefile (to remove the -lgetopt and -I../getopt) works quite nicely, I find. I'd fix the root problem, but I have more important stuff to do. Oh, and then you can restore your unistd.h to its former glory. Simon |
||||||||||||||
_________________ Your mouse has moved. You must restart Windows NT for this change to be recognised. |
|
See this: viewtopic.php?t=5855
|
||||||||||||
|
DBG-CLI on OS X |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by