http://www.perlmonks.org?node_id=1050225


in reply to Re^4: Extending perl with C dynamic library.
in thread Extending perl with C dynamic library.

Do you know what is wrong ?

Yes. Basically, you have no idea what you are doing.

You are still trying to compile a main() function into a dll.

Dlls contain and export entrypoints that *must* be dynamically linked to and called from an executable (with a main()).

You can't use Inline C to build main programs.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
  • Comment on Re^5: Extending perl with C dynamic library.

Replies are listed 'Best First'.
Re^6: Extending perl with C dynamic library.
by Martin90 (Sexton) on Aug 20, 2013 at 19:52 UTC

    "You are still trying to compile a main() function into a dll."

    No.I leave windows and compile code on Linux to .C and then to executable.

    "Yes. Basically, you have no idea what you are doing."

    Well, my problem is weak understand of C programming. That's why I am looking for help on this matter ;)

    Now the only question is why it returns Segmentation fault.

      Well, my problem is weak understand of C programming. That's why I am looking for help on this matter ;)

      This is a Perl forum.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        "This is a Perl forum."

        Right, problem solved anyway.

        Thanks @BrowserUk for your help ;)