The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
need some info about symbolic link and hard link detective linux UNIX for Dummies Questions & Answers 2 01-08-2008 04:36 AM
link a library compiled with SC 5.9 on a machine with SC5.8 sarastus SUN Solaris 2 12-19-2007 01:14 PM
Link error while linking a shared library in unix arunkumar_mca UNIX for Dummies Questions & Answers 3 02-15-2007 06:59 AM
Difference between hard link and soft link in unix RAJACHOKALINGAM UNIX for Dummies Questions & Answers 2 08-01-2006 01:10 AM
Differences between hard link and soft link penguin-friend UNIX for Advanced & Expert Users 3 03-08-2002 12:49 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 06-21-2004
Registered User
 

Join Date: Jun 2004
Posts: 6
use gcc and link with a library

Hello,

J have a problem when I use gcc:
This comand works:
gcc -shared -fpic -I/usr/include/sys -I/usr/include -L/usr/lib/librt.sl essai1.c mylib.sl

but

gcc I/usr/include/sys -I/usr/include -L/usr/lib/librt.sl essai2.c -o essai
don't work.

The first command creates a dynamique library and link the library librt.sl
The second commad creates an executable file using the library librt.sl.
In this library are defined the functions mq_open mq_send etc.. that I use in essai.c, but when I launc this command I have the following message:
/usr/ccs/bin/ld : Unsatisfied symbols
mq_send(code)
mq_open(code)
mq_close(code)l
collect2: ld returned 1 exit status.

Some can help me Thank a lot !
Fréderic
Reply With Quote
Forum Sponsor
  #2  
Old 06-21-2004
Registered User
 

Join Date: Jun 2004
Posts: 6
Thumbs up

Thanks you it works !
Frederic.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 06:39 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0