Sponsored Content
Full Discussion: Linker (ld)
Top Forums UNIX for Dummies Questions & Answers Linker (ld) Post 34288 by rajashekaran on Friday 14th of February 2003 03:00:37 AM
Old 02-14-2003
Linker (ld)

hai
I have installed Linux 7.0 on my system and i have an doubt the
linker
i ran simple hello.c program with gcc compiler
gcc -c hello.c
i want linker to produce the output
so i put on the command line as

ld first.o -lc

but it is not running ver properly
but there is an warning:
entry symbol _start not found
please rectify my error
i tried this option also
ld -o output /lib/crt1.o hello.o -lc
a waring comes " file format not recognized "
please rectify above errors
Thanx
 

10 More Discussions You Might Find Interesting

1. Programming

Linker error when using vector's

using SUN C++ I have a problem when I do a push_back on a vector. The linker gives me a undefined symbol error on __cxa_end_catch. Any ideas, is there a library to include? Thanks Chris (1 Reply)
Discussion started by: CDurkin
1 Replies

2. HP-UX

dynamic linker error

Hi All Could anyone help in giving a little background to the following runtime error. /usr/lib/pa20_64/dld.sl: Mmap failed due to errno: 13. Seen when executing a 64-bit ELF executable. Thanks Ed (3 Replies)
Discussion started by: C3000
3 Replies

3. UNIX for Advanced & Expert Users

LD linker define symbol

Hi, I want to define a symbol in my code as: extern int Address; and then I'd like to define the symbol value in linker (ld) script file, so each time I change the hardware, I don't need to redefine the value in code, just use different linker script. I've gone through ld reference and didn't... (3 Replies)
Discussion started by: lzwierko
3 Replies

4. Linux

G++ Linker Error

Hi All, I m new to this group. I m facing one problem during my linking of CPP code at Linux env. after compliation i m getting error "undefined reference to ....." Please anyone help me to resolve this error. Regards, ASR make: Leaving directory /fwk' echo g++ -o server ... (1 Reply)
Discussion started by: ASRRAJ
1 Replies

5. HP-UX

Hp-ux linker option -c

Hi, The necessary symbols in a shared library can be exported to the application using linker option --version-script in Linux. The same can be done in Hp-ux using linker option +e. This can also be done by listing all the global symbols with +e in a file with linker option ld -c filename in... (0 Replies)
Discussion started by: roopa_v
0 Replies

6. Programming

GCC: Choose my own linker

Hi, I do not use the default linker, and instead us another one and pass this argument -Wl,--dynamic-linker=<path to linker> to gcc when compiling. However, what happens if the linker is not under /lib and /lib64 and I am not able to create a symlink to the linker in /lib or /lib64 due to no... (2 Replies)
Discussion started by: Shompis
2 Replies

7. Programming

gcc linker address

Hai, I have two (Pgm1.c and Pgm2.c) simple programs, which is compiled using gcc. Now we have two exe's (Pgm1 and Pgm2). When i executed the nm Pgm1 and nm Pgm2, in the listed symbols the address of main is same for both programs (08048344 T main) at run time also. Doubt: 1) What is this... (3 Replies)
Discussion started by: rajamohan
3 Replies

8. Programming

AIX linker oddities...what is going on?

I've tried to figure out what the linker is smoking in AIX to no avail...so I'm trying to find a little information to see why it's being inconsistent. I have the following code in a shared library, it doesn't do anything useful, it's just there to exercise functions in a few system libraries: ... (11 Replies)
Discussion started by: DreamWarrior
11 Replies

9. Solaris

runtime linker errors

Hey guys I have a solaris 10 OS, with a zone configured. In that zone, I am trying to install an Oracle Client. However, when I run the oracle installer, I get the following error: ld.so.1: java: fatal: libexpat.so.0: open failed: No such file or directory ld.so.1: java: fatal:... (2 Replies)
Discussion started by: goodvikings
2 Replies

10. Solaris

Runtime Linker Problems ld.so.1

Hello all, I am releatively new to Solaris and I am the System administrator for my branch at the FAA. This is the first time I can say I have really messed something up thankfully. My issue came up after installing and uninstalling Oracle Secure Backup which i felt I needed to do a clean... (7 Replies)
Discussion started by: jbirkes
7 Replies
sdl-config(1)						      General Commands Manual						     sdl-config(1)

NAME
sdl-config - script to get information about the installed version of SDL SYNOPSIS
sdl-config [ --prefix= DIR] [ --exec-prefix= DIR] [ --version ] [ --libs | --library-libs | --plugin-libs ] [ --cflags ] DESCRIPTION
sdl-config is a tool that is used to configure and determine the compiler and linker flags that should be used to compile and link pro- grams, libraries, and plugins that use SDL. It is also used internally by the m4 macros that are included with SDL. OPTIONS
--cflags Print the compiler flags that are necessary to compile a program or library that uses SDL. --exec-prefix=DIR If specified, use DIR instead of the installation exec prefix that SDL was build with when computing the output for the --cflags, --libs, --library-libs, and --plugin-libs options. This option must be specified before any of the --cflags, --libs, --library- libs, and --plugin-libs options. --libs Print the linker flags that are necessary to link a program that uses SDL. --static-libs Print the linker flags that are necessary to statically link a program that uses SDL. --library-libs Print the linker flags that are necessary to link a library that uses SDL. (This excludes any static objects required for linking, since these must be linked only by executable programs.) --plugin-libs Print the linker flags that are necessary to link an SDL-using object that is to be accessed via dlopen(3). This may include static objects with PIC symbol information. This option should not be used for ordinary shared libraries or standalone applications. --prefix=DIR If specified, use PREFIX instead of the installation prefix that SDL was built with when computing the output for the --cflags, --libs, --library-libs, and --plugin-libs options. This option is also used for the exec prefix if --exec-prefix was not specified. This option must be specified before any of the --cflags, --libs, --library-libs, and --plugin-libs options. --version Prints the currently installed version of SDL on standard output. EXAMPLES
gcc -o main.o $(sdl-config --cflags) main.c is how you might use sdl-config to compile a C source file for an executable program. gcc -o my_app $(sdl-config --libs) main.o util.o is how you might use sdl-config to link compiled objects into an executable program. gcc -o libSDL_nifty-1.2.so.0.0.1 $(sdl --library-libs) read.o write.o munge.o is how you might use sdl-config to link compiled objects into a shared library. gcc -o libnifty_xmms.so $(sdl --plugin-libs) stream.o blit.o deinterlace.o is how you might use sdl-config to link compiled objects into a plugin for use by another program. AUTHOR
The Simple DirectMedia Layer (SDL) library was written by Sam Lantinga. This manual page was written by Branden Robinson, originally for Progeny Linux Systems, Inc., and the Debian Project. SDL 1.2 2001-12-25 sdl-config(1)
All times are GMT -4. The time now is 08:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy