HELP :: ERRORS IN C 
Author Message
 HELP :: ERRORS IN C

Hi! all,

I had been trying to run a C program and ended up with the following
errors. Can anyone kindly help me in overcomming(where to look in the
code)these errors.
==========================================================================
ERRORS are as follows:::::::::::::

ld.so.1: /packages/envi/idl_5.5/bin/bin.solaris2.sparc/idl:

fatal: relocation error:file
/users/geomatics/casi/idl_hdf/call_tst/my_program.so:

symbol vector: referenced symbol not found

              Killed
========================================================================
what is the meaning of a relocation error?
how can i make the referenced symbol available?

im using 'gcc' and my compilation command looks as follows:::
==========================================================================
gcc -fpic -shared -o my_program.so my_program.c -lm
-L/mydirectory_for_object_ files
-I/mydirectory_for_included_header_files
==========================================================================

Any help is greatly appriciated

RC



Tue, 23 Nov 2004 20:03:46 GMT  
 HELP :: ERRORS IN C

Quote:
>I had been trying to run a C program and ended up with the following
>errors. Can anyone kindly help me in overcomming(where to look in the
>code)these errors.
>==========================================================================
>ERRORS are as follows:::::::::::::

>ld.so.1: /packages/envi/idl_5.5/bin/bin.solaris2.sparc/idl:

>fatal: relocation error:file
>/users/geomatics/casi/idl_hdf/call_tst/my_program.so:

>symbol vector: referenced symbol not found

>              Killed
>========================================================================
>what is the meaning of a relocation error?

You don't really care, as a C programmer.  What is important is the actual
problem being reported: the symbol vector, directly or indirectly used by
your program, was not found.

Quote:
>how can i make the referenced symbol available?

If it was supposed to be defined by your code, by defining it.
If it was supposed to come from a library, by including that library on
the command line that builds the executable file.

Dan
--
Dan Pop
DESY Zeuthen, RZ group



Tue, 23 Nov 2004 22:58:34 GMT  
 HELP :: ERRORS IN C
Quote:

> >==========================================================================
> >ERRORS are as follows:::::::::::::

> >ld.so.1: /packages/envi/idl_5.5/bin/bin.solaris2.sparc/idl:

> >fatal: relocation error:file
> >/users/geomatics/casi/idl_hdf/call_tst/my_program.so:

> >symbol vector: referenced symbol not found

> >              Killed
> >========================================================================

Hi Dan,

Quote:
> If it was supposed to be defined by your code, by defining it.
> If it was supposed to come from a library, by including that library on
> the command line that builds the executable file.

i have tried to compile my program following your suggestion to
include the object file in the command line. I still could not
succeed. my compilation line looks as follows
================================================================================
gcc -fpic -shared -o myprogram.so myprogram.c vector.o
-L/myObjectFileDirectory
================================================================================

vestor.o is the object file which was generated for the program which
contains the function vector and i have included the -L option hoping
that it will check for this object file incase it misses its link
which i made in the current directory. Please do let me know how i can
make this object file available to my program in a much reliable way.

thanks in advance

RC



Thu, 25 Nov 2004 00:51:10 GMT  
 HELP :: ERRORS IN C

Quote:

>> >==========================================================================
>> >ERRORS are as follows:::::::::::::

>> >ld.so.1: /packages/envi/idl_5.5/bin/bin.solaris2.sparc/idl:

>> >fatal: relocation error:file
>> >/users/geomatics/casi/idl_hdf/call_tst/my_program.so:

>> >symbol vector: referenced symbol not found

>> >              Killed
>> >========================================================================
>Hi Dan,

>> If it was supposed to be defined by your code, by defining it.
>> If it was supposed to come from a library, by including that library on
>> the command line that builds the executable file.

>i have tried to compile my program following your suggestion to
>include the object file in the command line. I still could not
>succeed. my compilation line looks as follows
>================================================================================
>gcc -fpic -shared -o myprogram.so myprogram.c vector.o
>-L/myObjectFileDirectory
>================================================================================

>vestor.o is the object file which was generated for the program which
>contains the function vector and i have included the -L option hoping
>that it will check for this object file incase it misses its link
>which i made in the current directory. Please do let me know how i can
>make this object file available to my program in a much reliable way.

Write the *minimal* program reproducing your problem and post it here.

Dan
--
Dan Pop
DESY Zeuthen, RZ group



Fri, 26 Nov 2004 21:04:42 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Compiler error CS 1595 - Help

2. Newbie: separate big .cs file into small .cs files

3. newbe/cs student, need help w/ code

4. Help!!! Novice CS Advice

5. How to show/call Form2.cs from Form1.cs ?

6. help please error c2059 token error.

7. ADO error IDispatch error #3081 ,what mean ? help

8. Help with compiler error: fatal error LNK1169: one or more multiply defined symbols found

9. HELP bus error(alignment error)

10. Help! Link error: Internal error during IdentifyAssignedOrdinals

11. Include code in other Cs files

12. Reuse of cs files, namespace, arch advice pls

 

 
Powered by phpBB® Forum Software