Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old May 19, 2009, 04:05 AM   #1
sammich
macrumors 601
 
sammich's Avatar
 
Join Date: Sep 2006
Location: Sarcasmville.
Compiling: library not found

I'm working between my uni's unix servers and my mac. I've been using rsync to keep both up to date when I'm moving from one to the other.

But I've run into a problem (which I swear wasn't there before). I sync'd everything back to my mac, and used the makefile to compile on my mac. It gives me the error:

Code:
ld: library not found for -lparser
So I 'ssh' into my shell on the uni servers and run the exact same makefile, and it works fine. I'd rather not rsync every change and compile on the uni servers. I should add that I've got symlinks (required for this assignment) that point to data files. I've made sure that that same directories exist on my mac as well (remember this worked before). I'm not convinced this is a link following problem.

What is happening here?
Thanks in advance.

My makefile:
Code:
COMPILER = g++
OBJECTS = main.o subNode.o Hits.o Context.o NodeFactory.o
INCLUDES = -I wrappers/ -I parser -L parser  -l parser
ERRFLAGS = -W -Wall -Wextra -ansi -pedantic
WRAPPERS = wrappers/RecordFile.o wrappers/lines_idx.o wrappers/lines_pos.o

printme: Context.o $(WRAPPERS)
	$(COMPILER) -o printme $(INCLUDES) Context.cc $(WRAPPERS)

# Compile program
search: $(OBJECTS) $(WRAPPERS)
	$(COMPILER) -o search $(ERRFLAGS) $(INCLUDES) $(OBJECTS) $(WRAPPERS)
Directory listing (from ls -l):
Code:
Context.cc
Context.o
Hits.cc
NodeFactory.cc
data -> /usr/cs3/cs3/info3220/ass2/data
main.cc
makefile
parser -> /usr/cs3/cs3/info3220/ass2/parser/      <-- this folder has libparser.a in it
rprint.cc
subNode.cc
texts -> /usr/cs3/cs3/info3220/ass2/texts
wrappers
__________________
Official MR IRC
Look at me, I'm own a bunch of things and everyone must know about every single one.

Last edited by sammich; May 19, 2009 at 04:11 AM.
sammich is offline   0 Reply With Quote
Old May 21, 2009, 07:31 AM   #2
nestlake
macrumors newbie
 
Join Date: May 2009
Can you give me your sourcefile, I'll see what happened!
nestlake is offline   0 Reply With Quote
Old May 21, 2009, 09:07 AM   #3
wrldwzrd89
macrumors G4
 
wrldwzrd89's Avatar
 
Join Date: Jun 2003
Location: Solon, OH
This doesn't look like a symbolic link issue, but rather a prompt formatting issue. Double-check your includes line. Somehow, ld thinks that you're trying to specify a library called lparser rather than parser.
__________________
iMac Intel (Rev H, 27"), 1TB HDD, 16GB RAM, 10.8.4
wrldwzrd89 is offline   0 Reply With Quote
Old May 21, 2009, 09:41 AM   #4
sammich
Thread Starter
macrumors 601
 
sammich's Avatar
 
Join Date: Sep 2006
Location: Sarcasmville.
Quote:
Originally Posted by wrldwzrd89 View Post
This doesn't look like a symbolic link issue, but rather a prompt formatting issue. Double-check your includes line. Somehow, ld thinks that you're trying to specify a library called lparser rather than parser.
It works on the uni unix servers fine, so it can't be a typo. The Mac OS X supplied g++ is slightly different?
__________________
Official MR IRC
Look at me, I'm own a bunch of things and everyone must know about every single one.
sammich is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Need help compiling c files Paulie87 Mac Programming 27 Mar 11, 2014 08:00 PM
after installing mavericks, Iphoto not found and itunes library is empty ramram55 OS X Mavericks (10.9) 0 Oct 23, 2013 01:25 PM
Compiling for Powerpc, how to? skinniezinho PowerPC Macs 12 Jun 21, 2013 04:10 AM
Library not found for -lSDLmain Candunc Mac Programming 2 Dec 2, 2012 12:43 PM
HomeSharing - Library not found problem. djyahtzee Apple TV and Home Theater 1 Jun 26, 2012 03:42 PM

Forum Jump

All times are GMT -5. The time now is 10:58 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC