5

I try to generate a menuconfig by my own with the help of lxdialog (source: lxdialog). Unfortunately this is not so well documented as I wished for. Example:

example menuconfig

So what I did: I included these files (see source) into a new/empty project and did nothing else. As it seems that this is the source of lxdialog I tried a quick shot by easily importing.I need to use a GUI, which is based on .csince I need the return values in a C/C++ program - that's why I can't use the much more easier to develop dialog. I don't want to spent too much time on programming a new GUI that's why I think lxdialog fits my needs.

The error: I get lots of errors with the message Type XYZ could not be resolved. I refreshed the Indexer a multiple times and I even excluded every .c from build, but without success. I already checked the whole library for the unresolved keywords but it seems that the places where these errors come from, is the place of the first occurrence of the keyword at all.

Some of the messages:

[...]
Type 'chtype' could not be resolved dialog.h
Type 'WINDOW' could not be resolved dialog.h
[...]

My question is: obviousely I'm doing something wrong. Have I included to less files into my project or am I missing system wide libraries ?

Does anyone know a tutorial to step into lxdialog or at least knows how to solve these erros?

Thanks for your support

Kind Regards

2 Answers 2

5

You are, most likely, abusing lxdialog. That is supposed to be used only together all other configuration stuff.

If You really need a configuration tool to be used at compile time (i.e.:"make menuconfig && make all") then you will find documentation to make kconfig work for you in kernel/Documentation/kconfig directory (and other places, but You need to search for kconfig, not lxdialog!).

If You need a generic dialog interface instead (e.g.: as found in various debian configurators) You would be much better off using plain dialog available in all major distributions. You will find a lot of documentation for dialog (including at "http://invisible-island.net/dialog/dialog.html").

0

I found out how to remove all the errors: The unresolved keywords are because the curses.h is not included, at the very beginning of the dialog.h there's a code block, that should be edited this way:

#ifdef __sun__
#define CURS_MACROS
#endif
#include <curses.h>

Additionally, the project needs to be compiled with curses. If Eclipse was used, in:

Project Settings -> 
C/C++ Build      ->
Settings GCC     -> 
C++ Linker       -> 
Libraries

simply type curses to the Libraries (-l). In a ordinary makefile this would be an g++ [...] -lcurses

Anyway:

Now, that lxdialog is ready to use I'm still looking for some documentation or tutorials.

AFAI have looked into the code it is not as generic as I wished it to be, when it comes to filling the menus with own text/entries/submenus/choices. It's pretty much focused on reading only kconfig files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.