oracle / odpi

ODPI-C: Oracle Database Programming Interface for Drivers and Applications
https://oracle.github.io/odpi/
Other
264 stars 75 forks source link

ERROR: DPI-1047: Cannot locate a 32-bit Oracle Client library #182

Closed sundar1301 closed 4 months ago

sundar1301 commented 1 year ago
  1. What version of ODPI-C are you using (see dpi.h)? 4.6.1

  2. What OS (and version) is your application on? Windows 10 22H2 19045.3086

  3. What compiler (and version) did you use? Microsoft (R) C/C++ Optimizing Compiler Version 19.36.32537 for x86

  4. What is your version of the Oracle Client (e.g. Instant Client)? How was it installed? Where it is installed? 21.3 Installed in C:\Program Files (x86)\Oracle-InstantClient\instantclient_21_3 ODBC driver installed by IT

  5. What is your Oracle Database version? not sure

  6. What is the PATH environment variable (on Windows) or LD_LIBRARY_PATH (on Linux) set to? Path -> C:\Program Files (x86)\Oracle-InstantClient\instantclient_21_3

  7. What environment variables did you set? How exactly did you set them? ORACLE_HOME -> C:\Program Files (x86)\Oracle-InstantClient\instantclient_21_3

  8. What problem or error(s) you are seeing? ERROR: DPI-1047: Cannot locate a 32-bit Oracle Client library: "The specified module could not be found". See https://oracle.github.io/odpi/doc/installation.html#windows for help (dpiContext_createWithParams : load library) FATAL: Cannot create DPI context.

Note: cx_Python works fine.

cjbj commented 1 year ago

What's the exact scenario? What executable is using ODPI-C? Do the ODPI-C sample programs work? There is a mention of ODBC - but this doesn't use ODPI-C. If you have your own C code, consider calling dpiContext_createWithParams() with oracleClientLibDir set. Try setting the environment variable DPI_DEBUG_LEVEL_LOAD_LIB to to 64 to check the library loading algorithm, see https://odpi-c.readthedocs.io/en/latest/user_guide/debugging.html

Also, nothing should be using Instant Client 21.3 since that is way out of date. Use the latest release update of either the 19c release for apps which need long term support, or of 21c for apps which want the 'innovation release'.

You say cx_Oracle is working - are you sure this isn't 64-bit python?

sundar1301 commented 1 year ago

Sorry for late reply. Thanks for your feedback. I think the problem is with the dll folder location.

cjbj commented 4 months ago

Closing - no activity.