Sponsored Content
Operating Systems Solaris Teach me about dynamic libraries Post 302984550 by apmcd47 on Thursday 27th of October 2016 06:35:57 AM
Old 10-27-2016
Quote:
Originally Posted by DerfMan

Sorry, I don't usually use GCC to build my programs, I use Make (which calls GCC to compile them). I am using GNU GCC 4.6.3. So to be clear, I go back to the directory with my make file, and instead of re-running
Code:
Make

and
Code:
Make install

I would run
Code:
gcc -WI,-rpath,"/usr/sfw/lib"

?
How would I install it then, can I run 'make install'?
Sorry, I didn't notice your reply until now.
YOu edit the Makefile to add the rpath snippet either to the LDFLAGS variable or directly to the line that builds the binary. You should find a pair of lines like this:
Code:
apcupsd:  $(OBJS)
          $(CC) ... -o apcupsd ...

If the library is explicitly mentioned (rather than being hidden in say $(LIBS)) put it just before that:
Code:
... -Wl,-rpath,"/usr/sfw/lib" -lusb ...

You then use make and make install as before
Andrew
 

6 More Discussions You Might Find Interesting

1. Programming

school or teach myself?

I want to learn c lenguage and am wonder if is better if i go to a school or teach myself, or there is no to much diference? Thank you (9 Replies)
Discussion started by: nobody
9 Replies

2. UNIX for Dummies Questions & Answers

libraries

I am slowly ploughing my way through the list of links to on-line tutorials you provided to newbies. I for one am grateful for such a comprehensive list, so first of all thank you for that. What i cannot seem to find, is information on C++ libraries: The two links on libraries in your list... (0 Replies)
Discussion started by: pil888
0 Replies

3. UNIX for Advanced & Expert Users

What to teach the new guy

so I have taken on the task of running a few workshops / teaching sessions. we have three new unix people, they have the basics sorted, CD, PWD, LS and such. we are looking at people who have been doing helpdesk untill two months ago. I have given them a few session: file systems, what... (2 Replies)
Discussion started by: robsonde
2 Replies

4. UNIX for Advanced & Expert Users

Sql dynamic table / dynamic inserts

I have a file that reads File (X.txt) Contents of record 1: rdrDESTINATION_ADDRESS (String) "91 971502573813" rdrDESTINATION_IMSI (String) "000000000000000" rdrORIGINATING_ADDRESS (String) "d0 movies" rdrORIGINATING_IMSI (String) "000000000000000" rdrTRAFFIC_EVENT_TIME... (0 Replies)
Discussion started by: magedfawzy
0 Replies

5. Programming

I want to know some c libraries

I'm a rookie to C and i'm looking for some libraries to learn,something likes the C++ STL or Boost ,does any1 can tell me some of them?Thanks a lot:) Eric (3 Replies)
Discussion started by: homeboy
3 Replies

6. Homework & Coursework Questions

I have here my assignment can any one teach me please

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: Is to compute for the discount of the two variables of TODDLER and KID 2. Relevant commands, code, scripts,... (3 Replies)
Discussion started by: stephanielana1
3 Replies
IRSEND(1)								FSF								 IRSEND(1)

NAME
irsend - basic LIRC program to send infra-red commands SYNOPSIS
irsend [options] DIRECTIVE REMOTE CODE [CODE...] DESCRIPTION
Asks the lircd daemon to send one or more CIR (Consumer Infra-Red) commands. This is intended for remote control of electronic devices such as TV boxes, HiFi sets, etc. DIRECTIVE can be: SEND_ONCE - send CODE [CODE ...] once SEND_START - start repeating CODE SEND_STOP - stop repeating CODE LIST - list configured remote items SET_TRANSMITTERS - set transmitters NUM [NUM ...] SIMULATE - simulate IR event REMOTE is the name of a remote, as described in the lircd configuration file. CODE is the name of a remote control key of REMOTE, as it appears in the lircd configuration file. NUM is the transmitter number of the hardware device. For the LIST DIRECTIVE, REMOTE and/or CODE can be empty: LIST "" "" - list all configured remote names LIST REMOTE "" - list all codes of REMOTE LIST REMOTE CODE - list only CODE of REMOTE The SIMULATE command only works if it has been explicitly enabled in lircd. -h --help display usage summary -v --version display version -d --device use given lircd socket [/var/run/lirc/lircd] -a --address=host[:port] connect to lircd at this address -# --count=n send command n times EXAMPLES
irsend LIST DenonTuner "" irsend SEND_ONCE DenonTuner PROG-SCAN irsend SEND_ONCE OnkyoAmpli VOL-UP VOL-UP VOL-UP VOL-UP irsend SEND_START OnkyoAmpli VOL-DOWN ; sleep 3 irsend SEND_STOP OnkyoAmpli VOL-DOWN irsend SET_TRANSMITTERS 1 irsend SET_TRANSMITTERS 1 3 4 irsend SIMULATE "0000000000000476 00 OK TECHNISAT_ST3004S" FILES
/etc/lirc/lircd.conf Default lircd configuration file. It should contain all the remotes, their infra-red codes and the corresponding timing and wave- form details. DIAGNOSTICS
If lircd is not running (or /var/run/lirc/lircd lacks write permissions) irsend aborts with the following diagnostics: "irsend: could not connect to socket" "irsend: Connection refused" (or "Permission denied"). SEE ALSO
The documentation for lirc is maintained as html pages. They are located under html/ in the documentation directory. lircd(8), mode2(1), smode2(1), xmode2(1), irrecord(1), irw(1), http://www.lirc.org. irsend 0.8.7pre1 May 2010 IRSEND(1)
All times are GMT -4. The time now is 02:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy