msvcrt

Py2exe with Tkinter

时间秒杀一切 提交于 2019-12-01 06:46:46
I'm trying to convert a basic tkinter GUI program to an .exe using py2exe. However I've run into an error using the following conversion script. # C:\Python26\test_hello_con.py py2exe from distutils.core import setup import py2exe setup(windows=[r'C:\Python26\py2exe_test_tk.py']) C:\Python26\py2exe_test_tk.py is the following code import Tkinter as tk root = tk.Tk() root.title("Test") label1 = tk.Label(root,text="Hello!",font=('arial', 10, 'bold'), bg='lightblue') label1.pack(ipadx=100, ipady=100) root.mainloop() This is the error I get when I try to run the newly created .exe Traceback (most

Py2exe with Tkinter

别等时光非礼了梦想. 提交于 2019-12-01 05:37:26
问题 I'm trying to convert a basic tkinter GUI program to an .exe using py2exe. However I've run into an error using the following conversion script. # C:\Python26\test_hello_con.py py2exe from distutils.core import setup import py2exe setup(windows=[r'C:\Python26\py2exe_test_tk.py']) C:\Python26\py2exe_test_tk.py is the following code import Tkinter as tk root = tk.Tk() root.title("Test") label1 = tk.Label(root,text="Hello!",font=('arial', 10, 'bold'), bg='lightblue') label1.pack(ipadx=100, ipady

Side-by-side configuration error (Microsoft.VC80.CRT v8.0.50608.0)

人盡茶涼 提交于 2019-12-01 05:36:45
I have an assembly with the following manifest embedded: <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50608.0" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity> </dependentAssembly> </dependency> </assembly> On one of my machines this assembly doesn't work (the assembly fails to load). Opening this in dependency walker gives me the following error message: Error: The Side-by-Side configuration information for "SomeAssembly.dll"

How can I resolve this link error in Visual Studio (LNK2005)?

心已入冬 提交于 2019-11-30 23:03:00
I keep having linker errors of the following form: libcmtd.dll msvmrtd.dll some element(ex: _mkdir ) already defined... and I don't know how to resolve them. Here is a complete error message: private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj) MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj) Can you help me solve this issue? Check a few things: Are your

Is there a fundamental difference between malloc and HeapAlloc (aside from the portability)?

人盡茶涼 提交于 2019-11-30 20:22:17
I'm having code that, for various reasons, I'm trying to port from the C runtime to one that uses the Windows Heap API. I've encountered a problem: If I redirect the malloc / calloc / realloc / free calls to HeapAlloc / HeapReAlloc / HeapFree (with GetProcessHeap for the handle), the memory seems to be allocated correctly (no bad pointer returned, and no exceptions thrown), but the library I'm porting says "failed to allocate memory" for some reason. I've tried this both with the Microsoft CRT (which uses the Heap API underneath) and with another company's run-time library (which uses the

How can I resolve this link error in Visual Studio (LNK2005)?

£可爱£侵袭症+ 提交于 2019-11-30 17:25:28
问题 I keep having linker errors of the following form: libcmtd.dll msvmrtd.dll some element(ex: _mkdir ) already defined... and I don't know how to resolve them. Here is a complete error message: private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj) MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z)

Why is vector deleting destructor being called as a result of a scalar delete?

北战南征 提交于 2019-11-30 14:57:19
问题 I have some code that is crashing in a large system. However, the code essentially boils down to the following pseudo-code. I've removed much of the detail, as I have tried to boil this down to the bare bones; I don't think this misses anything crucial though. // in a DLL: #ifdef _DLL #define DLLEXP __declspec(dllexport) #else #define DLLEXP __declspec(dllimport) #endif class DLLEXP MyClass // base class; virtual { public: MyClass() {}; virtual ~MyClass() {}; some_method () = 0; // pure

Is MSVCRT's implementation of fprintf() thread safe?

扶醉桌前 提交于 2019-11-30 14:17:01
It seems that glibc's implementation of fprintf() is thread-safe , but is that so for Microsoft's CRT, as well? By thread-safe, I don't mean just crashing, but also that if multiple threads (in the same process) call fprintf() , the texts will not be mixed. That is, for example, if thread A calls fprintf(stdout, "aaaa"); and thread B calls fprintf(stdout, "bbbb"); it's guaranteed not to mix to become aabbaabb . Is there such a guarantee? Yes. In the multithreaded runtime libraries, every stream has an associated lock. This lock is acquired at the beginning of any call to a printf function and

Why is vector deleting destructor being called as a result of a scalar delete?

╄→尐↘猪︶ㄣ 提交于 2019-11-30 12:14:57
I have some code that is crashing in a large system. However, the code essentially boils down to the following pseudo-code. I've removed much of the detail, as I have tried to boil this down to the bare bones; I don't think this misses anything crucial though. // in a DLL: #ifdef _DLL #define DLLEXP __declspec(dllexport) #else #define DLLEXP __declspec(dllimport) #endif class DLLEXP MyClass // base class; virtual { public: MyClass() {}; virtual ~MyClass() {}; some_method () = 0; // pure virtual // no member data }; class DLLEXP MyClassImp : public MyClass { public: MyClassImp( some_parameters

Is MSVCRT under Windows like glibc (libc) under *nix?

不问归期 提交于 2019-11-30 11:27:00
问题 I frequently come across Windows programs that bundle in MSVCRT (or their more current equivalents) with the program executables. On a typical PC, I would find many copies of the same .DLL's. My understanding is that MSVCRT is the C runtime library, somewhat analogous to glibc/libc.so under *nix. Why do Windows programs have to bring along their C libraries with them, instead of just sharing the system-wide libc? Update: thanks to Shog9, I started to read about SxS, which has further opened