Help with Linux linking error


 
Thread Tools Search this Thread
Operating Systems Linux Help with Linux linking error
# 1  
Old 01-09-2017
Help with Linux linking error

Hi,

Currently I am migrating codes from unix to Linux. When doing linking(ld) getting the below error.
Error is :ld: invalid BFD target `--shared'

Providing the script of the ld:
Code:
ld -b -G -o lib/libatk.so ./src/atk_db.o ./src/atk_gcl.o ./src/atk_options.o ./src/atk_exception.o ./src/atk_sqlexception.o ./src/atk_timeout.o ./src/atk_signal.o ./src/atk_semaphore.o -L../../../libcommon/lib -L../../../lib -L/logiciel/oracle/client_11203/lib -L../../../lib -L../../../../common/lib/liboratk/lib/ -L../../../../common/lib/liblog/lib/ -lutil -loratk -llog -lclntsh

all the objects files are complied successfully and available in the correct path.

Last edited by jrkar; 01-09-2017 at 06:17 AM.. Reason: adding tag for code
# 2  
Old 01-09-2017
The -b and -G options probably meant something completely different wherever this code came from, so I would look up what they meant on your old system. If they're not anything crucial, you can probably just delete them.

On GNU Linux, ld's -b parameter should be followed with a binary executable format, such as elf64-x86-64, and -G is an optimization option which is supposed to be followed by a size related to MIPS register mapping.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Programming

C++ Linking Error: invalid DSO for symbol

I am on a FreeBSD system trying to build a piece of software that I wrote. I had built it in the past but recently reinstalled FreeBSD. I am not sure what is going on. The software depends on and wxgtk2.8. Using g++: $ make g++ -c `wx-config --cxxflags`... (9 Replies)
Discussion started by: AntumDeluge
9 Replies

2. Programming

C program multiple definition error during linking time

Hi, I have the following files: // file.hvoid foo(); int i = 5; // should be just declared as extern int i; // file1.c#include <stdio.h> #include "file.h" void foo() { i = 10; printf("%d\n", i); } // file2.c#include <stdio.h> #include "file.h" int main() { foo(); (9 Replies)
Discussion started by: royalibrahim
9 Replies

3. Programming

Linking Linux Driver written in C with ASM module

Hi, I have got sample linux driver written in C. I got also some assembly code, compiled into .o file (using as compiler). In my Makefile I got: obj-m += someDriver.o someDriver-objs := CFile1.o CFile2.o ASMFile.o default: $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modulesUnfortunatelly I cannot... (0 Replies)
Discussion started by: Chrisdot
0 Replies

4. UNIX for Dummies Questions & Answers

is linking possible?

how would i link 2 files together? is it the same as copying? (1 Reply)
Discussion started by: trob
1 Replies

5. Solaris

linking in solaris9

at the end of the compilation in solaris 9. it is showing link error. like..... ld: fatal: library -lgthread-2.0 not found failed to create the binary the library is in /usr/lib and in /usr/local/lib the lib file is present --->libgthread.2.0.so ......etc if i remove... (3 Replies)
Discussion started by: biswajithit
3 Replies

6. Programming

Sun Studio C++ - Getting error in linking std::ostream &std::ostream::operator<<(std:

Hello all Im using CC: Sun C++ 5.6 2004/07/15 and using the -library=stlport4 when linkning im getting The fallowing error : Undefined first referenced symbol in file std::ostream &std::ostream::operator<<(std::ios_base&(*)(std::ios_base&))... (0 Replies)
Discussion started by: umen
0 Replies

7. Programming

dynamic linking

Hi, Could any one tell me solution for this. i have a library in my /usr/lib and latest in /myhome/lib/ (thay differ functionality symbols my application uses symbols from latest lib). when compile and link my application , every thing goes fine but when running the application ld... (4 Replies)
Discussion started by: Raom
4 Replies

8. UNIX for Dummies Questions & Answers

Link error while linking a shared library in unix

Getting the following error , ld: /opt/syncsort39/lib/libsyncsort.sl: Mismatched ABI. 64-bit PA shared library found in 32-bit link. Is there any difference in the ld options in opt file while linking a 64 bit shared library ? Or is the problem because we are trying to link both 32 bit and 64... (3 Replies)
Discussion started by: arunkumar_mca
3 Replies

9. Programming

Linking problem while linking to shared library

Hi I'm getting ld: fatal: option -h and building a dynamic executable are incompatible ld: fatal: Flags processing errors When I run ld -shared -L/usr/dt/lib -lDtSvc -o builtin.so Workspace.o after running gcc -fPIC -I/usr/X11R6/include -I/usr/dt/include -c Workspace.c I'm... (6 Replies)
Discussion started by: laho
6 Replies
Login or Register to Ask a Question