PDA

View Full Version : gcc



thedardanius
November 3rd, 2012, 05:03 PM
hey,

Lately Im using BASS sound API for linux programming. BUt I get undefined reference errors during compiling, meaning that my linking has failed. How doI link with gcc?? And preferably without command line if possible. Also, what are makefiles and how do you combine them in your project???

slavik
November 3rd, 2012, 09:18 PM
install the right -dev packages needed, then add -l for the proper libraries.

thedardanius
November 3rd, 2012, 11:28 PM
what do you mean with -I

thedardanius
November 4th, 2012, 09:22 AM
People please,
Im using code::blocks and g++/gcc. How do I link .so libraries to my project? Im totally new to gcc, I just figured out how to compile. But linking... and preferable withing the IDE, not command line linkning/ compiling.

MG&TL
November 4th, 2012, 06:21 PM
IDEs differ. Sorry, you're going to have to look that up, unless there's a Code::Blocks user around here.

From gcc, you'll need to add appropriate flags. For instance:


gcc <insert filenames here> -lBASS