[問題] CUDA CUFFT測試錯誤
大家好, 請問一個問題
以下是我的程式, complier是OK但是link過不去,
不曉得要修改哪個部分,
1>matrix_add.obj : error LNK2019: 無法解析的外部符號 _cufftDestroy@4 在函式
_main 中被參考
1>matrix_add.obj : error LNK2019: 無法解析的外部符號 _cufftExecC2C@16 在函式
_main 中被參考
1>matrix_add.obj : error LNK2019: 無法解析的外部符號 _cufftPlan1d@16 在函式
_main 中被參考
1>C:\Documents and Settings\XP\My Documents\Visual Studio
2008\Projects\CUDA\practice\memcp\Debug\memcp.exe : fatal error LNK1120: 3 個
無法解析的外部符號
/* %%%%%%%% 程式 %%%%%%% */
#include <stdio.h>
#include <stdlib.h>
#include <cuda.h>
#include <cufft.h>
#define NX 2
#define BATCH 2
int main()
{
cufftHandle plan;
cufftComplex *data;
cudaMalloc((void**)&data, sizeof(cufftComplex)*NX*BATCH);
int a[NX]={1,2};
cudaMemcpy(data, a, sizeof(cufftComplex)*NX*BATCH, cudaMemcpyHostToDevice);
/* Create a 1D FFT plan. */
cufftPlan1d(&plan, NX, CUFFT_C2C, BATCH);
/* Use the CUFFT plan to transform the signal in place. */
cufftExecC2C(plan, data, data, CUFFT_FORWARD);
/* Inverse transform the signal in place. */
cufftExecC2C(plan, data, data, CUFFT_INVERSE);
/* Destroy the CUFFT plan. */
cufftDestroy(plan);
cudaFree(data);
}
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.122.193.103
推
12/25 14:23, , 1F
12/25 14:23, 1F
→
12/25 14:24, , 2F
12/25 14:24, 2F
→
12/25 21:46, , 3F
12/25 21:46, 3F
→
12/25 21:46, , 4F
12/25 21:46, 4F
→
12/25 21:46, , 5F
12/25 21:46, 5F
→
12/25 21:47, , 6F
12/25 21:47, 6F
→
12/25 21:47, , 7F
12/25 21:47, 7F
→
12/25 21:47, , 8F
12/25 21:47, 8F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章
11
17