Unresolved External Symbol errors when building C BSFN

DYoung

Member
I created a C BSFN, but during the BusBuild in OMW, I keep getting unresolved external symbol errors. I have included the correct include files, but it doesn't seem to find the functions. Any help as to what I can do to remedy this?

Much thanks in advance.

Darren Young

System Information:
Installation: E1 8.12 Update 3; TR: 8.97.1.1;
Tools Baseline: JK14530 Planner: JK16198;
PD EntSrvr=Win2k3R2 DtaCntrEd SP1
DV & PY EntSrvr2=Win2k3R2 EnterpriseEd SP2
DBSrvr=Win2k3R2 DtacntrEd SP1, MS Sql2005 SP2
JASrvr=(2x)Win2k3R2 StdEd SP2, WAS6.0.2.21
 
Darren,

We will need more specifics from you...
- Can you attach your busbuild output?
- Have you built bsfn's on that client machine before?
- What functions are you trying to call that it doesn't find?
- Are you trying to call other bsfn's BY NAME? You should not do this unless you are sure the function resides in the same .dll as the one you're building. Use jdeCallObject instead (many examples in base code).
 
Jeremy -

Thanks for the response. Attached are the C BSFN, the header file, and the BusBuild returns. Please let me know what else you may need to assist.

Darren Young

System Information:
Installation: E1 8.12 Update 3; TR: 8.97.1.1;
Tools Baseline: JK14530 Planner: JK16198;
PD EntSrvr=Win2k3R2 DtaCntrEd SP1
DV & PY EntSrvr2=Win2k3R2 EnterpriseEd SP2
DBSrvr=Win2k3R2 DtacntrEd SP1, MS Sql2005 SP2
JASrvr=(2x)Win2k3R2 StdEd SP2, WAS6.0.2.21
 
My apologies - let's try this again...

Darren Young

System Information:
Installation: E1 8.12 Update 3; TR: 8.97.1.1;
Tools Baseline: JK14530 Planner: JK16198;
PD EntSrvr=Win2k3R2 DtaCntrEd SP1
DV & PY EntSrvr2=Win2k3R2 EnterpriseEd SP2
DBSrvr=Win2k3R2 DtacntrEd SP1, MS Sql2005 SP2
JASrvr=(2x)Win2k3R2 StdEd SP2, WAS6.0.2.21
 

Attachments

  • 143874-B5555001.err.txt
    1.5 KB · Views: 166
And now the source file, which contains the C code and the Header file..

Darren Young

System Information:
Installation: E1 8.12 Update 3; TR: 8.97.1.1;
Tools Baseline: JK14530 Planner: JK16198;
PD EntSrvr=Win2k3R2 DtaCntrEd SP1
DV & PY EntSrvr2=Win2k3R2 EnterpriseEd SP2
DBSrvr=Win2k3R2 DtacntrEd SP1, MS Sql2005 SP2
JASrvr=(2x)Win2k3R2 StdEd SP2, WAS6.0.2.21
 

Attachments

  • 143875-B5555001 logic.txt
    8.2 KB · Views: 120
Darren,

You have run into a constraint of JDE BusBuild. Namely, there is no good way to designate the libraries you need to link with.

My suggestion would be to dynamically link with the required dll's. I do not know where the ldap functions reside, but the MultiByteToWideChar resides in Kernel32.dll (I would have thought that the JDE build would try to link with this library...see note below)

You should be able to google dynamic linking and find plenty of examples. Briefly, you will use the following apis:
- LoadLibrary
- GetProcAddress

Note: I am a bit miffed as these two api's also reside in Kernel32 so if MultiByteToWideChar failed, those should also. It's possible that jde has their own definitions of those functions because I know you can use them to dynamically link in bsfn's.

Good luck.
 
Hi,

You could try

#pragma comment( lib, "file.lib" )

where file.lib is the name of the library you want to link to. The linker will search the current directory and wherever the the LIB environment variable points.

Craig
 
The typo for MultiByteToWideChar actually fixed one of the issues (it does find that function). So the only issues remaining would be for the ldap functions. It does find the functions in the kernel32.dll (it would help if I typed things correctly - my apologies for wasting your time with that part). Thanks for the catch!

Darren Young
 
Hi,

Try putting

#pragma comment (lib, "Wldap32.lib")

at the top of you C source after #define b5555001_c

Craig
 
Thanks! The #pragma statement allowed a clean listing. Now to just see if my coding was correct. Thanks for all the assistance!

Darren Young

System Information:
Installation: E1 8.12 Update 3; TR: 8.97.1.1;
Tools Baseline: JK14530 Planner: JK16198;
PD EntSrvr=Win2k3R2 DtaCntrEd SP1
DV & PY EntSrvr2=Win2k3R2 EnterpriseEd SP2
DBSrvr=Win2k3R2 DtacntrEd SP1, MS Sql2005 SP2
JASrvr=(2x)Win2k3R2 StdEd SP2, WAS6.0.2.21
 
Back
Top