Solved

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

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Suggested Solutions

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 …
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…

751 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