Behavior of static variable in Template in cygwin dynamic library (dll)

2007-04-15 Thread andy wang
Hi, All, Recently I met the problem that I have seen the similar problem reported before in this forum " cygwin, g++, templates, and DLLs" http://cygwin.com/ml/cygwin/2006-04/msg00480.html (1) you have a DLL whose source code includes a template class. (2) that template class has a static member

Re: email and gmail

2007-01-16 Thread andy wang
Hi, Jeremy, Or on another way, just get rid of SMTP+TLS stuff and directly use Google API to access your gmail. Unless you need your own smtp server to talk with gmail server.. Regards, Andy -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwi

select failed: Interrupted system call

2006-12-25 Thread andy wang
Hi, All: What's the reason can cause interrupted system call. the same program will not be interrupted running at linux. I know a singal can, Is there anything else can? Is there possible that pthread_cond_signal will do the same thing too? Regards, Andy -- Unsubscribe info: http://cygwin

Re: "Command not found" error on gcc & v

2006-12-25 Thread andy wang
I think "+" sign is just say it is a directory like, not "seleced". If you want to install vi and gcc, please make sure the you click the "Skip" on the "New" column (with default view, it's the third column). then you can see the text change from "Skip" to "Keep" and the seond column will display

Re: how to debug with the crash especially with the corrupt stack in multi-thread environment using gdb.

2006-12-25 Thread andy wang
Thanks .Larry! If the bug is not in the cygwin1.dll but an application and with stack corrupted, how can I using the low level debug technics to find the reason. Regards, Andy Download a snapshot with symbols so you get better stack info: Either that, or build c

how to debug with the crash especially with the corrupt stack in multi-thread environment using gdb.

2006-12-24 Thread andy wang
Hi, All: now I get a new question: how to debug with the crash, especially with the corrupt stack in multi-thread environment using gdb. I found a related post using "info reg, watch 0x230" such low level command to trace a crash. http://www.cygwin.com/ml/cygwin/2004-02/msg00921.html My que

Re: Is it possible to directly call a function in a dlopen library

2006-12-23 Thread andy wang
Brain, Thanks for the very useful details. I think such tricky technics will be normal in the future. automatically load the dynamic library on the fly is the job the better loader will do. But now I should find a way myself to do that tricky and dirty way which may be common and normal way in t

Re: Is it possible to directly call a function in a dlopen library

2006-12-22 Thread andy wang
Hi, Brain: Your answer is always the guide. Thanks a lot! So maybe it is possible on Linux? I asked this question because I find this kind of logic in asterisk! the main program will load the .so using dlopen. i.e. module1.so and module2.so, and I notice that module2.so will call directly (witho

Re: Is it possible to directly call a function in a dlopen library

2006-12-22 Thread andy wang
Hi, Larry, Thanks for the reply. > i.e. > module1.dll > { > int myfunc1() { do something; } > } > > module2.dll > { > int myfunc2() { myfunc1(); do other things;} > } > > main.exe > { > dlopen("module1.dll") > dlopen("module2.dll") > some tricky and mystery procedure. > myfunc2(); /

Is it possible to directly call a function in a dlopen library

2006-12-21 Thread andy wang
Hi, All: Is it possible in cygwin to call a function in a dlopen library? i.e. module1.dll { int myfunc1() { do something; } } module2.dll { int myfunc2() { myfunc1(); do other things;} } main.exe { dlopen("module1.dll") dlopen("module2.dll") some tricky and mystery procedure. myfun

Re: how to compile the .so to allow extern functions

2006-12-20 Thread andy wang
Hi, All: $ gcc -shared -o bug1-main.so bug1-main.c -ldl -Wl,--out-implib=libmain.dll.a Creating library file: libmain.dll.a $ gcc -shared -o bug1.so bug1.c -L. -lmain $ gcc -o bug1-main bug1-main.c -ldl $ ./bug1-main.exe in myfunc.so in main.func1() This method is wrong, because the bug1.so

Re: how to use DNS or libc/minires.c in cygwin

2006-12-20 Thread andy wang
Hi, All! I found another domain name to test and got the right answer. $ ./a.exe Minires: search "_sip._udp.yalin.tw" type 33 Minires: /etc/resolv.conf: OK Minires: resolv.conf nameserver 192.168.1.1 Minires: server "192.168.1.1" Minires: key SYSTEM\CurrentControlSet\Services\Tcpip\Parameters Mi

Re: how to use DNS or libc/minires.c in cygwin

2006-12-20 Thread andy wang
Thanks Corinna and Pierre Humblet too! Your works just make the life easier :-) I installed the minires package and tested a program previously posted on this list around May from http://www.cygwin.com/ml/cygwin/2006-05/msg00301.html and got nothing as the author did. I just want to ask the last

how to use DNS or libc/minires.c in cygwin

2006-12-19 Thread andy wang
Hi, All: I want to use the DNS related library on cygwin and I noticed that "src/winsup/cygwin ChangeLog libc/minires.c Subject: src/winsup/cygwin ChangeLog libc/minires.c " on http://www.cygwin.com/ml/cygwin-cvs/2006-q4/msg00110.html I want to ask how to use minires on cygwin or do I need to in

Re: something goes wrong while compiling linux kernel under cygwin

2006-12-18 Thread andy wang
crosstool is discussed in this mailing list: [EMAIL PROTECTED] . Please send email there for crosstool questions. -- Christopher Faylor spammer? -> [EMAIL PROTECTED] Cygwin Co-Project Leader[EMAIL PROTECTED] TimeSys, Inc. Hi, Leo: Why

Re: something goes wrong while compiling linux kernel under cygwin

2006-12-17 Thread andy wang
But there is a little issue when i'm using command: "mount -o cygexec -o managed /cygdrive/d/testdir1 /testdir2". "man mount" you can see the help the mount. you can always find some answers if you try "man your-command". The first path is Windows path and second is the POSIX path. so using: mo

Re: how to compile the .so to allow extern functions

2006-12-16 Thread andy wang
Done:-), thank Brain for the help! $ cat bug1.c //this will be .so and will call an extern func1() in the main proc int func1(); int myfunc() { printf("in myfunc.so\n"); func1(); } $ cat bug1-main.c #include int func1() { printf("in main.func1()\n"); return 0; } int main() { int (*mf)();

Re: something goes wrong while compiling linux kernel under cygwin

2006-12-16 Thread andy wang
As David said, I think you are trying to cross-compile the kernel on the cygwin. and luckyly there is a post today about "crosstool-0.43 & cygwin", I think it is what you want. and notice that you also need to mount a directory using "-o managed", because on windows the name of file and directory

Re: how to compile the .so to allow extern functions

2006-12-16 Thread andy wang
EL-4-Manual/gnu-linker/win32.html UNIX Application Migration Guide http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnucmg/html/UCMGch09.asp Regards, Andy On 12/16/06, Brian Dessent <[EMAIL PROTECTED]> wrote: andy wang wrote: > I want to compile a .so which contains ext

how to compile the .so to allow extern functions

2006-12-15 Thread andy wang
Hi, All I want to compile a .so which contains extern function that may be defined on the main program. The following file can be compiled on linux without any problem but how to compile it on cygwin? $ cat bug1.c //this will be .so and will call an extern func1() in the main proc int func1();