Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Compiling errors with '-mno-cygin' option on Cygwin

Posted on 2003-10-23
3
Medium Priority
?
358 Views
Last Modified: 2008-01-16

Hello everyone,

I have this issue: I have a C program that uses embedded perl to call a
Perl subroutine.  This runs successfully when compiled with gcc with
default options.  But, when I use the -mno-cygwin option, I get errors
indicating that some include files are not available. (The error messages
are shown below my signature)

All of this is on Cygwin.  Can anyone please point my mistakes?

Thank you.

Paul

Below is part of the error message:

$ gcc -c -mno-cygwin mpdll2.c `perl -MExtUtils::Embed -e ccopts -e ldopts`
Note (probably harmless): No library found for -lcrypt
Note (probably harmless): No library found for -lutil
In file included from mpdll2.c:2:
/usr/lib/perl5/5.8.0/cygwin-multi-64int/CORE/perl.h:613:27: netinet/in.h:
No such file or directory
/usr/lib/perl5/5.8.0/cygwin-multi-64int/CORE/perl.h:617:26: arpa/inet.h:
No such file or directory
/usr/lib/perl5/5.8.0/cygwin-multi-64int/CORE/perl.h:663:27: sys/times.h:
No such file or directory
/usr/lib/perl5/5.8.0/cygwin-multi-64int/CORE/perl.h:782:30: sys/ioctl.h:
No such file or directory
/usr/lib/perl5/5.8.0/cygwin-multi-64int/CORE/perl.h:1193:23: ieeefp.h: No
such file or directory
/usr/lib/perl5/5.8.0/cygwin-multi-64int/CORE/perl.h:1984:21: win32.h: No
such file or directory
In file included from
/usr/lib/perl5/5.8.0/cygwin-multi-64int/CORE/perl.h:2215,
                 from mpdll2.c:2:
0
Comment
Question by:pbpb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 20

Accepted Solution

by:
jmcg earned 600 total points
ID: 9618694
When you supply the no-cygwin option, you are asserting that the code being compiled has no dependencies on the UNIX compatibility supplied by the Cygwin libraries (and their associated header files). So far as I can see, that property is not actually true of the mpdll2.c files included in your compile — but only because they are pulling in a perl.h file corresponding to your Cygwin-configured installation of Perl.

If you look at the output of the perl command included in backticks at the end of your compilation command line, you'll see it including its own header directory with a -I directive. I guess it is possible to produce a no-Cygwin version of Perl that would have it's own no-cygwin perl.h header file, but I've never done it.

0
 
LVL 20

Expert Comment

by:jmcg
ID: 10030545
Nothing has happened on this question in over 2 months. It's time for cleanup!

My recommendation, which I will post in the Cleanup topic area, is to
accept answer by jmcg [grade B] (explains but doesn't solve).

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jmcg
EE Cleanup Volunteer
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question