in reply to Re^4: Plz suggest what is the problem in the following code?
in thread Plz suggest what is the problem in the following code?
I cannot link two objects that have main defined - I get a "multiple definition of 'main'" error
When you link Inline::C code, you are building an .so file, and the only things exported by that .so should be the external routines defined within it.
Why would it have two mains defined? Or if it only has one, what else (other object) are you trying to link with it that has also has a main defined?
I know how litte I know about *nix build processes (next to nothing), but I really cannot see where the other main is coming from in your scenario?
It can't be the main in the perl executable, because you are not trying to link the .so and the (currently running) perl executable together. That would be static linking.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Plz suggest what is the problem in the following code?
by derby (Abbot) on Feb 04, 2009 at 12:33 UTC | |
by BrowserUk (Patriarch) on Feb 04, 2009 at 12:50 UTC | |
by derby (Abbot) on Feb 04, 2009 at 13:42 UTC | |
by BrowserUk (Patriarch) on Feb 04, 2009 at 14:03 UTC | |
by derby (Abbot) on Feb 04, 2009 at 16:45 UTC |