The Teradata TPT API could be very useful in our department to tailor the operation of TPT. I tried building the getbuffer 64-bit sample program with Visual Studio 2010 and I'm getting 23 errors, all similar to the following. I know my way around C++, but dont understand anything about dllimport/dllexport.
1>GetBuffer.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall ncr::teradata::client::API::DMLGroup::AddStatement
Also tried building the getbuffer 32-bit sample and getting the following error. Searching on the net, I tried setting Incremental Linking to "No", but still have the problem.
error LNK1123: failure during conversion to COFF: file invalid or corrupt O:\TPT_API\getbuffer\LINK
Any help with solving either or both of these problems would be greatly appreciated.
Hi Folks, I got past that error. I had to specify both telapi.dll and telapi.lib in Linker->Input->Additional Dependencies. But, now I have a different linker error, regarding telapi.dll. When searching MSDN about this error, it recommends to rebuild the DLL. But this DLL was built by Teradata. Does this truly need to be rebuilt, or is there some other factor? The full build command is also shown below.
telapi.dll : fatal error LNK1107: invalid or corrupt file: cannot read at 0x2C8
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\link.exe /ERRORREPORT:PROMPT /OUT:"Release\getbuffer.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:\Program Files (x86)\Teradata\Client\14.10\Teradata Parallel Transporter\bin" telapi.lib telapi.dll kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /ManifestFile:"Release\getbuffer.exe.intermediate.
1>telapi.dll : fatal error LNK1107: invalid or corrupt file: cannot read at 0x2C8
1>Done Building Project "O:\TPT_API\getbuffer\getbuffer.vcxproj" (build target(s)) -- FAILED.