Development Topics > Plugin Development

unresolved symbol errors while linking vamp plugin

<< < (3/3)

haze:

--- Quote from: cannam on March 06, 2009, 17:05:56 --- If you re-build the project (i.e. build from clean), do the files you imported from aubio (e.g. sample.c) appear in the log of files being compiled? 

--- End quote ---

Actually no, only plugins.cpp and the .cpp that i did for my analyzer appears.


Hazel

haze:
Hi,

I got to compile some of the codes of aubio and got this error from sample.cpp

----error C3861: 'malloc': identifier not found

How do I solved this.


Hazel

cannam:
You probably just need to put


--- Code: ---#include <stdlib.h>

--- End code ---

at the top of the source file.


Chris

haze:
Thanks, I got rid of the 'malloc' errors.

I have another problem with these errors.

--error C2057: expected constant expression
--error C2466: cannot allocate an array of constant size 0
--error C2133: 'buf' : unknown size

here's some of the codes.

//pitchschmitt.h

#ifndef _PITCHSCHMITT_H
#define _PITCHSCHMITT_H


#ifdef __cplusplus
extern "C" {
#endif

typedef struct _aubio_pitchschmitt_t aubio_pitchschmitt_t;

smpl_t aubio_pitchschmitt_detect (aubio_pitchschmitt_t *p, fvec_t * input);
aubio_pitchschmitt_t * new_aubio_pitchschmitt (uint_t size, uint_t samplerate);
void del_aubio_pitchschmitt (aubio_pitchschmitt_t *p);


#ifdef __cplusplus
}
#endif

#endif /* _PITCHSCHMITT_H */


//pitchschmitt.cpp
//part where i got those errors

#include <cstdlib>
#include "aubio_priv.h"
#include "sample.h"
#include "pitchschmitt.h"

smpl_t aubio_pitchschmitt_detect (aubio_pitchschmitt_t *p, fvec_t * input)
{
  signed short int buf[input->length];//errors occur here
  uint_t i;
  for (i=0; i<input->length; i++) {
    buf = input->data[0]*32768.;
  }
  return aubio_schmittS16LE(p, input->length, buf);
}

could you help me this compiler errors.

haze:
Hi

I solved that errors which I stated above, now I got to compile all the codes but then I got error in linking..

These are the errors..

pitchdetection.obj : error LNK2019: unresolved external symbol _aubio_pitchfcomb_detect referenced in function "float __cdecl aubio_pitchdetection_fcomb(struct _aubio_pitchdetection_t *,struct _fvec_t *)" (?aubio_pitchdetection_fcomb@@YAMPAU_aubio_pitchdetection_t@@PAU_fvec_t@@@Z)
1>pitchdetection.obj : error LNK2019: unresolved external symbol _aubio_bintofreq referenced in function "float __cdecl aubio_pitchdetection_mcomb(struct _aubio_pitchdetection_t *,struct _fvec_t *)" (?aubio_pitchdetection_mcomb@@YAMPAU_aubio_pitchdetection_t@@PAU_fvec_t@@@Z)
1>pitchdetection.obj : error LNK2019: unresolved external symbol _aubio_pitchmcomb_detect referenced in function "float __cdecl aubio_pitchdetection_mcomb(struct _aubio_pitchdetection_t *,struct _fvec_t *)" (?aubio_pitchdetection_mcomb@@YAMPAU_aubio_pitchdetection_t@@PAU_fvec_t@@@Z)
1>pitchdetection.obj : error LNK2019: unresolved external symbol _aubio_pvoc_do referenced in function "float __cdecl aubio_pitchdetection_mcomb(struct _aubio_pitchdetection_t *,struct _fvec_t *)" (?aubio_pitchdetection_mcomb@@YAMPAU_aubio_pitchdetection_t@@PAU_fvec_t@@@Z)
1>pitchdetection.obj : error LNK2019: unresolved external symbol _aubio_pitchyin_getpitchfast referenced in function "float __cdecl aubio_pitchdetection_yin(struct _aubio_pitchdetection_t *,struct _fvec_t *)" (?aubio_pitchdetection_yin@@YAMPAU_aubio_pitchdetection_t@@PAU_fvec_t@@@Z)
1>pitchdetection.obj : error LNK2019: unresolved external symbol _aubio_freqtomidi referenced in function _new_aubio_pitchdetection
1>pitchdetection.obj : error LNK2019: unresolved external symbol _new_aubio_pitchfcomb referenced in function _new_aubio_pitchdetection
1>pitchdetection.obj : error LNK2019: unresolved external symbol _new_aubio_pitchmcomb referenced in function _new_aubio_pitchdetection
1>pitchdetection.obj : error LNK2019: unresolved external symbol _new_aubio_pvoc referenced in function _new_aubio_pitchdetection
1>pitchdetection.obj : error LNK2019: unresolved external symbol _del_aubio_pitchfcomb referenced in function _del_aubio_pitchdetection
1>pitchdetection.obj : error LNK2019: unresolved external symbol _del_aubio_pitchmcomb referenced in function _del_aubio_pitchdetection
1>pitchdetection.obj : error LNK2019: unresolved external symbol _del_aubio_pvoc referenced in function _del_aubio_pitchdetection
1>Debug\vamp-example-plugins.dll : fatal error LNK1120: 12 unresolved externals

I really cant move forward...pls help..

Navigation

[0] Message Index

[*] Previous page

Go to full version