error LNK2019 compiling issue

hello ,
I have an old project written in FOR77 and I want to modify it to work with CUDA . it was very hard to compiling it with VS2008 but final i succeed , but now I have two problem :

1- when I am trying to compile it in command line I get these error
pgfortran7fve2-OlRjnDr.obj : error LNK2019: unresolved external symbol fortab_ r
eferenced in function MAIN_
pgfortran7fve2-OlRjnDr.obj : error LNK2019: unresolved external symbol wodat_ re
ferenced in function MAIN_
pgfortran7fve2-OlRjnDr.obj : error LNK2019: unresolved external symbol read_all_
referenced in function MAIN_
pgfortran7fve2-OlRjnDr.obj : error LNK2019: unresolved external symbol rodonce_
referenced in function MAIN_
pgfortran7fve2-OlRjnDr.obj : error LNK2019: unresolved external symbol heathydro
once_ referenced in function MAIN_
pgfortran7fve2-OlRjnDr.obj : error LNK2019: unresolved external symbol v_zblocka
de_ referenced in function MAIN_
pgfortran7fve2-OlRjnDr.obj : error LNK2019: unresolved external symbol write_all
_ referenced in function MAIN_
pgfortran7fve2-OlRjnDr.obj : error LNK2019: unresolved external symbol thehyco_
referenced in function MAIN_
pgfortran7fve2-OlRjnDr.obj : error LNK2019: unresolved external symbol v_full_ca
lc_ referenced in function MAIN_
pgfortran7fve2-OlRjnDr.obj : error LNK2019: unresolved external symbol vrfi_nm_
referenced in function MAIN_
pgfortran7fve2-OlRjnDr.obj : error LNK2019: unresolved external symbol lnas_ ref
erenced in function MAIN_
Main.exe : fatal error LNK1120: 11 unresolved externals
2- when I am trying to compile a simple CUDA example using VS2008
I get these errors
la1djag.obj : error LNK2019: unresolved external symbol cudaSetupArgument referenced in function mproc_la1djac___entry
la1djag.obj : error LNK2019: unresolved external symbol cudaLaunch referenced in function mproc_la1djac___entry
la1djag.obj : error LNK2019: unresolved external symbol cudaRegisterFatBinary referenced in function mproc_la1djac___entry
la1djag.obj : error LNK2019: unresolved external symbol cudaRegisterFunction referenced in function mproc_la1djac___entry
la1djag.obj : error LNK2019: unresolved external symbol cudaUnregisterFatBinary referenced in function mproc_la1djac___entry
la1djag.obj : error LNK2019: unresolved external symbol pgf90_dev_auto_alloc referenced in function MAIN

la1djag.obj : error LNK2019: unresolved external symbol pgf90_dev_copyin referenced in function MAIN

la1djag.obj : error LNK2019: unresolved external symbol pgf90_dev_configure_call referenced in function MAIN

la1djag.obj : error LNK2019: unresolved external symbol pgf90_dev_copyout referenced in function MAIN

la1djag.obj : error LNK2019: unresolved external symbol pgf90_dev_auto_dealloc referenced in function MAIN

la1djag.obj : error LNK2001: unresolved external symbol cudafor

C:\Users\ASUS\Documents\Visual Studio 2008\Projects\PVFProject7\PVFProject7\x64\Debug\PVFProject7.exe : fatal error LNK1120: 11 unresolved externals

thank you in advance

Hi ahmad adyleh,

For the first set of unresolved external symbols, it looks like you’re missing a library or object file.

For the second, you most likely didn’t link with the “-Mcuda” flag.

Hope this helps,
Mat