Perl 코드를 컴파일하고 싶습니다.

dotri의 이미지

컴파일하고 싶은 코드는 다음과 같습니다.

[root@test perlcc_test]# ls
hello.pl
[root@test perlcc_test]# cat hello.pl
#!/usr/bin/perl
 
print( "hello?\n" );
[root@test perlcc_test]# perl hello.pl
hello?

perlcc 컴파일러를 사용해서 컴파일했는데, 컴파일은 잘 되지만 다음과 같은 경고가 납니다.

[root@test perlcc_test]# perlcc -o hello hello.pl
pccRKB8l.c: In function ‘perl_init_aaaa’:
pccRKB8l.c:476: warning: this decimal constant is unsigned only in ISO C90
[root@test perlcc_test]# ls
hello*  hello.pl
[root@test perlcc_test]# ./hello
hello?

질문1: 이 경고를 없애려면(경고메세지를 없애는게 아니라, 경고 자체를 없애려면) 어떻게 해야합니까? 뭔가 깔끔하지 못하고 깨름직한 기분이 듭니다.
질문2: C 코드를 얻으려면 어떻게 해야합니까? 다음과 같이 시도해보았는데 이상한 에러를 냅니다.

[root@test perlcc_test]# perl -MO=CC,-ohello.c hello.pl
Can't locate object method "_save_common_middle" via package "B::FAKEOP" at /usr/lib/perl5/5.8.8/i386-linux-thread-multi/B/C.pm line 389.
CHECK failed--call queue aborted.
[root@test perlcc_test]#

질문3: 외부 라이브러리를 사용한 Perl 코드, 예를 들어서 서버로 동작하는 프로그램은 Socket 컴포넌트를 사용해야 할텐데 그런건 어떻게 컴파일해야 하나요?

[root@test ASSP]# perlcc assp.pl
/usr/bin/perlcc: assp.pl did not compile, which can't happen:
Starting compile
 Walking tree
 Exporter saved (it is in IO::Seekable's @ISA)
 IO::Socket saved (it is in IO::Socket::INET's @ISA)
 IO::Handle saved (it is in IO::Socket's @ISA)
 Prescan
 Saving methods
 No definition for sub Socket::SO_CHAMELEON
 No definition for sub Socket::SO_CHAMELEON (unable to autoload)
 No definition for sub Socket::AF_ISO
 No definition for sub Socket::AF_ISO (unable to autoload)
 No definition for sub Socket::SO_SNDLOWAT
 No definition for sub Socket::SO_SNDLOWAT (unable to autoload)
 No definition for sub Socket::AF_MAX
 No definition for sub Socket::AF_MAX (unable to autoload)
 No definition for sub Socket::MSG_BTAG
 No definition for sub Socket::MSG_BTAG (unable to autoload)
 No definition for sub Socket::SO_LINGER
 No definition for sub Socket::SO_LINGER (unable to autoload)
 No definition for sub Socket::SO_ERROR
 No definition for sub Socket::SO_ERROR (unable to autoload)
 No definition for sub Socket::PF_OSI
 No definition for sub Socket::PF_OSI (unable to autoload)
 No definition for sub Socket::AF_DATAKIT
 No definition for sub Socket::AF_DATAKIT (unable to autoload)
 No definition for sub Socket::AF_USER
 No definition for sub Socket::AF_USER (unable to autoload)
 No definition for sub Socket::AF_LINK
 No definition for sub Socket::AF_LINK (unable to autoload)
 Can't locate object method "IVX" via package "B::NV" at /usr/lib/perl5/5.8.8/i386-linux-thread-multi/B/C.pm line 650.
 CHECK failed--call queue aborted.
 
[root@test ASSP]#

감사합니다.

이한길의 이미지

질문하신 것들에 대한 대답은 안되겠지만
컴파일하는 목적이 베포에만 있다면 par를 사용해보시는것도 괜찮을것 같습니다.

----
먼저 알게 된 것을 알려주는 것은 즐거운 일이다!
http://hangulee.xo.st
http://hangulee.egloos.com/

----
먼저 알게 된 것을 알려주는 것은 즐거운 일이다!
http://hangulee.springnote.com
http://hangulee.egloos.com

pung96의 이미지

#!/usr/bin/perl
 
print( "hello?\n" );

경고없이 잘 컴파일 되는군요.

perl -MO=CC,-ohello.c hello.pl

같은 에러가 납니다.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.