Author Topic: help linking library  (Read 3343 times)

fatony

  • Guest
help linking library
« on: June 19, 2009, 03:14:41 am »
I've just started using Code:Blocks and i'm trying to link NewMat (matrix library) into my project.

In my "Project build options" under "Linker settings" I've added /usr/lib/newmat.a  and I also have -lnewmat under "Other linker options".

The cpp file in question has


#include <newmat/newmat.h>
class MyColumnVector : pulic ColumnVector{}

Unfortunately it throws an error that says "error: expected class-name before { token" referring to the ColumnVector which is defined in newmat.h

What am i doing wrong and how to  I fix this?

I'm using Ubuntu and have installed the libnewmat10-dev package.  I can't see what i'm doing wrong so any help is appreciated.  Thanks in advance.

fatony

  • Guest
Re: help linking library
« Reply #1 on: June 19, 2009, 03:19:44 am »
Sorry disregard that last post.  NewMat uses namespaces which I didn't tell my program about.  Also -lnewmat is redundant.