Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Defining the C environment for "inline::c"

by murrayn (Sexton)
on Jul 21, 2014 at 07:19 UTC ( [id://1094428]=perlquestion: print w/replies, xml ) Need Help??

murrayn has asked for the wisdom of the Perl Monks concerning the following question:

This ought to be a simple one but I've burned half a day going around circular hyperlinks trying to make it work so I some seeking the wisdom of the monks. I'm running Activstate Perl on Windows 7 (using Eclipse as my IDE). I have some vendor code as C dlls (and Linux .so files for later on). Today I installed mingw gcc C compiler and it's working on my Win 7 platform. How do I tell my Perl runtime and IDE environments that I have a C compiler and a set of C libraries so I can use the include module? Whenever I run my code (I've just lifted the sample code straight from the Include C Cookbook to validate my environment before I try my own code) I receive the following error:
Error. You have specified 'C' as an Inline programming language. I currently only know about the following languages: Foo, foo If you have installed a support module for this language, try deleting + the config-MSWin32-x86-multi-thread-5.016003 file from the following Inlin +e DIRECTORY, and run again: C:/Users/murrayn/Documents/codecvs/CodeCVS/Perl Code/TestCode/_Inl +ine (And if that works, please file a bug report.) at C:/Users/murrayn/Documents/codecvs/CodeCVS/Perl Code/TestCode/inli +ne_c_test.pl line 0. INIT failed--call queue aborted.
(and deleting the file does not fix the problem so I've not logged a bug report)

Replies are listed 'Best First'.
Re: Defining the C environment for "inline::c"
by syphilis (Archbishop) on Jul 21, 2014 at 07:28 UTC
    Have you installed Inline::C ?
    Until recently Inline::C shipped with Inline, but that's no longer the case - so you now need to explicitly install Inline::C.
    You can check that Inline::C is installed (and what version it is) by running:
    perl -e "require Inline::C;print $Inline::C::VERSION;"
    Update: I've just noticed that you're working in a directory that contains whitespace ("Perl Code"):
    C:/Users/murrayn/Documents/codecvs/CodeCVS/Perl Code/TestCode/_Inline
    I don't know if that's related to your problem, but it's the sort of thing that might cause you some grief with Inline::C.
    IMO, it's a good policy to avoid working with Inline::C in directories that contain whitespace if you can.

    Cheers,
    Rob
      Thanks Rob. Indeed there was a missing module and I was led astray by dated belief that the Inline package still included Inline::C - a belief reinforced by the absence of an Inline::C installable package in Activestate's PPM repository. There was also a requirement to install MinGW and Parse-RecDescent. I'm still investigating a build error but at least it's an error trying to build with C:
      Set up gcc environment - 3.4.5 (mingw-vista special r3) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!! ERROR: Cannot copy 'C:\Perl\html\Active.css' to '\Active.css': No such + file or directory !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!! at -e line 1. Installing \Active.css dmake.exe: Error code 130, while making 'pure_site_install'
        ERROR: Cannot copy 'C:\Perl\html\Active.css' to '\Active.css': No such file or directory

        That's a pretty odd sort of error to be getting - though it's similar to an error Windows users can experience with Inline-C-0.62 towards the the end of 'dmake test' when t/27inline_maker.t is run.

        What version of Inline::C do you have ?
        Can you provide a simple script that generates the above (or some similar) error.

        Cheers,

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1094428]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2025-05-25 02:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.