- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Shared library behavior
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2002 02:11 PM
08-28-2002 02:11 PM
Shared library behavior
The problem:
Some of the functions of the glut toolkit use user defined functions as arguments. These work well in a standard (non-library) C program, but are ignored when used in the shared library!
Standard C example:.
.
.
void display(void)
{
Code ......
}
int main(int argc, char** argv)
{
glutDisplayFunct(display);
}
In the shared lib:
void display(void)
{
Code....
}
void glmain(int arg1, char** arg2)
{
glutDisplayFunct(display);
}
The shared library (after much work on the Makefile)
works for all other functions called except these functions that are taking another function as an argument. I don't have a main function in the shared library, so it doesn't fit exactly the code examples in the toolkit, which I can modify all day long without a problem.
I am sure someone has run into this before. Please help!
Terr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2002 02:31 AM
08-29-2002 02:31 AM
Re: Shared library behavior
You did not mention how you link the application, or what the error looks like. Is is a coredump or unsatisfied symbols? Are you linking statically, dynamically, or are you loading the shared lib explicitly with shl_load()?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2002 06:01 AM
08-29-2002 06:01 AM
Re: Shared library behavior
cc -Ae +Z -I /opt/hp83000/f330/pws/lib -I /opt/hp83000/f330/prod_com/include -I /opt/hp83000/f330/com/include -I /opt/graphics/OpenGl/include -I /opt/X11R6incs/include -I /opt/X11R6includes/X11/Xmu -I /usr/include/Motif1.2 -I /opt/graphics/GLUT/include -b -c functions.c || (rm -f functions.o)
ld -a shared -B nonfatal -B symbolic -L/opt/hp83000/f330/prod_com/C++/lib -L/opt/graphics/GLUT/lib/glut -lglut -L/opt/graphics/OpenGL/lib -lGLU -lGL -L/usr/lib/X11R6 -lXmu -lXi -lXext -lXhp11 -lX11 -L/usr/lib/Motif1.2 -b -o libcifset.sl functions.o -dld -lMrm -Xm -lm
The library I am creating is libcifset, the source is functions.c; This compiles with no errors and all the source libraries are shared. I had to download the source for the glut library and compile from scratch as hp's native version was not shared, and the 10.2 install package from the UK mirror had a shared library, but that one did not work (the archive file it was made from had a corrupt symbol). In any case my current glut library compiled with no errors and works on regular C files with the .sl as the library.
No errors are reported during compilation and no errors are reported during runtime, the problem is that when I pass a function name to "glutDisplayFunct()" or other functions requiring a function name as a parameter it accepts it, but it does not show any evidence that it read the function (No window opens and no graphics!). I am rather new at this kind of thing. But I am very persistant. Would seeing the functions.c file help? I can edit it down to eliminate the parts that don't matter (it is quite large).
Thanks for the reply.
Terry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2002 07:02 AM
08-29-2002 07:02 AM
Re: Shared library behavior
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2002 07:08 AM
08-29-2002 07:08 AM