LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 04-18-2007, 10:43 AM   #1
prashanthjj
LQ Newbie
 
Registered: Apr 2007
Posts: 12

Rep: Reputation: 0
C Errors on compiling


i'm doing my B.Tech project on Portknocking concept while i implementing portknocking in C using Fedora Core 6 these errors are came.... plz suggest any solutions for that plz its very urgent......
eventhough i installed openssl and libslack packages these errors are came...

[root@localhost ~]# cc knock.h

[root@localhost ~]# cc knockc.c
/tmp/ccmAMaEo.o: In function `main':
knockc.c:
(.text+0x59a): undefined reference to `BF_set_key'
knockc.c.text+0x5c4): undefined reference to `BF_ecb_encrypt'
collect2: ld returned 1 exit status

[root@localhost ~]# cc knockd.c

knockd.c:29:33: error: md5.h: No such file or directory

knockd.c: In function ‘main’:

knockd.c:110: warning: passing argument 2 of ‘signal’ from incompatible pointer type

knockd.c:111: warning: passing argument 2 of ‘signal’ from incompatible pointer type

knockd.c:115: warning: comparison between pointer and integer
knockd.c:147: warning: passing argument 1 of ‘strcmp’ makes pointer from integer without a cast
 
Old 04-18-2007, 11:04 AM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
2 things: firstly, marking your thread as Urgent is a big no-no here. We are all volunteers and do this on our own time, no problem is more urgent than any other. Secondly, this forum is purely a place to say "hello", you won't get any technical answers in this forum so I have moved your thread to the Fedora forum.
 
Old 04-18-2007, 11:05 AM   #3
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
I have also renamed your thread to give it a meaningful title.
 
Old 04-18-2007, 11:12 AM   #4
slzckboy
Member
 
Registered: May 2005
Location: uk - Reading
Distribution: slackware 14.2 kernel 4.19.43
Posts: 462

Rep: Reputation: 30
is this code that you have written yourself ?

if so have you included the right headers and linked to correct libs?
 
Old 04-18-2007, 11:14 AM   #5
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 78
First, a lot of my post will be guessing since you make no revelations about your code nor your install paths for openssl. Second, there is no point to “cc knock.h” as it should be used as a header file. Third, you need to not only install openssl, but to use it (i.e., tell the compiler where to find the include files and the linker what libs to link). For your first error (in knockc.c) it compiles fine, but there is a linking error. Most likely you need to link to the ssl library (try “cc -lssl -lcrypto -ldl -o knockc knockc.c”). For your second error (knockd.c) the compiler can’t find the file “md5.h” you can either change “#include <md5.h>” to “#include <openssl/md5.h>” or specify the include path the compiler should use (i.e., “cc -I/usr/include/openssl -o knockd knockd.c”).
 
Old 04-19-2007, 12:42 AM   #6
prashanthjj
LQ Newbie
 
Registered: Apr 2007
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by slzckboy
is this code that you have written yourself ?

if so have you included the right headers and linked to correct libs?

No i downloaded this coding from Portknocking.org and eventhough i installed openssl and libslack the errors are came.....


so plz suggest any other solutions..............
 
Old 04-19-2007, 01:18 AM   #7
slzckboy
Member
 
Registered: May 2005
Location: uk - Reading
Distribution: slackware 14.2 kernel 4.19.43
Posts: 462

Rep: Reputation: 30
and the code dosn't have a make file?

or install instructions?
 
Old 04-19-2007, 09:24 AM   #8
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 78
Quote:
Originally Posted by prashanthjj
so plz suggest any other solutions..............
Did you try my “solution”?
 
Old 04-21-2007, 12:39 AM   #9
prashanthjj
LQ Newbie
 
Registered: Apr 2007
Posts: 12

Original Poster
Rep: Reputation: 0
tel me ur solution i'll try......
 
Old 04-21-2007, 10:25 AM   #10
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 78
Umm…
Did you not see this?
 
Old 04-23-2007, 09:30 PM   #11
prashanthjj
LQ Newbie
 
Registered: Apr 2007
Posts: 12

Original Poster
Rep: Reputation: 0
i already tried it will work for knockc only not for knockd...... in knockd the main error is undefined reference to MD5file() function......
 
Old 04-24-2007, 07:43 AM   #12
nomb
Member
 
Registered: Jan 2006
Distribution: Debian Testing
Posts: 675

Rep: Reputation: 58
I guess if anyone wants to see his code you can look at his other post a few spots down on the main fedora page.

http://www.linuxquestions.org/questi...d.php?t=547233

Don't double post.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Various Compiling Errors (GCC compiling Openal, GUIlib, xmms-wma) gregorya Linux - Software 2 08-27-2004 05:03 AM
Errors compiling boombastic Linux - Newbie 7 08-04-2004 03:09 PM
Errors when compiling anything! adizzle Linux - Newbie 4 06-16-2004 05:27 PM
compiling errors degraffenried13 Linux - General 1 04-04-2004 01:54 PM
Errors compiling 2.6.0 plisken Linux - General 3 10-10-2003 05:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 06:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration