Connecting Tech Pros Worldwide Forums | Help | Site Map

unresolved external symbol

Kevin Stedman
Guest
 
Posts: n/a
#1: Nov 17 '05
I am porting some software from Solaris to Windows. I am using the Windows Visual Studio .NET 2003 Visual C++ compiler. For the fortran files I am using Compaq Visual Fortran 6. I have my solutions setup in Visual Studio to just use the fortran compilers to compile the fortran files into objects.

3 of the 4 dlls compile just fine using this method. On the fourth one I get this error message:
FourierAlg.obj : error LNK2019: unresolved external symbol _fourier@68 referenced in function "public: void __thiscall FourierAlg::ExecuteFFT(void)" (?ExecuteFFT@FourierAlg@@QAEXXZ)

If I create the case where that object file is used twice in the comand line the symbol in question says _fourier@72 is defined twice.

I do not understand what is going on here. I can look at the object file and see the function there.

In the C++ code here is my statement for defining this external call to the function:
#ifdef WIN32
//DevStudio6 is special:
#define _FOUR_CALLCNV fourier
#define _CALLCNV _stdcall
#define _CTC_API __declspec(dllimport)
#else
//*ixen are normal:
#define _FOUR_CALLCNV fourier1_
#define _CALLCNV
#define _CTC_API
#endif

extern "C"
{
extern int _CALLCNV _FOUR_CALLCNV ( int*, //Status
float*, //Input Data Vector
int*, //Number of Samples
float*, //Zero Pad Factor
int*, //NBAR
float*, //Side Lobe Level
float*, //Aperture
float*, //Bandwidth
float*, //Center Frequency
char[], //line direction, H/V
float*, //X_Axis
float*, //Magnitude
float*, //PhaseDifference
float*, //Cumulative Sum
float*, //Relative Power
float*, //Phase
int* ); //FFT size
}


And it is used later:

_FOUR_CALLCNV ( &mi_Status,
mpfa_InputData,
&mi_VectorLength,
&mf_ZeroPadFactor,
&mi_TaylorWeightTerms,
&mf_SideLobeLevel,
&mf_ApertureWidth,
&f_Bandwidth,
&mf_CenterFrequency,
&mc_Direction,
mpfa_XAxis,
mpfa_Magnitude,
mpfa_PhaseDifference,
mpfa_CumulativeSum,
mpfa_RelativePower,
mpfa_Phase,
&mi_FFTSize );

If any one can give me hand with this I would appreciate it. It does work fine on Solaris, and other DLLs compiling in the same manner work also. It is just this call.
--
Kevin Stedman
Sr. Software Engineer
GD AIS



Closed Thread