Re: Calling g77 FORTRAN code from MSVC 7?

2004-05-16 Thread Ted Yu
Hi, My DLL produced by Cygwin calls malloc (in cygwin1.dll). This DLL is used by MSVC project. Is this allowed ? What do I need to do to initialize Cygwin heap ? __ Do you Yahoo!? SBC Yahoo! - Internet access at a great low price. http://p

Cygwin runtime

2004-05-05 Thread Ted Yu
Hi, This is related to Cygwin DLL posts. If I stick to Cygwin runtime, I should be able to call DLL generated by Cygwin from MSVC project. For the moment, I encounter exception calling into this DLL: 000f77d0() fft_general_0(float * 0x02e60040, int 256, int 512, int 1) line 163 + 17 bytes bpcorr(co

RE: DLL generation under Cygwin

2004-05-05 Thread Ted Yu
Hi, Igor: > . This is what you invoke when > you give the > -mno-cygwin flag to gcc. Incidentally, once you Does this mean I need to install MinGW runtime ? > That's because you use "ld" instead of "gcc". "gcc" > (with appropriate > flags, i.e., "-mno-cygwin") should do the

RE: DLL generation under Cygwin

2004-05-05 Thread Ted Yu
Hi, Igor: > So does MSVCRT.dll, which is what MinGW uses for its > runtime. I am not familiar with MinGW. What is it ? > Why are you linking in libc.a explicitly? The > appropriate version should > be automatically linked in by the compiler. If I omit libc.a, I get this: ld: warning: cannot find

RE: DLL generation under Cygwin

2004-05-05 Thread Ted Yu
Hi, I deleted .o files and compiled with -mno-cygwin. cygwin1.dll is still needed because it contains malloc() and free() which are used in my DLL. Here is my Makefile: OBJS = \ 8d0.o 8d1.o 8d2.o \ 8c0.o 8c1.o 8c2.o \ 8r0.o 8r1.o 8r2.o \ 8u0.o 8u1.o 8u2.o \ 8

Re: DLL generation under Cygwin

2004-05-04 Thread Ted Yu
Hi, Larry: If I use your flag, I got the following: ld: warning: cannot find entry symbol [EMAIL PROTECTED]; defaulting to 10001000 djbfft2d.o(.text+0x4d3):djbfft2d.cpp: undefined reference to `_imp___iob' djbfft2d.o(.text+0x50a):djbfft2d.cpp: undefined reference to `_imp___iob' BTW, I have this f

DLL generation under Cygwin

2004-05-04 Thread Ted Yu
Hi, Here is some information on exception: if (!hFFT) { hFFT = LoadLibrary("djbfft.dll"); status = GetLastError();// 998 invalid memory access rfour2d = (RFOUR2D) GetProcAddress(hFFT, "rfft2d_djb");