![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| re-compiling | aViking | UNIX for Advanced & Expert Users | 5 | 03-21-2006 07:44 AM |
| compiling with aix 5.1 | n-may | AIX | 1 | 05-24-2004 11:17 PM |
| compiling | Blunt_Killer | High Level Programming | 1 | 09-28-2001 08:10 PM |
| compiling qt | nydel | UNIX for Dummies Questions & Answers | 2 | 08-03-2001 05:14 PM |
| compiling | nydel | UNIX for Dummies Questions & Answers | 3 | 08-02-2001 10:28 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Compiling with Dll in HP Ux
Hi all,
I had trouble compiling my application with a custom dll, the error appear to be some undefined reference to the functions i had created in my dll. Is there a need to update any environmental variable such as LD_LIBRARY_PATH as in linux system. Please advise. One more thing is do anyone happen to have a copy of a makefile using c89 compiler? |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
1. Firstly are you on a SOM(32 bit PA-RISC) or ELF(64 bit PARISC or Itanium2) system2?
if ELF then form is "libXXXX.so[.major[.minor]] else SOM form is "libXXXX.[sl | [.major[.minor]]]" 2. With HPUX it is very lazy and will happily let you build programs with undefined references. Compile code position independent with c89 use "+z" wiht gcc use "+fPIC" Building a shared library... Code:
ld objects[....] \
-o filename \
-b \
+s \
+b libpaths\
-B symbolic \
+h soname \
+e export [...] \
-lpthread -lc
With HPUX the path is "SHLIB_PATH" for SOM or "LD_LIBRARY_PATH" for ELF. -o tells it what file to write to -b says build a shared library -B binding options for symbols +b list of paths to look in when loading +e exports one symbol, repeat for each symbol +h like ELF's soname +s can use environment vars for loading Last edited by porter; 11-13-2007 at 09:08 AM. |
|
#3
|
|||
|
|||
|
Thks a lot.
|
|||
| Google The UNIX and Linux Forums |