Sponsored Content
Top Forums Programming beginner at C: Need help compiling/linking with gcc Post 65463 by My_Name on Saturday 5th of March 2005 07:48:43 AM
Old 03-05-2005
beginner at C: Need help compiling/linking with gcc

I'm trying to do something fairly simple but keep getting frustrating messages..
Here it is:
I have 3 files:
init.h <header>
init.c <#include <curses.h> and "init.h">
main.c <#include "init.h">

now, how can I compile my main.c using gcc?
( I have a hard time making the init.o)

thanks
 

10 More Discussions You Might Find Interesting

1. Programming

compiling and linking 2 C files ...??

Hi mates, I am trying to copile and link to C programs with command: cc file1,file2 but i raises the error "file not found" ... am i doing the right way? any suggestion will be appreciated. thanks abdul (4 Replies)
Discussion started by: abdul
4 Replies

2. Programming

dynamic linking in gcc

Hai Friends how to use dynamic library linking in gcc. I have create the library files and placed it in /lib directory and my program should refer to that library dynamically.. How do i do that.. Thanks in advance (0 Replies)
Discussion started by: collins
0 Replies

3. Programming

Linking with gcc

Forgive as I am new to the gcc compiler and to linux. I am trying to compile/link a program for the first time and am receiving an error complaining about the crtbegin.o file. I use the -v option and get the following: Using built-in specs. Configured with: ../configure --enable-threads=posix... (1 Reply)
Discussion started by: jbeauchamp
1 Replies

4. UNIX for Dummies Questions & Answers

errors compiling gcc 4.2.1

Hello, I have never had a successful compile on the 2.6 kernel. On every arch in which I try to compile gcc I get either "i686-pc-cygwin-ar command not found or "i686-suse-linux-ar command not found. This always happens during the make process after configure checks for ar and finds it's just ar.... (2 Replies)
Discussion started by: kwa71
2 Replies

5. Programming

gcc compiling with -DUSE_LONGLONG

Sorry for a silly question. I a program that need to compile with -DUSE_LONGLONG to turn on the long Int as the document of that program said so, but I really don't know how to do this. I normally do this: ./configure make make install and it works fine. But I don't know how to compile... (2 Replies)
Discussion started by: hiepng
2 Replies

6. Programming

probs compiling with gcc + lpthread

Im trying to write a program atm which uses mutexes to control thread access to a certain code section ( the critical section). However, whenever I compile the code using gcc I get the following message from gcc Unresolved text symbol "pthread_mutex_lock" Unresolved text symbol... (1 Reply)
Discussion started by: JamesGoh
1 Replies

7. Programming

gcc compiling error

I am using gcc to compile c objects on solaris 5.10 and hit the following error messages: /usr/include/sys/vfs.h:323: error: syntax error before "statvfs64_t" /usr/include/sys/vfs.h:334: error: syntax error before "statvfs64_t" gmake: *** Error 1 The c program files were copied over from... (3 Replies)
Discussion started by: med7006
3 Replies

8. Programming

Compiling and linking Shared Libraries.

I have one C program which contains a function call. I have been given some .so and .h files. I want to know how to compile and link the c program with .so files. I tried following: $ gcc My_program.c libCommon.so My_program.c: In function āmainā: My_program.c:11: warning: parameter names... (3 Replies)
Discussion started by: junaid.nehvi
3 Replies

9. SuSE

Problem compiling the kernel and linking problems in OpenSuse 12.3

Hi everyone I installed OpenSuse 12.3 and many development tools but when i propose build the kernel from the source (the first step make menuconfig) i saw this: HOSTLD scripts/kconfig/mconf /usr/lib64/gcc/x86_64-suse-linux/4.7/../../../../x86_64-suse-linux/bin/ld: warning: libdl.so.2,... (2 Replies)
Discussion started by: bacesado
2 Replies

10. UNIX for Beginners Questions & Answers

Compiling GCC 6.3.0 - Error with Library

First of all -- thanks for being patient with me. I hope I'm submitting this correctly. Also I haven't done UNIX Admin since the early 1990's. I'm actually a DBA. But, since I'm the one in the office with the UNIX experience, I'm the SA. I haven't been able to compile GCC 6.3.0 which I need... (9 Replies)
Discussion started by: PJ_Namias
9 Replies
init(8) 						      System Manager's Manual							   init(8)

NAME
init - Upstart process management daemon SYNOPSIS
init [OPTION]... DESCRIPTION
init is the parent of all processes on the system, it is executed by the kernel and is responsible for starting all other processes; it is the parent of all processes whose natural parents have died and it is responsible for reaping those when they die. Processes managed by init are known as jobs and are defined by files in the /etc/init directory. See init(5) for more details on configur- ing Upstart. Events init(8) is an event-based init daemon. This means that jobs will be automatically started and stopped by changes that occur to the system state, including as a result of jobs starting and stopping. This is different to dependency-based init daemons which start a specified set of goal jobs, and resolve the order in which they should be started and other jobs required by iterating their dependencies. For more information on starting and stopping jobs, as well as emitting events that will automatically start and stop jobs, see the manual page for the initctl(8) tool. The primary event is the startup(7) event, emitted when the daemon has finished loading its configuration. Other useful events are the starting(7), started(7), stopping(7) and stopped(7) events emitted as jobs change state. See upstart-events(7) for a summary of well-known events. System V compatibility The Upstart init(8) daemon does not keep track of runlevels itself, instead they are implemented entirely by its userspace tools. The event emitted to signify a change of runlevel is the runlevel(7) event. For more information see its manual page. OPTIONS
Options are passed to init(8) by placing them on the kernel command-line. --confdir directory Read job configuration files from a directory other than /etc/init. --no-sessions Disable user and chroot sessions. --no-startup-event Suppress emission of the initial startup event. This option should only be used for testing since it will stop the init(8) daemon from starting any jobs automatically. --session Connect to the D-Bus session bus. This should only be used for testing. --startup-event event Specify a different initial startup event from the standard startup(7). --verbose Outputs verbose messages about job state changes and event emissions to the system console or log, useful for debugging boot. NOTES
init is not normally executed by a user process, and expects to have a process id of 1. If this is not the case, it will actually execute telinit(8) and pass all arguments to that. See that manual page for further details. FILES
/etc/init.conf /etc/init/*.conf $HOME/.init/ AUTHOR
Written by Scott James Remnant <scott@netsplit.com> REPORTING BUGS
Report bugs at <https://launchpad.net/upstart/+bugs> COPYRIGHT
Copyright (C) 2009-2011 Canonical Ltd. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU- LAR PURPOSE. SEE ALSO
control-alt-delete(7) init(5) initctl(8) runlevel(7) startup(7) starting(7) started(7) stopping(7) stopped(7) telinit(8) upstart-events(7) Upstart 2011-04-06 init(8)
All times are GMT -4. The time now is 09:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy