forum.alglib.net

ALGLIB forum
It is currently Sun Dec 22, 2024 8:58 am

All times are UTC


Forum rules


1. This forum can be used for discussion of both ALGLIB-related and general numerical analysis questions
2. This forum is English-only - postings in other languages will be removed.



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Problem compiling empty project - PCA
PostPosted: Wed Oct 13, 2010 1:12 pm 
Offline

Joined: Wed Oct 13, 2010 1:02 pm
Posts: 5
Hi guys.
I've got a problem compiling an empty project of PCA in MSVS 2008.
I've created a project and added all the header files you can see below and the relatives .cpp files.

Code:
// PCA.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "alglibinternal.h"
#include "alglibmisc.h"
#include "ap.h"
#include "dataanalysis.h"
#include "linalg.h"
#include "optimization.h"
#include "solvers.h"
#include "specialfunctions.h"
#include "statistics.h"
#include <cstdio>
#include <iostream>
#include <stdlib.h>
#include <stdio.h>

using namespace std;
using namespace alglib;
using namespace alglib_impl;

int _tmain(int argc, _TCHAR* argv[])
{
   

   system("PAUSE");
   return 0;
}



Building this empty project to test if it runs, I've got an error message saying:

1>dataanalysis.obj : error LNK2019: unresolved external symbol "void __cdecl alglib_impl::calculatemoments(struct alglib_impl::ae_vector *,int,double *,double *,double *,double *,struct alglib_impl::ae_state *)" (?calculatemoments@alglib_impl@@YAXPAUae_vector@1@HPAN111PAUae_state@1@@Z) referenced in function "void __cdecl alglib_impl::dsnormalize(struct alglib_impl::ae_matrix *,int,int,int *,struct alglib_impl::ae_vector *,struct alglib_impl::ae_vector *,struct alglib_impl::ae_state *)" (?dsnormalize@alglib_impl@@YAXPAUae_matrix@1@HHPAHPAUae_vector@1@2PAUae_state@1@@Z)

What's the reason??
I hope that the code in the header and cpp files is right!!


Top
 Profile  
 
 Post subject: Re: Problem compiling empty project - PCA
PostPosted: Wed Oct 13, 2010 2:10 pm 
Offline
Site Admin

Joined: Fri May 07, 2010 7:06 am
Posts: 927
Looks like you've forgot to include statistics.cpp (file where alglib_impl::calculatemoments is defined) to your project. Am I right? If not, please post archive with your project here.

BTW, you don't have to use namespace alglib_impl; actually, nothing from this namespace is intended to be used directly.


Top
 Profile  
 
 Post subject: Re: Problem compiling empty project - PCA
PostPosted: Wed Oct 13, 2010 2:40 pm 
Offline

Joined: Wed Oct 13, 2010 1:02 pm
Posts: 5
Sergey.Bochkanov wrote:
Looks like you've forgot to include statistics.cpp


Thank you very much. I haven't notice that I've stupidly forgot statistics.cpp.

Sergey.Bochkanov wrote:
BTW, you don't have to use namespace alglib_impl; actually, nothing from this namespace is intended to be used directly.


Thanks for this information. Fortunately, however, add this line doesn't cause any problem. :)
Thanks a lot.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 58 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group