Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2003-10-23
3
Medium Priority
?
361 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
  • 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying 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

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 …
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
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

927 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