05-11-2009
One last point - never use void main() - it is int main()
UNIX expects you to return a numeric value - unsigned int 0-255 from a C program.
When main is void _start() (the code that runs main) returns whatever junk it finds on the stack. This may seem trivial, but it is actually important.
10 More Discussions You Might Find Interesting
1. Solaris
HI All,
I am trying to use a dll using dlopen but in vain. When I try to ldd that dll it returns no output. Can anybody please tell me how I can load this dll in my process space.
PS: ldd -l returns a lot of unsatisfied dependent symbols.
Thanks a lot in advance
Codeman (0 Replies)
Discussion started by: codeman
0 Replies
2. Programming
I can open my so file successfully by calling dlopen directly in my main function. But if I fork a child process, and call dlopen in child process, it failed!
I don't know why. Following is my code:
#include <stdio.h>
#include <errno.h>
#include <dlfcn.h>
void childFunc(void)
{
void... (1 Reply)
Discussion started by: virmin
1 Replies
3. Programming
Hi
Where is the default location of libs to search, when we specify any lib in dlopen function.
And if we want to specify a custom location, how will we do it?
thanks. (1 Reply)
Discussion started by: sumsin
1 Replies
4. Programming
Hi unix lovers,
I am getting error while compile a function which uses dlopen.
My code is
I am getting error as follows
Am I missing something? I think I am missing a lot :-)
I am using solaris.
Thanks in advance,
-Ashish (5 Replies)
Discussion started by: shriashishpatil
5 Replies
5. Programming
when i try to run an executable i got the following error message:
resolve_symbols: loader error: dlopen:
what does this error mean and what should be done to avoid this?
with regards (1 Reply)
Discussion started by: gfhgfnhhn
1 Replies
6. Programming
//foo.c
#include<stdio.h>
int pen(int a)
{
printf("%d",a);
}
$cc -c foo.c
$ls -shared -o libfoo.so foo.o
///////////now libfoo.so formed
//i have already designed libfoo.so
//main.c
#include<stdio.h>
#include <dlfcn.h>
int main()
{ (2 Replies)
Discussion started by: lookforlohith
2 Replies
7. Programming
Hi,
I created two library libsum.so and libproduct.so. In the libproduct.so is defined function "product" that use function "sum" defined in libsum.so. So libproduct depends on libsum.
In main function I called product function by a dlopen request. Unfortunaly, when I execute program I have an... (5 Replies)
Discussion started by: shade82
5 Replies
8. Programming
I've attached a tar.gz containing three tests to demonstrate the problem I'm having.
Within the tar are two shared libraries, two test applications, and a Makefile that builds the three tests.
The shared libaries are libshlib1.so and libshlib2.so. Both export a function, libFunc, which takes... (5 Replies)
Discussion started by: DreamWarrior
5 Replies
9. AIX
Hello,
One of our Customer is getting Coredump when our application is trying to load a library(one of our products library) using dlopen() on AIX 6.1.
Our application and our shared library are built on AIX 5.3 machine using xlC compiler.
we have tried executing the same application on... (2 Replies)
Discussion started by: erra_krishna
2 Replies
10. Programming
I've got a C++ program and some plugins ( shared objects ) that I have been developing for Linux. I was originally using and OSX machine to develop and test most of the code.
I use dlopen to open the shared objects and then call methods from them. It behaves differently on Linux ( don't know the... (3 Replies)
Discussion started by: rfkrakora
3 Replies
LEARN ABOUT OSF1
install-solaris
install-solaris(1M) install-solaris(1M)
NAME
install-solaris - install the Solaris operating system
SYNOPSIS
install-solaris
install-solaris invokes the Solaris Install program. Depending on graphical capability and available memory at the time of invocation,
install-solaris invokes either a text-based installer or a graphical installer.
The following minimum requirements for physical memory dictate which features are available during installation:
For SPARC machines:
128 MB
Minimum physical memory for all installation types
128 MB
Minimum physical memory required for windowing system
384 MB
Minimum physical memory required for graphical-based installation
For x86 machines:
256 MB
Minimum physical memory for all installation types
256 MB
Minimum physical memory required for windowing system
512 MB
Minimum physical memory required for graphical-based installation
In some cases, even if the minimum physical memory is present, available virtual memory after system startup can limit the number of fea-
tures available.
install-solaris exists only on the Solaris installation media (CD or DVD) and should be invoked only from there. Refer to the for more
details.
install-solaris allows installation of the operating system onto any standalone system. install-solaris loads the software available on the
installation media. Refer to the for disk space requirements.
Refer to the for more information on the various menus and selections.
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcdrom (Solaris instal- |
| |lation media) |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
pkginfo(1), install(1M), pkgadd(1M), attributes(5)
It is advisable to exit install-solaris by means of the exit options in the install-solaris menus.
23 Sep 2005 install-solaris(1M)