if the C++ compiler on your system is Gnu C++ then use
and the executable will be in the file "myprogram", if you look at the file attributes you will notice the compiler (linker actually) has already made the file as an executable (+x).
Write a shell script (to run on the Bourne shell) that runs an infinite loop to check every 5 seconds to report on who logs into and who logs out of a UNIX system. Without loss of practical significance of this little utility, we can ignore multiple logins from the same user during a time period of... (1 Reply)
Hi,
I wanted to know if i can write a program using switches and signals, etc to trace execution of other unix program which calls c program internally.
If yes how? If not with signals and switches then are there any other methods apart from debugging with gdb/dbx. (3 Replies)
Hello Geniuses of the unix world. please help, stupid chemist. I have the following script that I need to create a file. Doesnt make sense unless i explain this way: I need to create a file called summary.in I would like all these lines to be inserted however in the command line I would like the... (1 Reply)
I have made use of 'valgrind' and -finstrument-functions compiler option for debugging / analyzing code. Both the options lets us know the line / file being executed to some extent.
Is there a generic way that lets program dump the file:line it is getting executed dumped to a log file during... (3 Replies)
I am trying to understand a program in a book and this program suppose to call other programs which are in the same folder, the other programs are called 'lu' and 'add' but for some reason when it gets to the last line of each case to call these programs there is an error message saying
./rolo:... (2 Replies)
//Find the root of the equation (x^2)-2 by bisection method.
#include<iostream>
using namespace std;
double a,x;
double f(double x)
{
return ((x*x)-2);
} //Suppose the function is (x*x)-2.
void calcx(double a1,double b1)
{
x =... (2 Replies)
I need UNIX scripts for polling, Uncompressing files and moving files between directory. Also trying to save file paths and any other variables in an independent file (.env) and use these at runtime by executing this file in the main script. (3 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
1. Create a series of commands for a grading program.
Create a grades file. Put a "tab" between the name and... (7 Replies)
Here's the assignment. I'll bold the parts that are rough for me. Unfortunately, that's quite a bit lol. The syntax is, of course, where my issues lie, for the most part. I don't have a lot of programming experience at all :/. I'd post what I've already done, but I'm so lost I really don't know... (1 Reply)
Discussion started by: twk101
1 Replies
LEARN ABOUT NETBSD
genassym
GENASSYM(1) BSD General Commands Manual GENASSYM(1)NAME
genassym -- emit an assym.h file
SYNOPSIS
genassym [-c] [-f] C compiler invocation
DESCRIPTION
genassym is a shell script normally used during the kernel build process to create an assym.h file. This file defines a number of cpp con-
stants derived from the configuration information genassym reads from stdin. The generated file is used by kernel sources written in assem-
bler to gain access to information (e.g. structure offsets and sizes) normally only known to the C compiler.
Arguments to genassym are usually of the form ${CC} ${CFLAGS} ${CPPFLAGS} where ${CC} is the C compiler used to compile the kernel, while
${CFLAGS} and ${CPPFLAGS} are flag arguments to the C compiler. The script creates a C source file from its input. Then the C compiler is
called according to the script's arguments to compile this file.
Normally genassym instructs the C compiler to create an assembler source from the constructed C source. The resulting file is then processed
to extract the information needed to create the assym.h file. The -c flag instructs genassym to create slightly different code, generate an
executable from this code and run it. In both cases the assym.h file is written to stdout. The -f flag instructs genassym to create forth
code.
DIAGNOSTICS
Either self-explanatory, or generated by one of the programs called from the script.
SEE ALSO genassym.cf(5)HISTORY
The genassym command appeared in NetBSD 1.3 as ``genassym.sh'' in /usr/src/sys/kern. It became a userland utility in NetBSD 4.0.
BSD April 13, 2010 BSD