Error when compiling using cygwin

Login or Register for Dates, Times and to Reply

Thread Tools Search this Thread
# 1  
Error when compiling using cygwin

I tried to compile the files in basic_dump_ex using cygwin :



but I got this :

cc -g -O -mno-cygwin -I ../../include -c -o basic_dump_ex.o basic_dump_ex.c
cc: error: unrecognized command line option ‘-mno-cygwin’
GNUmakefile:17: recipe for target 'basic_dump_ex.o' failed
make: *** [basic_dump_ex.o] Error 1

In some articles , it is stated that deleting -mno-cygwin , solve the problem . However I cannot find it this -mno-cygwin and I do not know if it will solve the problem once deleted

I am still stuck . What should I do ?

Moderator's Comments:
Mod Comment Please use code tags as required by forum rules!

Last edited by RudiC; 04-06-2016 at 10:21 AM.. Reason: Added code tags.
# 2  
Where did you look for "-mno-cygwin"? In the MAKEFILE?
# 3  
I looked for

inside the

folder as I believed it is situated there in some of the files but I could not find it . I have no idea where I can find it this -mno-cygwin . There is no MAKEFILE file inside the

folder .
# 4  
It is a bogus compiler option. gcc -mno-cygwin will throw an error. Just remove the word from the command.
# 5  
Just remove the word from the command

I did not use

in the command . I used only


as command . So if I did not use

in the command how can I remove it !!! It makes no sense .
# 6  
check the content of your makefile file.
# 7  
Thank you I find it Smilie


I found a file called

so I tried to see its content using

command and this is what I got :

$ cat GNUmakefile
# Makefile for cygwin gcc
# Nate Lawson <>

PCAP_PATH = ../../lib
CFLAGS = -g -O -mno-cygwin -I ../../include

OBJS = basic_dump.o
LIBS = -L ${PCAP_PATH} -lwpcap

all: ${OBJS}
        ${CC} ${CFLAGS} -o basic_dump.exe ${OBJS} ${LIBS}

        rm -f ${OBJS} basic_dump.exe

        ${CC} ${CFLAGS} -c -o $*.o $<

So now I see

Then I deleted the

sed -i 's/-mno-cygwin//g' GNUmakefile1

Then again I tried with the

command but this is what I got :

cc -g -O  -I ../../include -c -o basic_dump.o basic_dump.c
basic_dump.c: In function ‘main’:
basic_dump.c:27:3: warning: implicit declaration of function ‘exit’ [-Wimplicit-function-declaration]
basic_dump.c:27:3: warning: incompatible implicit declaration of built-in function ‘exit’
basic_dump.c:27:3: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
basic_dump.c: In function ‘packet_handler’:
basic_dump.c:99:3: error: ‘VOID’ undeclared (first use in this function)
basic_dump.c:99:3: note: each undeclared identifier is reported only once for each function it appears in
GNUmakefile:17: recipe for target 'basic_dump.o' failed
make: *** [basic_dump.o] Error 1

Still a problem even after deleting the


Last edited by steve120; 04-06-2016 at 01:25 PM..
Login or Register for Dates, Times and to Reply

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Error while compiling

Hi I am trying to compile a binary file (CASPER: Context-Aware Scheme for Paired-End Read) but I am getting the following error: user@user-OptiPlex-780 make g++ -O2 -Wall -fopenmp -c -o merge.o merge.c merge.c:8:35: fatal error: boost/unordered_map.hpp: No such... (2 Replies)
Discussion started by: Xterra
2 Replies

2. Solaris

ERROR while compiling

Hi guys i came across an error while compiling a c file in solaris using gcc. the error is, Undefined first referenced symbol in file bind /var/tmp//ccAr8qAh.o accept ... (4 Replies)
Discussion started by: rajeshb6
4 Replies

3. UNIX for Dummies Questions & Answers

Error while compiling the kernel 3.3.1.

Hi I m using redhat 6 with kernel release 2.6.32-71.el6.i686 I have downloaded latest kernel 3.3.1 from . when i run make module_install i get below error. # make modules_install /usr/src/kernels/linux-3.3.1/scripts/ line 37: 11314 Killed ... (0 Replies)
Discussion started by: pinga123
0 Replies

4. Shell Programming and Scripting

opening new instance of cygwin from withing cygwin

I'm using cygwin on win7, What I would like to do is something like this: cygstart cygwin tail -f /foo/test.log | perl -pe 's/error/\e I know I can start a new instance using either of these: mintty -e ... cygstart tail ... But neither of those open in ANSI mode, so I can't do... (0 Replies)
Discussion started by: Validatorian
0 Replies

5. Programming

Error with compiling

Hi guys. I have a header file: unp.h like this: #ifndef _UNP_H_ #define _UNP_H_ extern ssize_t readn(int filedes, void *buff, size_t nbytes); extern ssize_t writen(int filedes, const void *buff, size_t nbytes); extern void err_quit(const char *msg); #define TRUE 1 #define FALSE 0 ... (2 Replies)
Discussion started by: majid.merkava
2 Replies

6. Programming

gcc compiling error

I am using gcc to compile c objects on solaris 5.10 and hit the following error messages: /usr/include/sys/vfs.h:323: error: syntax error before "statvfs64_t" /usr/include/sys/vfs.h:334: error: syntax error before "statvfs64_t" gmake: *** Error 1 The c program files were copied over from... (3 Replies)
Discussion started by: med7006
3 Replies

7. Windows & DOS: Issues & Discussions

Problem compiling C++ Code in Cygwin

Hello everyone. I just recently installed Cygwin and I am running it under Windows 7. My problem is that I cannot seem to compile any C++ code with g++. I've tried to compile C Code using gcc and that works just fine. But Whenever I try to compile some C++ code, g++ throws a whole bunch of... (6 Replies)
Discussion started by: Anlex
6 Replies

8. Shell Programming and Scripting

Error in Cygwin

Hi, I am trying to execute a Shell script file. The file has the following commands. #Return today's log file LOG_DATE=`date +%d_%b_%Y`.log echo $LOG_DATE #Return last modified date of the Log File FILE_MOD_DATE=`date -r $LOG_DATE` echo $FILE_MOD_DATE If I execute the... (6 Replies)
Discussion started by: AnneAnne
6 Replies

9. Programming

compilation error while using cygwin

Hello, I am trying to compile a C program from Cygwin and it gives ld: not found -user32 error .. I searched for library and was not able locate it.. When i create only object file using gcc -c option it gets created successfully .. When i use gcc -o option , executable is not... (4 Replies)
Discussion started by: shafi2all
4 Replies

10. Programming

Compiling Error

Hi, I have installed "Freetype2" library in my SuSe Linux 9.3 version system. When Iam compiling a program, I am getting these below errors. Undefined reference to "FT_Init_FreeType" Undefined reference to "FT_Load_Char" Please show me a solution? Thank you. With regards, Chandramouli (1 Reply)
Discussion started by: chandra80
1 Replies

Featured Tech Videos