LinuxQuestions.org
Review your favorite Linux distribution.
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 01-23-2018, 04:54 PM   #1
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
makefile: some kind of ld (error) problem I am not verse in.


I have no real idea what this means nor now to fix it.
It is from source for a dockapp that 'was' for 32 bit because it was directed to be so. I removed that to see if I could still get it to compile, then ended up with this.

output
Code:
/usr/bin/ld: /usr/lib64/gcc/x86_64-solus-linux/7.2.0/../../../../lib64/libgtk-x11-2.0.so: undefined reference to symbol 'XFree'
/usr/lib64/libX11.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [Makefile:34: minidock] Error 1
ya want a see the make file?
Code:

# this makefile is part of the "minidock" project. 
# Copyright (C) 2003,2006 by Jean Philippe GUILLEMIN <jp.guillemin@free.fr>
# license: This software is under GPL version 2 of license


HEADERS = 

OBJECTS = 

# customize install path as you need
SRC = minidock.c
BIN = minidock
PREFIX = /usr/local
CONFDIR = /etc/minidock
DESTDIR = 
SHAREDIR = /share/minidock

SRCPATH = .
BINPATH = $(DESTDIR)$(PREFIX)/bin
CONFIGPATH = $(DESTDIR)$(CONFDIR)
CONFIGFILE = default.cf
DEFINE = -D_REENTRANT -D__CONFPATH='"$(CONFDIR)"' -D__CONFFILE='"$(CONFIGFILE)"' -D__ICONPATH='"$(PREFIX)$(SHAREDIR)"'
#added first include pixbuf
GTK_CFLAGS = -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  
GTK_LIBS = -lgtk-x11-2.0 -latk-1.0 -lgdk-x11-2.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0  
CFLAGS = -Wall -O2 
#-march=i486 -mtune=x86-64

CFLAGS += $(GTK_CFLAGS)

$(BIN) : $(SRC)
	gcc $(CFLAGS) $(GTK_LIBS) $(DEFINE) -o $(BIN) $(SRC)


install : $(BIN) path
	chmod 755 $(SRCPATH)/$(BIN)
	chmod 666 $(SRCPATH)/conf/*.cf
	strip $(SRCPATH)/$(BIN)
	cp -pf $(SRCPATH)/$(BIN) $(BINPATH)/
	cp -pf $(SRCPATH)/conf/*.cf $(CONFIGPATH)/


uninstall : $(BINPATH)/$(BIN)
	rm -f $(BINPATH)/$(BIN)
	rm -rf $(CONFIGPATH)


clean :
	rm -f $(SRCPATH)/*.o
	rm -f $(SRCPATH)/$(BIN)


path : $(PREFIX)
	mkdir -p $(CONFIGPATH)
 
Old 01-23-2018, 05:51 PM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
For GTK_CFLAGS and GTK_LIBS, I would assign pkg-config corresponding output values so it would be more up to date
Code:
GTK_CFLAGS = $(shell pkg-config --cflags gtk+-2.0)
GTK_LIBS = $(shell pkg-config --libs gtk+-2.0)
 
2 members found this post helpful.
Old 01-23-2018, 06:12 PM   #3
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Original Poster
Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by keefaz View Post
For GTK_CFLAGS and GTK_LIBS, I would assign pkg-config corresponding output values so it would be more up to date
Code:
GTK_CFLAGS = $(shell pkg-config --cflags gtk+-2.0)
GTK_LIBS = $(shell pkg-config --libs gtk+-2.0)
worked like a charm!
Thanks!
 
  


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
some kind of error manoto Linux - Newbie 2 11-20-2014 03:09 PM
Make-3.82 error:Makefile:282:error: mixed implicit and normal rules Ramanc51 Linux - Newbie 5 06-08-2011 07:55 AM
some kind of error... Blal0ck Fedora 2 02-07-2011 04:14 AM
Who know what kind of 'make' should be used for this Makefile? pvv Linux - General 3 03-17-2004 09:36 AM

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

All times are GMT -5. The time now is 07:31 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