LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-31-2005, 06:13 AM   #1
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

Rep: Reputation: 45
-libnetlink and c linker


Sometimes when we compile sth we need to give to the gcc some arguments like
lib -lnetlink -lutil .
What -lnetlink stands for and where this thins is denoted so as the linker can understand this statement?
 
Old 08-31-2005, 06:17 AM   #2
alaios
Senior Member
 
Registered: Jan 2003
Location: Aachen
Distribution: Opensuse 11.2 (nice and steady)
Posts: 2,203

Original Poster
Rep: Reputation: 45
just something more..
Anyone that can explain me why this shit occurs and what can i do for that
gcc -g -O2 -Dlinux -o .libs/snmpd snmpd.o ./.libs/libnetsnmpmibs.so ./.libs/libnetsnmpagent.so helpers/.libs/libnetsnmphelpers.so ../snmplib/.libs/libnetsnmp.so -lm -L/usr/src/iproute2/lib -lnetlink -lutil -ldl -Wl,--rpath -Wl,/usr/local/ucd-snmp/lib -Wl,--rpath -Wl,/usr/local/lib
/usr/bin/ld: cannot find -lnetlink
collect2: ld returned 1 exit status
 
Old 06-19-2013, 07:30 PM   #3
Kizrak
LQ Newbie
 
Registered: Jun 2013
Posts: 1

Rep: Reputation: Disabled
I'm getting similar error 8 years later. On one day old Ubuntu 13.04.

Code:
gcc -g -ggdb -Wall -Wextra  -o mt6d mt6d.o address_worker.o tunnel_worker.o mt6d_assoc.o addr_gen.o send_utils.o if_utils.o tun_utils.o icmp_utils.o utils.o  -lcrypto -lnetfilter_queue -lssl -lnetlink -lpthread 
/usr/bin/ld: cannot find -lnetlink
collect2: error: ld returned 1 exit status
I've been trying to fix the issue for several days. I repeatedly encounter problems with libnetlink.h and similar files. I know the original post is over 8 years ago, but I'm still seeing the problem. Which is strange, because from what I understand, this is installed by default in Ubuntu 13.04, but I must be wrong.

Any help would be greatly appreciated!

Thank You,
-Alan
 
  


Reply



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
Linker problems daveyboy685 Programming 3 03-31-2005 05:08 PM
linker question dalelane Programming 2 11-09-2004 11:26 AM
Linker Sections DylanDylan Linux - General 0 07-19-2004 04:26 AM
Linker errors daveyboy685 Linux - Software 1 03-25-2004 12:25 PM
linker error Config Programming 8 06-04-2002 03:33 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:07 PM.

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