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 03-01-2015, 06:26 PM   #16
Birdman48
Member
 
Registered: Aug 2008
Location: Southern Maryland
Distribution: ubuntu 14.04 LTS
Posts: 113

Original Poster
Rep: Reputation: 1

Good deal!
Thanks

BTW is there another way to do this?
Like setting the PATH or something. Will I find this in documentation of PATH environment variables and such?

Last edited by Birdman48; 03-01-2015 at 06:30 PM.
 
Old 03-01-2015, 06:36 PM   #17
manu-tm
Member
 
Registered: May 2008
Location: France
Distribution: Ubuntu, Debian
Posts: 343

Rep: Reputation: 43
Quote:
Originally Posted by Birdman48 View Post
Good deal!
Thanks
You're welcome

Quote:
Originally Posted by Birdman48 View Post
BTW is there another way to do this?
Like setting the PATH or something. Will I find this in documentation of PATH environment variables and such?
What you could do is checking out documentation on make / Makefile's.

EDIT: A simple, still extendable, Makefile to compile prog_name from 2 source files could be:
Code:
src =	src_file_1.c src_file_2.c

obj =	$(src:.c=.o)

CC =	gcc

CFLAGS = -O2 -Wall -Wextra `pkg-config --cflags gtk+-3.0`

LIBS =	`pkg-config --libs gtk+-3.0`

all:	prog_name

$(obj): $(src) Makefile
	$(CC) $(CFLAGS) -c $(src)

prog_name: $(obj)
	$(CC) -o prog_name $(obj) $(LIBS)

.PHONY: install
install:
	sudo cp prog_name /usr/bin/

.PHONY: uninstall
uninstall:
	sudo rm /usr/bin/prog_name

.PHONY: clean
clean:
	rm -f $(obj) prog_name
It will then be easy to add extra source files, extra compile flags, extra libraries, ...

There is also GNU autotools but it's getting rather complicated.

Last edited by manu-tm; 03-01-2015 at 07:01 PM.
 
Old 03-28-2015, 07:00 PM   #18
Birdman48
Member
 
Registered: Aug 2008
Location: Southern Maryland
Distribution: ubuntu 14.04 LTS
Posts: 113

Original Poster
Rep: Reputation: 1
Another library I've found of interest is SFML if anyone is following this thread.http://www.sfml-dev.org/learn.php
 
Old 03-29-2015, 12:36 AM   #19
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
Quote:
jay@bird:~/CPP> gcc `pkg-config --cflags gtk+-3.0` -o window-default window-default.c `pkg-config --libs gtk+-3.0`
Package gtk+-3.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-3.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-3.0' found
this type of error is very common with gt programs if you have not MANUALLY set a few things

on opensuse 13 ( unless you ARE !!!! going to evergreen this as a LTS ) support for 13.1 will end soon

see the suse wiki
https://en.opensuse.org/Lifetime

but back to opensuse vairables

make a file called "profile.local" in /etc
/etc/profile.local

this is a copy of mine
Code:
PATH=$PATH:/DATA/SUSE/bin:/DATA/SUSE/include:/DATA/SUSE/share:/DATA/NGT/cspice/exe:/DATA/NGT/cspice/include:/DATA/NGT/StereoPipeline-2.4.2/bin:/DATA/NGT/isis/lib:/DATA/SUSE/CUDA/bin:/DATA/SUSE/share:/DATA/NGT/VisionWorkbench/bin:/DATA/NGT/FWTools-3.1.0/bin_safe


LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/DATA/NGT/cspice/lib:/DATA/SUSE/lib64:/DATA/NGT/isis/lib:/DATA/NGT/VisionWorkbench/lib64

PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/DATA/SUSE/lib64/pkgconfig

export PATH LD_LIBRARY_PATH PKG_CONFIG_PATH
edit the vairables to YOUR!!! install
 
  


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
Slackware14: Audio, OpenGL and Eclipse problems Edmis Linux - Newbie 1 04-22-2013 06:08 AM
Eclipse mp3 player model type: ECLIPSE-CL2BLK Bagatelle Linux - Newbie 0 12-25-2009 01:39 PM
best distribution for me - for C/C++ 3D OpenGL GLSL [eclipse IDE/CDT] maxreason Linux - General 47 08-23-2008 08:20 PM
your opinion: eclipse vs anjunta vs kdevelop vs younameit for large C++ OpenGL app maxreason Programming 20 08-20-2008 07:16 AM
LXer: Gentleware Unveils New Apollo for Eclipse and openArchitectureWare Eclipse Dist LXer Syndicated Linux News 0 10-25-2007 09:30 PM

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

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