Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
Corona sent me home and our company has strict rules and I don't have access to the network (IBM mainframe). I'm learning to program in COBOL, C, DB2 environment.
COBOL calls C, C works with DB2.
I'd like to continue working from home but I'm not an administrator.
Do you have any guidence, tips and tricks on how to set up an environment for this in Ubuntu?
So far I have a couple of editors, DB2 installation, gcc, gnu cobol...
Stuck on the embedded sql precompiler...
gnucobol and gnucc both work with Db2-LUW on ubuntu linux.
You can build and run gnucobol programs that use embedded-SQL.
You can build and run gcc programs that use embedded-SQL via the preprocessor that comes with Db2-LUW, or which use the Db2 call level interface.
Each of these products has its own set of documentation pages online.
You have to spend time studying their respective documentation.
Stackoverflow is more suitable for specific programming questions.
You will get better answers if you learn to ask better questions that:
show your code fragment as plain text (not an image).
detail the environment and versions and tools that you use
show the command(s) you run (as plain text)
show the error output (as plain text) and mention the expected result
IBM's Db2-LUW has many example programs and simple build scripts (including for linux) that show how embedded SQL (used from C) can be used.
This was explained to you in January 2020, in answer to your previous question on the same topic.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
When I write scripts/programs, often I would like to pop up a simple text 'gui' to prompt for input:
How would I do this? For example from Shell, Ruby, Golang or C. I don't even know what this is called and Google isn't reponding to "text thingy from scripts".
(The example is from the Debian installer).
Actually, that is not dialog, but the newt library (there are a few differences in appearance). It is used by anaconda on Red Hat systems. The whiptail program uses the library, however it has no real relationship to anaconda.
Anaconda is mostly in Python; it uses the newt shared library (written in C) from a Python binding.
For learning it... documentation is largely non-existent. You have the source code.
Further reading:
screenshots for dialog
newt.git
anaconda.git
Any examples/documentation for python-newt (discussion of newt vs documentation)
Spicing up the Console for Fun and Profit, Part 2
In the past this was known as "Dialog," though as Thomas points out (as the maintainer of Dialog!!) this is no longer the case. This is most likely the Newt library. While you could certainly write something lower level using ncurses, Newt is available in Linux pretty much universally. Dialog can also be installed under Linux. You can read some basic documentation for it here.
Choosing to use this over a curses based approach allows you to focus on what it is you're actually looking to do rather than doing all of the work to build a UI. If, however, you are really looking to build UI elements, ncurses would be the way to go.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I started a while ago to learn the C language, and has spent several hours I search THE miracle software.
I am looking for software that import sources of software in C (files.c) and generates a "mind map" of the code with all files, functions, variables, etc ...
Do you know if it exists? It'll help me a lot to understand the architecture of complex software.
Thank you very much for all your answers.
Take a look at the "call graph". This sort of visualization should get you started.
As the comment suggests, Doxygen is a good open-source tool. Take a look at some output here. Doxygen is straight-forward to configure for call-graph generation under *nix. It's a little more complex for Windows. First, check out this SO post: how to get doxygen to produce call & caller graphs for c functions. Doxygen's HTML output provides a number of nice cross-referencing features (files, variables, structs, etc.) in addition to caller/callee graphs.
On the commercial side, Understand for C/C++ has first-rate visualization features. Google "c call graph diagram" for other commercial and open-source options.
Finally, there are some older SO posts, like this one Tools to get a pictorial function call graph of code. Take a look at it.
Look into the program ctags. It is an indexer of names and functions based on the structure of the programming language.
It is quite mature, and has integration with a number of other tools. I use it with an older (but very nice) text editor called vi, but it can be used independently from the command line.
It does not generate a graphical view of the connections. However, in my estimation there are probably too many connections in most C programs to display visually without creating a large amount of information overload.
This answer differs from Throwback's answer in some interesting ways. A call graph can mean a few things. One thing it can mean is the path a running program took through a section of code, and another is the combination of all paths a running program might take through the code, and another is the combination of all paths in the code (whether they can be reached or not).
Your needs will drive which tool you should use.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have been developing for Windows for a long time, mainly WinApi (and .Net).
I'v started learning basic Linux, and I have some questions regarding the differences:
In Windows I have barely used the C Standard library.
If I needed an API, I would search MSDN and find the appropriate library\function.
From what it seems like, in Linux the C Standard library is EVERYTHING.
All the code samples I have seen used the standard library (Instead of using some Linux internal functions, like a Linux "CreateFile").
Is this really how writing "proper" linux code is done ? Using the C standard library ?
If I wish to read a file, or allocate memory are fopen\malloc the way to go ?
If the answer to my first question is yes (And I guess it will be)
The C standard library is POWERLESS compared to the powerful WinApi.
Lets say I wish to get a list of running process (CreateToolhelp32Snapshot) or create a thread or a process (CreateThread\CreateProcess), How should I do that in Linux ?
Documentation.
In Windows, all I need can be found in MSDN.
If I have a "how do I do" question (Like the questions above) where should I go ?
Where is my main source of documentation.
Thanks a lot,
Michael.
Perhaps you've forgotten that the Standard C Library isn't environment-specific, it specifies least-common-denominator functionality among all systems that can run C programs, and C runs on systems that don't even have processes.
If you want an API that provides consistent common GUI/multithread/etc. APIs, pick a likely-looking GUI/multithread/etc. API. You might start with Qt, it's quite comprehensive and produces good-looking, near-native UIs on a host of systems.
It's not generally considered polite to point this out, but most questions that get asked publicly are asked by people who lack the discipline to do even simple research. Once people can do that, they don't need to ask very many, and that's why what you see is so ... trivial. You're past that. For more options, you could start here.
For more general-purpose tools, the top hit on a search for important linux tools might be helpful.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Hey guys, Myself and 2 fellow software engineer students are tasked to reverse engineer the gawk program. We need to create diagrams representing the structure, and answer questions about the program.
http://directory.fsf.org/project/gawk/
We are looking for simple to use reverse engineering tools for C programs. Our instructor has given us the following three tools as examples of what we should use, but we simply are having a huge problem getting them to work. Do you have any alternative solutions, or perhaps some good documentation on one of the following tools to help us out? Thanks!
PBS: http://www.swag.uwaterloo.ca/pbs/
RIGI: http://www.rigi.csc.uvic.ca/Pages/download.html
Shrimp: http://www.thechiselgroup.org/shrimp
This graphic is supposed to help understand a simple C list? http://www.rigi.cs.uvic.ca/downloads/demos/list-d/ls7.html
I strongly suggest ignoring those programs and start reading the code.
Reading the code can be vastly simplified if you have good tools to help; vim with etags and cscope is my preferred tool, with the GNU id utils tools coming in as occasionally handy.
Emacs users will probably stick closely with just etags.
The Eclipse IDE can probably help you navigate through code too. I've never tried it, but enough people love it so I hope it has some nice functionality.
People often find it easy to give exact URLs to locations in Linux source code using the lxr tool, e.g.: http://lxr.linux.no/#linux+v2.6.37.1/security/apparmor/lsm.c#L294 -- this system requires very little on individual client machines, which means you only need to configure it once as a server and all your classmates can benefit from it.
As first, you can use IDA Pro under linux. For more information of reversing tools, see https://www.apriorit.com/dev-blog/366-software-reverse-engineering-tools.
Binutils includes next reversing tools:
file;
nm;
size;
strings;
ldd;
readelf.
Objdump – disassembler. It shows header of a program, sections of file (flag -х). Disassemble file (flag -D). It shows body of sections in hex view (flag -s).
EDB. It is like OllyDbg, but under Linux.
HTE. Сonsole editor with more functions. It can disassemble files, supports cross-reference links, set functions’ name.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm using Strawberry Perl which includes MinGW's GCC, I'm also making use of the GNU debugger GDB and Subversion. How can I have a single development environment that would suit this (other than just UltraEdit, the command shell and IE), and how can I further enhance its features?
I'd have a good look at Eclipse if I were you! Then have a look at the EPIC IDE Plug-in.
Subversion integrates quite nicely with that IDE via Tortoise SVN or even better as mentioned in one of the comments by Davide Gualano, Subversive.
Personally i'm using Komodo IDE from ActiveState. Komodo Edit might suit your needs and is its free alternative.
You can use emacs for windows.
http://www.gnu.org/software/emacs/windows/ntemacs.html
Have you tried Notepad++? It's mostly an "all stops pulled out" text editor with code highlighting for every language you can think of. But, it does have a pretty amazing macro / external command / extension thing, so hooking it up to a compiler is pretty easy.
I'm currently using it for C, Inform, Python, Perl, HTML, and VB.Net, with surprisingly few issues when shifting gears.
Also, FOSS.
(and, I've just discovered that it has code completion as well. Excellent!)
msvc 6 will do the job quite nicely.
my perl is installed at c:\perl\bin so...
under the custom menu, create a new tool.
command c:\perl\bin\perl.exe
arguments -w $(FileName)$(FileExt)
initial directory $(FileDir)
check the Use Output Window.
create a button on your tool bar, to run the tool.
The perl output will come out in the output window.
I'm no Windows developer or IDE user by a long shot, but the combination of Cygwin (for all the handy Unix tools and a better shell) and emacs does the job when I have to work on Windows.
Personally, I'm happily using SciTE for C, C++, Perl and Python development on Windows. Using a single tool has a lot of advantages for me - as becoming expert in it improves my productivity in all languages. SciTE has a built-in scripting language, and is also quite easy to combine it with external scripting, so it's extensible beyond imagination - and that using quite standard tools.