_CRT_SECURE_NO_DEPRECATE

31 views
Skip to first unread message

oscar.reyes

unread,
Oct 20, 2008, 11:35:26 PM10/20/08
to Enso Developers
I've got this messsage while building enso on Windows.

Message: 'This function or variable may be unsafe. Consider
using _snprintf_s instead. To disable deprecation, use
_CRT_SECURE_NO_DEPRECATE. S
ee online help for details.'


I fix it by adding the following line:

#define _CRT_SECURE_NO_DEPRECATE

As the first line in the header in turn.

Is there a better way to do this? I tried to include it on WindSdk.h
but it didn't work.

oscar.reyes

unread,
Oct 20, 2008, 11:37:21 PM10/20/08
to Enso Developers
Ouch.. I guess that's why VS 2003 was needed. :(


On Oct 20, 10:35 pm, "oscar.reyes" <oscar.reyes.delac...@gmail.com>
wrote:

Blair McBride

unread,
Oct 21, 2008, 3:03:19 AM10/21/08
to enso-de...@googlegroups.com
Try adding it somewhere in the SCons build file. I forget exactly
where - somewhere with the rest of the defines.

- Blair

oscar.reyes

unread,
Oct 21, 2008, 3:23:30 AM10/21/08
to Enso Developers
Yeap, I saw your post a few hours ago ( I haven't read it when I post
this ).

Thanks.

And after that I got hang with the following:

http://stackoverflow.com/questions/220902/load-dll-from-python

So now I downloaded VS C++ 2008 express and Python 2.6 ( both use
vscr90.dll ) ... looks like that part is solved that part already, now
I'm stock with:


ImportError: No module named _cairo


: - |

:'(

On Oct 21, 2:03 am, "Blair McBride" <unfocu...@gmail.com> wrote:
> Try adding it somewhere in the SCons build file. I forget exactly
> where - somewhere with the rest of the defines.
>
> - Blair
>
> On Tue, Oct 21, 2008 at 4:37 PM, oscar.reyes
>

Blair McBride

unread,
Oct 21, 2008, 4:03:36 AM10/21/08
to enso-de...@googlegroups.com
If you look at the modules that were compiled, and there's a
"_cairo.dll" then you'll need to rename it to "_cairo.pyd". Starting
with version 2.5, Python will only load compiled modules with the .pyd
extension. So if that's the case, there will be other files that need
renaming too. There are changes that can be made to the SCons build
files to automate naming the compiled modules as .pyd - I think I
detailed the changes in my other post (I don't have the changes with
me at the moment).

- Blair

Spike Curtis

unread,
Oct 21, 2008, 4:23:27 AM10/21/08
to enso-de...@googlegroups.com
Not that I have a better explanation, but Python 2.5 will happily load .dll
files, it just looks for .pyd files first. There must be some other problem
with the way Python/Enso is loading the modules that renaming the file is
enough to kick it into finding them. Renaming this way *shouldn't* be
necessary, and I've had it work both ways in both 2.5 and 2.4.

So, in short, I don't know what's wrong for Oscar, but Blair's suggestion
should be a temporary fix. In the long run, I'd like to get to the bottom
of this one.

-Spike

oscar.reyes

unread,
Oct 21, 2008, 5:09:52 AM10/21/08
to Enso Developers
Perhaps a Python environment variable? The only one I have is
PYTHONPATH=.

mmhhh Changing manually _cairo.dll for _caido.pyd makes no difference
the following messange appears:
....
....
File "C:\oreyes\apps\enso\enso-comunity\enso\platform\win32\cairo
\__init__.py", line 1, in <module>
from _cairo import *
ImportError: No module named _cairo

But if I change the PYTHONPATH to set PYTHONPATH=.;src\platform
\win32\Graphics\pycairo\cairo

The message with _cairo.dll is:

ImportError: No module named _cairo

while changing to _cairo.pyd is:
ImportError: DLL load failed: No se puede encontrar el m¾dulo
especificado. (specified module cannot be found)


So python path makes a difference....

I'll keep trying for a little while.

BTW does comunity and trunk make any difference? I started working at
trunk and I've switched to comunity ( 2 hrs ago or something )

Blair McBride

unread,
Oct 21, 2008, 8:00:39 AM10/21/08
to enso-de...@googlegroups.com
Regarding loading of .dll/.pyd - I was going off what worked for me
when I was figuring out how to build Enso on Windows, for 2.4 then
2.5. At the time, I'd seen the following item in the release logs for
Python 2.5:

- On Windows, .DLL is not an accepted file name extension for
extension modules anymore; extensions are only found if they
end in .PYD.

(From http://www.python.org/download/releases/2.5/NEWS.txt)

As I said - I tried it and it worked for me then.

- Blair

blackdaemon

unread,
Oct 21, 2008, 9:34:00 AM10/21/08
to Enso Developers
Guys,
community version will not work on win32 at the moment, there have to
be done several changes
inside .h and .cxx files and also SConscript files and others.
Look at my 'experimental' branch based on 'community' branch, it's all
fixed there, it is buildable with
VS2008 with Python 2.5 and working on Windows XP.
You can either download it as a patch to community version or simply
download it directly from
my GIT repo.
As a bonus, some other bugs relating to win32 are fixed there too, and
also possibility to define custom
font. Just read the commit comments.

here:
http://blackdaemon.no-ip.org/git/?p=enso/enso-open-source.git;a=shortlog;h=refs/heads/experimental

Regards

On Oct 21, 5:09 am, "oscar.reyes" <oscar.reyes.delac...@gmail.com>
wrote:

oscar.reyes

unread,
Oct 22, 2008, 7:09:41 PM10/22/08
to Enso Developers
I've manage to compile and load most of the dlls. But now I have a
little problem.

I'm not posting anymore to this thread and start a new one.
Reply all
Reply to author
Forward
0 new messages