Re: [cx-oracle-users] cx_Oracle compiled in MS VC++ 2010 (MSC v1600) 64 bit
Brought to you by:
atuining
From: Amaury F. d'A. <ama...@gm...> - 2017-05-16 14:42:13
|
Hi, If you build the extension manually, you have to ensure that the init function is correctly exported by the dll. Either add this to the link command line: /EXPORT:initcx_Oracle or modify cx_Oracle.c, at the very bottom of the file: __declspec(dllexport) void initcx_Oracle(void) { 2017-05-16 15:36 GMT+02:00 M.M.Rashid (Rubel) <mm...@gm...>: > Dear All, > > Due to in house python distribution which was compiled in MSC++ v2010, I > had to compile cx_Oracle with the same version. In doing so, I am having > two issues: > > > > - If I compile in DEBUG mode, I get this error: > > * LINK : fatal error LNK1104: cannot open file 'python27_d.lib'* > > in my python instillation, I only have release library - > python27.lib > > - So, I tried to compile in Release mode and this time it links fine. > I got the cx_oracle.pyd. Copying the pyd in sys.path and then trying to > import gives this error: > > > *Python 2.7.11 (default, Mar 10 2016, 10:58:13) [MSC v.1600 64 bit > (AMD64)] on win32* > *Type "help", "copyright", "credits" or "license" for more information.* > > *>>> import cx_Oracle* > > *Traceback (most recent call last):* > > * File "<stdin>", line 1, in <module>* > > *ImportError: dynamic module does not define init function (initcx_Oracle)* > > *>>>* > > > > What steps am I missing here? > > -- > M. M. RASHID(Rubel) > Perth, Australia. > > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > -- Amaury Forgeot d'Arc |