Solved

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

Posted on 2003-10-23
3
348 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 200 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now