Discussion:
[omniORB] Trying 4.1.7 on Visual Studio 12
James Kulp
2013-11-02 19:56:32 UTC
Permalink
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 that
don'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 : error LNK2019: 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(class CaseLabel *)"
(?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 in function "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 external symbol
__imp__PyObject_CallMethod 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__PyObject_Size referenced in function _IdlPyRelativeScopedName
idlpython.o : error LNK2019: 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 external symbol __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
Obermaier, Stephen J (IS)
2013-11-02 21:25:13 UTC
Permalink
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 have to 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 that don'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 : error LNK2019: 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(class CaseLabel *)"
(?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 in function "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 external symbol __imp__PyObject_CallMethod 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__PyObject_Size referenced in function _IdlPyRelativeScopedName idlpython.o : error LNK2019: 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 external symbol __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
James Kulp
2013-11-03 16:52:23 UTC
Permalink
Thanks for feedback.
I installed the 2.7.5 MSI for x86_64 from the python site.
My windows 7 system in 64 bit, confirmed in the control panel.
There doesn't appear to be any 64 bit specific configuration in omniorb.
Python headers look for #ifdef _WIN64, but I notice that the VS12
compiler does not set this.
(but this probably does not relate to the problem at hand).
It looks like the compiled omniidl files are referencing dll symbols
(__imp__).
Using dumpbin /all on python27.lib, it shows, e.g., a symbol:
__imp_PyType_IsSubType
(note single underscore after "imp")

Where as the undefined in the error message is:

idlpython.o : error LNK2019: unresolved external symbol __imp__PyType_IsSubtype referenced in function _IdlPyCompile


Which is double underscore after the "imp"??
Post by Obermaier, Stephen J (IS)
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 have to 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 that don't exist in python2.7, like "python27\lib\x86_win32" and "python27\PCBuild".
Any ideas?
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 *)"
idlpython.o : error LNK2019: unresolved external symbol __imp__PyLong_FromLongLong referenced in function "public: virtual void __thiscall PythonVisitor::visitCaseLabel(class CaseLabel *)"
idlpython.o : error LNK2019: unresolved external symbol __imp__PyFloat_FromDouble referenced in function "public: virtual void __thiscall PythonVisitor::visitConst(class Const *)"
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 *)"
idlpython.o : error LNK2019: unresolved external symbol __imp__PyList_SetItem referenced in function "private: struct _object * __thiscall PythonVisitor::commentsToList(class Comment const *)"
idlpython.o : error LNK2019: unresolved external symbol __imp__PyList_Insert referenced in function _IdlPyRelativeScopedName idlpython.o : error LNK2019: 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(class CaseLabel *)"
idlpython.o : error LNK2019: unresolved external symbol
idlpython.o : error LNK2019: unresolved external symbol __imp__PyObject_Size referenced in function _IdlPyRelativeScopedName idlpython.o : error LNK2019: 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 external symbol __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
James Kulp
2013-11-04 12:53:37 UTC
Permalink
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
Post by Obermaier, Stephen J (IS)
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?
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 *)"
idlpython.o : error LNK2019: unresolved external symbol __imp__PyLong_FromLongLong referenced in function "public: virtual void __thiscall PythonVisitor::visitCaseLabel(class CaseLabel *)"
idlpython.o : error LNK2019: unresolved external symbol __imp__PyFloat_FromDouble referenced in function "public: virtual void __thiscall PythonVisitor::visitConst(class Const *)"
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 *)"
idlpython.o : error LNK2019: unresolved external symbol __imp__PyList_SetItem referenced in function "private: struct _object * __thiscall PythonVisitor::commentsToList(class Comment const *)"
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 *)"
idlpython.o : error LNK2019: unresolved external symbol
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
Obermaier, Stephen J (IS)
2013-11-04 14:00:48 UTC
Permalink
Good to hear!

I did do a pure x64 build and other than some of the make veryclean issues it worked just fine.

Steve O.

-----Original Message-----
From: James Kulp [mailto:jek at parera.com]
Sent: Monday, November 04, 2013 7:54 AM
To: Obermaier, Stephen J (IS); omniorb-list at omniorb-support.com
Subject: Re: EXT :[omniORB] Trying 4.1.7 on Visual Studio 12

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
Post by Obermaier, Stephen J (IS)
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?
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 *)"
idlpython.o : error LNK2019: unresolved external symbol __imp__PyLong_FromLongLong referenced in function "public: virtual void __thiscall PythonVisitor::visitCaseLabel(class CaseLabel *)"
virtual void __thiscall PythonVisitor::visitCaseLabel(class CaseLabel
idlpython.o : error LNK2019: unresolved external symbol __imp__PyFloat_FromDouble referenced in function "public: virtual void __thiscall PythonVisitor::visitConst(class Const *)"
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 *)"
idlpython.o : error LNK2019: unresolved external symbol __imp__PyList_SetItem referenced in function "private: struct _object * __thiscall PythonVisitor::commentsToList(class Comment const *)"
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 *)"
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
__thiscall PythonVisitor::PythonVisitor(void)"
external symbol __imp__PySys_SetArgv referenced in function _main
idlpython.o : error LNK2019: unresolved external symbol
__thiscall PythonVisitor::PythonVisitor(void)"
externalsymbol __imp__PyObject_CallMethod referenced in funct
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
unresolved externalsymbol __imp__PyFile_Type idlpython.o : error
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
Loading...