LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-24-2005, 07:11 PM   #1
bahadur
Member
 
Registered: Apr 2004
Distribution: Linux Red Hat
Posts: 141

Rep: Reputation: 15
linker problem


hello every one.

i am using cmake to compile a program.

the cmake generates a make file which look like this

Code:
usr/bin/ld -L/usr/lib/condor -Bstatic --eh-frame-hdr -m elf_i386 -export-dynamic 
-dynamic-linker /lib/ld-linux.so.2 -o
 /nfs/mid/homes/sah006/condor_app/vtkCISG/Output/bin/vtkSegProp
/usr/lib/condor/condor_rt0.o /usr/lib/gcc-lib/i486-linux/3.3.5/../../../crti.o
 /usr/lib/gcc-lib/i486-linux/3.3.5/crtbeginT.o vtkSegProp.o
 -L/usr/local/lib/vtk_4.2.6 
-L/nfs/mid/homes/sah006/condor_app/vtkCISG/Output/lib 
-L/nfs/mid/homes/sah006/condor_app/vtkCISG/Output 
-L/nfs/mid/homes/sah006/condor_app/vtkCISG/Output/objects/library -L. -L./lib
 -L/usr/X11R6/lib -L/usr/lib/condor -L/usr/lib/gcc-lib/i486-linux/3.3.5 
-L/usr/lib/gcc-lib/i486-linux/3.3.5/../../.. 
-L/nfs/mid/homes/sah006/condor_app/vtkCISG/Output/lib -lvtkPatented 
-lvtkCISGFile -lvtkCISGProcessing -lvtkCISGTransform -lvtkCISGVisualization
-lvtkCISGRegistration -lvtkCISGRegistration_ND -lmhLib -lvtkCISGRegistration 
-lvtkCISGVisualization -lvtkCISGFile -lvtkHybridTCL -lvtkRenderingTCL 
-lvtkGraphicsTCL -lvtkImagingTCL -ltk8.3 -lvtkIOTCL -lvtkFilteringTCL 
-lvtkCommonTCL -ltcl8.3 -lvtkCISGProcessing -lvtkCISGTransform -lvtkPatented
 -lvtkPatented -lvtkHybrid -lvtkRendering -lvtkGraphics -lvtkImaging -lSM -lICE 
-lSM -lICE -lX11 -lXext -lX11 -lXext -lvtkftgl -lGLU -lGL -lvtkfreetype -lXt -lSM -lICE 
-lX11 -lXext -lvtkIO -lvtkFiltering -lvtkpng -lvtktiff -lvtkzlib -lvtkjpeg -lvtkexpat
 -lvtkCommon -lpthread -ldl -rpath 
/usr/local/lib/vtk_4.2.6:/nfs/mid/homes/sah006/condor_app/vtkCISG/Output/lib:
/nfs/mid/homes/sah006/condor_app/vtkCISG/Output:/nfs/mid/homes/sah006/condor_app/vtkCISG/Output/objects/library:.:.
/lib:/usr/X11R6/lib /usr/lib/condor/libcondorzsyscall.a 
/usr/lib/condor/libcondor_z.a /usr/lib/condor/libcomp_libstdc++.a 
/usr/lib/condor/libcomp_libstdc++.a -lm /usr/lib/condor/libcomp_libgcc.a 
/usr/lib/condor/libcomp_libgcc_eh.a -lcondor_c -lcondor_nss_files 
-lcondor_nss_dns -lcondor_resolv -lcondor_c -lcondor_nss_files
 -lcondor_nss_dns -lcondor_resolv -lcondor_c /usr/lib/condor/libcomp_libgcc.a 
/usr/lib/condor/libcomp_libgcc_eh.a /usr/lib/gcc-lib/i486-linux/3.3.5/crtend.o 
/usr/lib/gcc-lib/i486-linux/3.3.5/../../../crtn.o
some how it gets stuck on the line where i try to link the first shared library.

it gives me the error that vtkPatented not found.

i have checked the path of the directories included and they are correct. some how ld is not able to include the directories and thats why it is not able to search for them.

can any one help.

Last edited by bahadur; 11-24-2005 at 07:13 PM.
 
Old 11-26-2005, 06:21 AM   #2
Ygrex
Member
 
Registered: Nov 2004
Location: Russia (St.Petersburg)
Distribution: Debian
Posts: 666

Rep: Reputation: 68
Try to assign the library explicitly by typing the full path and entire file name.
 
Old 11-26-2005, 06:34 AM   #3
bahadur
Member
 
Registered: Apr 2004
Distribution: Linux Red Hat
Posts: 141

Original Poster
Rep: Reputation: 15
hey that is the solution i eventually reached myself too.

condor_compile is nothing but a shell script which inserts some libraries for linking to the executables.

so instead of using condor_compile i can manually edit the command and insert the libraries into it.

the only problem is that the make file is generated by cmake and there are hundreds of makefiles like that which i have to edit.
 
Old 11-26-2005, 06:40 AM   #4
Ygrex
Member
 
Registered: Nov 2004
Location: Russia (St.Petersburg)
Distribution: Debian
Posts: 666

Rep: Reputation: 68
IMHO it is a disadvantage of cmake. Do not you intend to inform maintaners?
 
Old 11-26-2005, 06:43 AM   #5
bahadur
Member
 
Registered: Apr 2004
Distribution: Linux Red Hat
Posts: 141

Original Poster
Rep: Reputation: 15
the problem is with condor_compile script and yet i am going to inform them of this problem.

because the moment i remove the condor_compile keyword it works fine.

there is no problem with cmake.

it is condor_compile's problem
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
compile/linker problem with simple libipq code TheLinuxDuck Programming 7 05-06-2005 01:28 PM
LD linker code offset problem inuyaga Programming 0 09-25-2004 12:26 PM
openGL ,python and .bin linker problem in mdk9.1 ngan_yine Mandriva 0 12-14-2003 11:37 PM
QT Hello world linker problem digitized_funk Programming 0 10-19-2003 01:30 AM
Linker problem -lX11 Flibble Linux - Software 1 06-16-2003 01:39 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration