0

Hey guys.
So i've created a static library project and written the code ( one header file and one cpp file ). I have built it and it resulted in (.a) file.
I told the compiler where to look for the header file and the library file but my example code wont compile :S
Do i have to link something ?
Or did i make some error in the process ?


//K0ns3rv

3
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by kay25
0

I am using gcc ( with netbeans os is linux ).
The errors I am getting seems like standard linking errors.
For example :
/Example.cpp:28: undefined reference to `Vector3f::Vector3f(float*)'

It seems to find the header file atleast

EDIT: Also got similar error in Visual studio 2008 .

Edited by K0ns3rv: n/a

0

Solved it, seems i had to set the location of the library file in the project properties. Is it possible to set the library location for all new projects ?

0

Also, when you are compiling with a library in the command line you have to put -l{libraryname} for each library you are using, it doesn't suffice with putting the path.

Solved it, seems i had to set the location of the library file in the project properties. Is it possible to set the library location for all new projects ?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.