LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices

Reply
 
Search this Thread
Old 07-10-2006, 07:21 AM   #1
jlkuo56linuxqu
LQ Newbie
 
Registered: Jul 2006
Posts: 2

Rep: Reputation: 0
Question undefined reference to `_g_list_length'


1. I install glib-1.2.10 @cygwin
2. my source testapp.c: #include <glib.h>
3. gcc testapp.c -o testapp -I/usr/include/glib-1.2
4. Link error :undefined reference to `_g_list_length'
5. How can I link glib ??
 
Old 07-11-2006, 12:12 AM   #2
Ephracis
Senior Member
 
Registered: Sep 2004
Location: Sweden
Distribution: Ubuntu, Debian
Posts: 1,109

Rep: Reputation: 49
Try this:
gcc testapp.c -o testapp -lglib -I/usr/include/glib-1.2
 
Old 07-11-2006, 02:34 AM   #3
jlkuo56linuxqu
LQ Newbie
 
Registered: Jul 2006
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks a lot,
I can compile for it ,using
-I/usr/include/glib-1.2\
-L/usr/lib -lglib
Thank you for your hint !!
 
Old 07-11-2006, 04:25 AM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,978
Blog Entries: 11

Rep: Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879
cygwin != linux ... moved to general.
 
Old 07-12-2006, 03:37 AM   #5
jlkuo56linuxqu
LQ Newbie
 
Registered: Jul 2006
Posts: 2

Original Poster
Rep: Reputation: 0
Yeh, Cygwin != linux,
I am a new commer moved from PC windos and DOS.
That's many unexpected things happened.
Linux is open and free , I will like it and try to transfer smoothly.
Thanks your suggestion.
 
Old 07-12-2006, 04:09 AM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,978
Blog Entries: 11

Rep: Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879
Actually I was trying to get you to ask your cygwin question(s)
in the relevant forum. For this thread it was general, for your
other one it's programming. It's definitely (again) not a Linux-
question.


Cheers,
Tink
 
  


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
Undefined reference, why? george_mercury Programming 4 05-07-2009 12:15 AM
undefined reference vkmgeek Programming 1 05-11-2006 06:37 AM
Undefined Reference ChemicalBurn Programming 2 02-14-2005 03:01 AM
undefined reference mp4-10 Programming 3 01-25-2005 12:38 PM
undefined reference to `rpmdbFirstRecNum' eantoranz Programming 4 01-21-2004 12:19 AM


All times are GMT -5. The time now is 11:22 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration