Re: Creating dll in cygwin gives "Undefined reference" errors

2007-08-18 Thread Pradip Jadav
On 8/11/07, Brian Dessent <[EMAIL PROTECTED]> wrote: > g++ -o main.exe main.o -ldl -Wl,-out-implib,libmain.dll.a I tried this, but it gives same "Unresolved reference" errors. I will do R&D on this and excluding "__declspec" part later. But currently I am going with "__declspec " part . Using it,

Re: Creating dll in cygwin gives "Undefined reference" errors

2007-08-11 Thread Brian Dessent
Pradip Jadav wrote: > ###create main.exe file. > g++ -o main.exe main.o -ldl > > ###create .def file > dlltool.exe --export-all-symbols --output-def main.def main.o > > ###create main library file. > dlltool.exe --dllname main.exe --def main.def --output-lib libmain.dll.a This is redundant. Yo

Re: Creating dll in cygwin gives "Undefined reference" errors

2007-08-11 Thread Pradip Jadav
On 7/28/07, Brian Dessent <[EMAIL PROTECTED]> wrote: > Pradip Jadav wrote: > > > But when I compiles in cygwin it gives me some "Undefined reference" errors. > > Take an example, > > > > /cygdrive/e/DOCUME~1/LOCALS~1/Temp/ccLMFYUe.o:sample.c:(.text+0x4c): > > undefined reference to `createlog(int,

Re: Creating dll in cygwin gives "Undefined reference" errors

2007-07-29 Thread Morgan Gangwere
> The undefined reference is because fundamentally ELF (Linux) and PE/COFF > (Windows) are very different in terms of how linking works under the > hood. The short explanation is that PE/COFF requires all references to > be resolved at link-time, thus you have to explicitly tell the linker > where

Re: Creating dll in cygwin gives "Undefined reference" errors

2007-07-28 Thread Brian Dessent
Pradip Jadav wrote: > But when I compiles in cygwin it gives me some "Undefined reference" errors. > Take an example, > > /cygdrive/e/DOCUME~1/LOCALS~1/Temp/ccLMFYUe.o:sample.c:(.text+0x4c): > undefined reference to `createlog(int, char*, ...)' > > Now this "createlog" function is defined in on

Creating dll in cygwin gives "Undefined reference" errors

2007-07-28 Thread Pradip Jadav
Hi to all, I am trying to create dll in cygwin. I read, http://www.cygwin.com/cygwin-ug-net/dll.html . But didn't got much help from that document. I am porting Linux code to windows using cygwin. I am done with main program. But want to create add-on module for that program as I have done in Linu