This forum has been archived. All content is frozen. Please use KDE Discuss instead.

weird compilation error

Tags: None
(comma "," separated)
mohsha
Registered Member
Posts
1
Karma
0

weird compilation error

Wed Dec 02, 2015 12:42 am
this is my svd.h header file:
Code: Select all
#ifndef _SVD_H_
#define _SVD_H_
#include <iostream>
#include "GKlib.h"
#include <Eigen/Dense>
 
void svdFrmCSR(gk_csr_t *mat, int rank, std::vector<std::vector<double>>& uFac,
                std::vector<std::vector<double>>& iFac);
#endif


my svd.cpp header file:
Code: Select all
#include "svd.h"

void svdFrmCSR(gk_csr_t *mat, int rank, std::vector<std::vector<double>>& uFac,
                std::vector<std::vector<double>>& iFac) {

}


I am compiling it using the following:
Code: Select all
g++  -std=c++11 -I/home/grad02/mohit/George/GKlib/trunk -I/home/grad02/mohit/exmoh/lib/eigen/  -c -o svd.o svd.cpp


It is showing me the following message:
Code: Select all
In file included from /home/grad02/mohit/exmoh/lib/eigen/Eigen/src/Core/ArrayBase.h:94:0,
                 from /home/grad02/mohit/exmoh/lib/eigen/Eigen/Core:356,
                 from /home/grad02/mohit/exmoh/lib/eigen/Eigen/Dense:1,
                 from svd.h:5,
                 from svd.cpp:1:
/home/grad02/mohit/exmoh/lib/eigen/Eigen/src/Core/../plugins/ArrayCwiseUnaryOps.h:153:6: error: macro "sign" requires 2 arguments, but only 1 given


I am using gcc/4.9 to compile it.

I am able to compile a test file but not his one, let me know if any of you guys have a clue.

thanks,
Mohit
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: weird compilation error

Wed Dec 02, 2015 3:46 pm
This is very likely that #include "GKlib.h" defines macro "sign", either #undef it after the #include, or reverse the inclusion order so that eigen is included first.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot]