[omniORB] EXT : Trying 4.1.7 on Visual Studio 12
James Kulp
jek at parera.com
Mon Nov 4 12:53:37 GMT 2013
This problem did in fact relate to 64 bit vs 32 bit.
On a 64 bit Windows 7 installation, Visual Studio 12.0 (2013), as a
default, compiles code that will not link against the python 64 bit
installation. The error is based on symbols that have one less
underscore in the 64 bit python dll import library (.lib).
I succeeded by using a 32 bit python installation on the 64 bit windows
installation. I did not yet try to make a completely 64 bit
installation of WIndows 7 + python + omniorb.
The two other glitches I had to fix were:
1. The "user access controls" had to be disabled in the control panel
(and a reboot of course). Otherwise the gnuwin32-lite "install" program
would not run.
2. The "clwrapper" code had to access the registry using
HKEY_CURRENT_USER rather than HKEY_LOCAL_MACHINE for the "cygdrive
prefix" entry. The code should probably try both.
I also had to do "veryclean" since some dependency files (*.d) had
incorrect dependencies (a cygdrive prefix issue).
I also note that "veryclean" does not clean/rebuild the windows wrapper
tool executables. The build process is not set up to rebuild these,
and that was required to make the registry key fix.
If I get around to the pure 64 bit setup, I'll report on that later.
Cheers,
Jim
On 11/2/13 5:25 PM, Obermaier, Stephen J (IS) wrote:
> Hi James -
>
> The first question is your machine target (X64 or win32). Based on your target (64-bit or 32-bit) you need to link with the appropriate Python dlls. There are both a 64-bit and 32-bit versions of Python, and you must download the correct version of python to support the build. You can have both Python implementations coexist on the same machine, but you haveto set up some specific environment variables to do this (PYTHONPATH, PYTHONHOME).
>
> The other issue I ran into when building VS2012 is that the make veryclean does not purge all the pdb files in the debug directories (codesets, dynamic, connections and orbcore) so you must explicitly delete these or a VC12 build will fail (if you are building the debug dlls).
>
>
> Good luck,
>
> Steve Obermaier
>
>
>
> -----Original Message-----
> From: James Kulp [mailto:jek at parera.com]
> Sent: Saturday, November 02, 2013 3:57 PM
> To: omniorb-list at omniorb-support.com
> Subject: EXT :[omniORB] Trying 4.1.7 on Visual Studio 12
>
> I figured I would give this a try on WIndows 7 and Visual Studio 12.0 (2013). (setting the platform to vs10).
>
> There is some sort of python library issue (below).
> The symbols in question are in the python27.lib which is referenced on the link line, but not with the __imp__ prefix.
> (using dumpbin /exports).
> I'm no WIndows or Python expert at all. I tried two different precompiled python packages for windows, with the same error.
> I have not yet tried building python from source on VS12.
> I did notice that several of the "libpath" entries point to places thatdon't exist in python2.7, like "python27\lib\x86_win32" and "python27\PCBuild".
>
> Any ideas?
>
> Here are the errors:
> link -out:omniidl.exe -nologo -manifest -DEBUG -libpath:c:\python27\libs
> -libpath:c:\python27\lib\x86_win32 -libpath:c:\python27\PCbuild -PDB:omniidl.exe.pdb -libpath:..\..\..\..\lib\x86_win32 y.tab.o lex.yy.o idlerr.o idlutil.o idltype.o idlrepoId.o idlscope.o idlexpr.o idlast.o idlvalidate.o idldump.o idlconfig.o idlfixed.o idlpython.o python27.lib
> Creating library omniidl.lib and object omniidl.exp idlpython.o : error LNK2019: unresolved external symbol __imp__PyType_IsSubtype referenced in function _IdlPyCompile idlpython.o : error LNK2019: unresolved external symbol __imp__PyObject_SetAttrString referenced in function _init_omniidl idlpython.o : error LNK2019: unresolved external symbol __imp__PyInt_FromLong referenced in function _IdlPyAlwaysTempFile idlpython.o : error LNK2019: unresolved external symbol __imp__PyLong_FromUnsignedLong referenced in function "public: virtual void __thiscall PythonVisitor::visitCaseLabel(class CaseLabel *)"
> (?visitCaseLabel at PythonVisitor@@UAEXPAVCaseLabel@@@Z)
> idlpython.o : error LNK2019: unresolved external symbol __imp__PyLong_FromLongLong referenced in function "public: virtual void __thiscall PythonVisitor::visitCaseLabel(class CaseLabel *)"
> (?visitCaseLabel at PythonVisitor@@UAEXPAVCaseLabel@@@Z)
> idlpython.o : error LNK2019: unresolved external symbol __imp__PyLong_FromUnsignedLongLong referenced in function "public:
> virtual void __thiscall PythonVisitor::visitCaseLabel(class CaseLabel *)" (?visitCaseLabel at PythonVisitor@@UAEXPAVCaseLabel@@@Z)
> idlpython.o : error LNK2019: unresolved external symbol __imp__PyFloat_FromDouble referenced in function "public: virtual void __thiscall PythonVisitor::visitConst(class Const *)"
> (?visitConst at PythonVisitor@@UAEXPAVConst@@@Z)
> idlpython.o : error LNK2019: unresolved external symbol __imp__PyString_FromString referenced in function _IdlPyPlatformDefines idlpython.o : error LNK2019: unresolved external symbol __imp__PyString_AsString referenced in function _IdlPyCompile idlpython.o : error LNK2019: unresolved external symbol __imp__PyList_New referenced in function _IdlPyPlatformDefines idlpython.o : error LNK2019: unresolved external symbol __imp__PyList_GetItem referenced in function "public: virtual void __thiscall PythonVisitor::visitTypedef(class Typedef *)"
> (?visitTypedef at PythonVisitor@@UAEXPAVTypedef@@@Z)
> idlpython.o : error LNK2019: unresolved external symbol __imp__PyList_SetItem referenced in function "private: struct _object * __thiscall PythonVisitor::commentsToList(class Comment const *)"
> (?commentsToList at PythonVisitor@@AAEPAU_object@@PBVComment@@@Z)
> idlpython.o : error LNK2019: unresolved external symbol __imp__PyList_Insert referenced in function _IdlPyRelativeScopedName idlpython.o : errorLNK2019: unresolved external symbol __imp__PyList_Append referenced in function _IdlPyPlatformDefines idlpython.o : error LNK2019: unresolved external symbol __imp__PyFile_AsFile referenced in function _IdlPyCompile idlpython.o : error LNK2019: unresolved external symbol __imp__PyFile_Name referenced in function _IdlPyCompile idlpython.o : error LNK2019: unresolved external symbol __imp__PyErr_SetString referenced in function _IdlPyCompile idlpython.o : error LNK2019: unresolved external symbol __imp__PyArg_ParseTuple referenced in function _IdlPyCompile idlpython.o : error LNK2019: unresolved external symbol __imp__Py_BuildValue referenced in function "public: virtual void __thiscall PythonVisitor::visitCaseLabel(classCaseLabel *)"
> (?visitCaseLabel at PythonVisitor@@UAEXPAVCaseLabel@@@Z)
> idlpython.o : error LNK2019: unresolved external symbol
> __imp__Py_InitModule4 referenced in function _init_omniidl idlpython.o : error LNK2019: unresolved external symbol __imp__Py_Initialize referenced in function _main idlpython.o : error LNK2019: unresolved external symbol __imp__PyRun_SimpleStringFlags referenced in function _main idlpython.o : error LNK2019: unresolved external symbol __imp__PyRun_InteractiveLoopFlags referenced in function _IdlPyRunInteractiveLoop idlpython.o : error LNK2019: unresolved external symbol __imp__PyErr_Print referenced infunction "public: __thiscall PythonVisitor::PythonVisitor(void)" (??0PythonVisitor@@QAE at XZ) idlpython.o : error LNK2019: unresolved external symbol __imp__PySys_SetArgv referenced in function _main idlpython.o : error LNK2019: unresolved external symbol __imp__PyImport_ImportModule referenced in function "public: __thiscall PythonVisitor::PythonVisitor(void)" (??0PythonVisitor@@QAE at XZ) idlpython.o : error LNK2019: unresolved externalsymbol __imp__PyObject_CallMethod referenced in funct
ion "private: struct _object * __thiscall PythonVisitor::commentsToList(class Comment const *)" (?commentsToList at PythonVisitor@@AAEPAU_object@@PBVComment@@@Z)
> idlpython.o : error LNK2019: unresolved external symbol __imp__PyObject_Size referenced in function _IdlPyRelativeScopedName idlpython.o : errorLNK2019: unresolved external symbol __imp__PySequence_Check referenced in function _IdlPyRelativeScopedName idlpython.o : error LNK2019: unresolved external symbol __imp__PySequence_GetItem referenced in function _IdlPyRelativeScopedName idlpython.o : error LNK2001: unresolved external symbol __imp___Py_NoneStruct idlpython.o : error LNK2001: unresolved externalsymbol __imp__PyFile_Type idlpython.o : error LNK2001: unresolved external symbol __imp__PyExc_IOError idlpython.o : error LNK2001: unresolved external symbol __imp__PyExc_TypeError omniidl.exe : fatal error LNK1120: 34 unresolved externals
>
>
>
> _______________________________________________
> omniORB-list mailing list
> omniORB-list at omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list
More information about the omniORB-list
mailing list