LINK error when compiling C++ program to use JDE API's

panadm

Member
LINK error when compiling C++ program to use JDE API\'s

I am trying to create a C++ external program to call JDE API's. On compilation I get the following symbol reference errors

--------------------Configuration: TEST1 - Win32 Debug--------------------
Compiling...
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.
cl /Gz /Zp1 /MLd /GX /O2 /I "C:\Program Files\Microsoft Visual Studio\VC98\include" /I "C:/b7/system/include" /I "C:/b7/system/includev" /I "C:/b7/DV7334/include" /D "WIN32" /D "_Console" /D "_WINDOWS" /D "IAMASERVER" /D "KERNEL" /D "UNICODE" /D "_U
NICODE" /Fo"Debug/"
"C:\Program Files\Microsoft Visual Studio\MyProjects\TEST1\TEST1.cpp"
TEST1.cpp
*******************
Compiling with IAMASERVER defined.
*******************
Microsoft (R) Incremental Linker Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
/out:TEST1.exe
Debug/TEST1.obj
TEST1.obj : error LNK2001: unresolved external symbol __imp__JDB_FreeEnv@4
TEST1.obj : error LNK2001: unresolved external symbol __imp__JDB_FreeUser@4
TEST1.obj : error LNK2001: unresolved external symbol __imp__jdeFreeBusinessFunctionParms@8
TEST1.obj : error LNK2001: unresolved external symbol __imp__jdeErrorTerminateEx@4
TEST1.obj : error LNK2001: unresolved external symbol __imp__jdeErrorInitializeEx@0
TEST1.obj : error LNK2001: unresolved external symbol __imp__jdeCreateBusinessFunctionParms@12
TEST1.obj : error LNK2001: unresolved external symbol __imp__JDB_InitUser@16
TEST1.obj : error LNK2001: unresolved external symbol __imp__JDB_InitEnvOvr@16
TEST1.exe : fatal error LNK1120: 8 unresolved externals
Error executing cl.exe.


All the settings for C++ and link options are set and look correct. All the necessary DLL's (win and JDE are set properly)

kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib c:\b7\system\lib32\jdekrnl.lib c:\b7\system\lib32\jdel.lib c:\b7\system\lib32\jdenet.lib c:\b7\system\lib32\jdeipc.lib c:\b7\system\lib32\owver.lib


Any help is greatly appreciated.

Thanks

K

ERP 8.0/NT/SQL Server2000
 
Re: LINK error when compiling C++ program to use JDE API\'s

Hi K,

Try setting /LIBPATH: in your linker settings

/libpath: "c:\b7\system\lib32"

and change your references to the JDE libs to not include the full path:
just jdekrnl.lib jdel.lib etc.

good luck,
Craig
 
Re: LINK error when compiling C++ program to use JDE API\'s

K,

I noticed on your linker banner, it does not show the libraries to link with.

I would expect:
Microsoft (R) Incremental Linker Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
c:\b7\system\lib32\jdekrnl.lib c:\b7\system\lib32\jdel.lib c:\b7\system\lib32\jdenet.lib etc.

Exactly where are you specifying the JDE libs?
 
Re: LINK error when compiling C++ program to use JDE API\'s

I was compiling against the client .lib and .dll's, Once the code was ported to the server it worked fine.

K
 
Back
Top