Hi Edward.

I have a the file
*python27.lib*
in C:\Python27\libs.

I still don't have a clue whats wrong.
Could it be something with Visual C++ 2005 Express Edition?

I am not sure the installation went correct, since when I do
Windows Start button->Microsoft Windows SDK v7.1->Visual Studio
Registration->Windows SDK Configuration Tool
Change "Installed Windows SDK Versions:" from v7.1 to 8.0
I get an error:
"Your system does not have Visual Studio 2005 or  Visual Studio 2008
installed"

Best

Troels Emtekær Linnet


2013/5/11 Edward d'Auvergne <[email protected]>

> Hi,
>
> We should be able to get to the bottom of the problem and make this
> run.  But setting up the development platform on MS Windows of the
> MSVS compiler and Python is always painful.  Because of this I set up
> a virtual machine image of Windows 2000 with MSVS 2005 many years ago
> and have been using this to build the Windows pre-compiled relax
> distributions (http://www.nmr-relax.com/download.html#MS_Windows) ever
> since.  I have updated Python to version 2.7 on this vm, but the
> compiler setup works and I don't want to have to set up another
> environment.
>
> From the error messages, it is clear that this 2012 version of the
> Microsoft compiler catches more problems in the code.  The warning:
>
> c:\python27\github\relax_disp\target_functions\relax_fit.c(137) :
> warning C4700: uninitialized local variable 'params' used
>
> may be an issue.  I think this is harmless, but you could try to
> comment out line 137 of that file (the call to the exponential()
> function) and see if that makes a difference.  This is inside the
> dfunc() function which is both non-functional and not used.  This is
> supposed to return the gradient of the exponential curve but is not
> implemented yet as simplex optimisation, which does not require the
> gradient or Hessian, was sufficient for finding the solution for this
> 2 parameter problem.
>
> From these new messages, it is clear that the Python.h file is being
> found.  The include /I"C:\Python27\Scripts\..\include" is interesting
> as this implies that sys.prefix as seen by scons is set to
> "C:\Python27\Scripts\..".  Although strange, this may not be an issue.
>  But when you run Python, you see sys.prefix as "C:\Python27".
> Hmmmm.....
>
> Maybe the problem is not that Python.h cannot be found, but that the
> python32.lib file cannot be found.  Can you see this file in your
> C:\Python27\libs\ directory?  You can see that this is used in the
> linking command:
>
> link /nologo /dll /out:target_functions\relax_fit.pyd
> /implib:target_functions\relax_fit.lib /LIBPATH:C:\Python27\libs
> target_functions\c_chi2.obj target_functions\exponential.obj
> target_functions\relax_fit.obj
>
> On Windows, there should be a python32.lib file in the LIBPATH.
>
> Regards,
>
> Edward
>
>
>
>
>
>
> On 11 May 2013 12:41, Troels Emtekær Linnet <[email protected]> wrote:
> > Hi Edward.
> >
> > Sigh.
> >
> > I have looked around for
> > "error LNK2019: unresolved external symbol"
> > and it seems that many experience the problem.
> >
> > But there don't seem to be an universal explanation/bug fix.
> > And if I find a thing I would like to try, I really don't know where to
> > start. ? :-)
> >
> > - "In Visual-Studio most linkage problems are related to forget adding
> .cpp
> > files."
> > - Url 2,  Url3, Url4, Url5, Url6
> >
> > In the last Url, there is this solution:
> > ---
> > in the Project properties, set the Platform Toolset to VS2008 (v90) and
> the
> > correct directories depending on your installation (ie : include =>
> > C:\Program Files (x86)\Windows Kits\8.0\Include\shared;C:\Program Files
> > (x86)\Windows Kits\8.0\Include\um;$(IncludePath) and Libraries =>
> C:\Program
> > Files (x86)\Windows Kits\8.0\Lib\win8\um\x64;$(LibraryPath)). Don't
> forget
> > to set the .lib in Link entries.
> > ---
> >
> > After installation of Visual Studio 2012, I do have the folder:
> > C:\Program Files (x86)\Windows Kits\8.0
> >
> > I have  attached a text file, how I have installed until now.
> >
> > I hope we can break this "annoying behaviour?"
> > Where should I look, if .ccp files is added ??
> >
> > Best
> > Troels
> > ------------------------
> >
> > C:\Python27\github\relax_disp>scons clean_all
> > scons: Reading SConscript files ...
> > scons: done reading SConscript files.
> > scons: Building targets ...
> > clean_manual_files(["manual_clean"], [])
> >
> > ##########################################
> > # Cleaning up the temporary manual files #
> > ##########################################
> >
> >
> >
> >
> >
> >
> > clean_files(["clean"], [])
> >
> > ###############################
> > # Cleaning up temporary files #
> > ###############################
> >
> >
> >
> > Removing the files ending in ['pyc', 'pyo', 'bak', 'o', 'os', 'obj',
> 'exp',
> > 'lib
> > '].
> >
> > Removing temporary relax save state files (of the form
> > relax_state_xxxxxxxx_xxxx
> > xx.bz2).
> >
> > Removing the Python 3 __pycache__ directories.
> >
> >
> >
> >
> >
> > clean_all_files(["clean_all"], [])
> >
> > #########################
> > # Cleaning up all files #
> > #########################
> >
> >
> >
> > Removing the files ending in ['so', 'sconsign', 'dll', 'pyd'].
> >
> >
> >
> >
> >
> > scons: done building targets.
> >
> > C:\Python27\github\relax_disp>scons
> > scons: Reading SConscript files ...
> > scons: done reading SConscript files.
> > scons: Building targets ...
> >
> >
> >
> >
> > ###########################
> > # Compiling the C modules #
> > ###########################
> >
> >
> > Building the relaxation curve fitting module
> > 'target_functions\\relax_fit.pyd'
> >
> > cl /Fotarget_functions\c_chi2.obj /c target_functions\c_chi2.c /nologo
> > /I"C:\Pyt
> > hon27\Scripts\..\include"
> > c_chi2.c
> > cl /Fotarget_functions\exponential.obj /c target_functions\exponential.c
> > /nologo
> >  /I"C:\Python27\Scripts\..\include"
> > exponential.c
> > cl /Fotarget_functions\relax_fit.obj /c target_functions\relax_fit.c
> /nologo
> > /I"
> > C:\Python27\Scripts\..\include"
> > relax_fit.c
> > c:\python27\github\relax_disp\target_functions\relax_fit.c(137) : warning
> > C4700:
> >  uninitialized local variable 'params' used
> > link /nologo /dll /out:target_functions\relax_fit.pyd
> > /implib:target_functions\r
> > elax_fit.lib /LIBPATH:C:\Python27\libs target_functions\c_chi2.obj
> > target_functi
> > ons\exponential.obj target_functions\relax_fit.obj
> >    Creating library target_functions\relax_fit.lib and object
> > target_functions\r
> > elax_fit.exp
> > relax_fit.obj : error LNK2019: unresolved external symbol
> > __imp__PyFloat_FromDou
> > ble referenced in function _func
> > relax_fit.obj : error LNK2019: unresolved external symbol
> > __imp__PyFloat_AsDoubl
> > e referenced in function _setup
> > relax_fit.obj : error LNK2019: unresolved external symbol
> __imp__PyList_New
> > refe
> > renced in function _back_calc_I
> > relax_fit.obj : error LNK2019: unresolved external symbol
> > __imp__PyList_SetItem
> > referenced in function _back_calc_I
> > relax_fit.obj : error LNK2019: unresolved external symbol
> > __imp__PyArg_ParseTupl
> > e referenced in function _func
> > relax_fit.obj : error LNK2019: unresolved external symbol
> > __imp__PyArg_ParseTupl
> > eAndKeywords referenced in function _setup
> > relax_fit.obj : error LNK2019: unresolved external symbol
> > __imp__Py_InitModule4
> > referenced in function _initrelax_fit
> > relax_fit.obj : error LNK2019: unresolved external symbol
> > __imp__PySequence_GetI
> > tem referenced in function _setup
> > relax_fit.obj : error LNK2019: unresolved external symbol
> > __imp___Py_NoneStruct
> > referenced in function _setup
> > target_functions\relax_fit.pyd : fatal error LNK1120: 9 unresolved
> externals
> > scons: *** [target_functions\relax_fit.pyd] Error 1120
> > scons: building terminated because of errors.
> >
> > C:\Python27\github\relax_disp>python
> > Enthought Python Distribution -- www.enthought.com
> > Version: 7.3-2 (64-bit)
> >
> > Python 2.7.3 |EPD 7.3-2 (64-bit)| (default, Apr 12 2012, 15:20:16) [MSC
> > v.1500 6
> > 4 bit (AMD64)] on win32
> > Type "credits", "demo" or "enthought" for more information.
> >>>> import sys
> >>>> from os import path
> >>>> print sys.prefix + path.sep + 'include'
> > C:\Python27\include
> >>>>
> > C:\Python27\github\relax_disp>dir C:\Python27\include\Python*
> >  Directory of C:\Python27\include
> >
> > 15-04-2013  00:37            21.113 Python-ast.h
> > 15-04-2013  00:37             4.329 Python.h
> > 15-04-2013  00:37             7.339 pythonrun.h
> >                3 File(s)         32.781 bytes
> >                0 Dir(s)  60.963.274.752 bytes free
> >
> > C:\Python27\github\relax_disp>
>
_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
[email protected]

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel

Reply via email to