Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

cdsboy

macrumors newbie
Original poster
Jul 8, 2006
11
0
i am trying to compile a program. i am getting this error and i have no idea what it means. Undefined symbols: _jpgalleg_init _load_jpg
 

Yuvi

macrumors member
Jun 27, 2006
64
0
It means you need to link against libjpeg. Install it using either Fink or DarwinPorts and then in XCode, add libjpeg to the XCode project.
 

cdsboy

macrumors newbie
Original poster
Jul 8, 2006
11
0
how do i link a library? oh and i think it is talking about jpgalleg since its required for the program
 

Yuvi

macrumors member
Jun 27, 2006
64
0
Yeah, I was wrong about libjpeg (that'll teach me to only look at one of the missing symbols...) To link against a library, you need to add the library, which will have an extension of either .a or .dylib to the XCode project. XCode should take care of the rest.

Is this program that you're compiling designed for generic *nix operating systems? If so, you might want to follow the standard configure / make procedure.
 

Yuvi

macrumors member
Jun 27, 2006
64
0
Command-shift-G in either the add dialog or the Finder, then type in "/usr/bin".

Note however that bin directories should only have applications, and libraries should have been installed into a "lib" directory, e.g. /usr/lib or /usr/local/lib.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.