public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Creating two dlls
@ 1999-07-30 10:48 Radu Grosu
  1999-07-30 11:04 ` Mumit Khan
  1999-07-31 18:34 ` Radu Grosu
  0 siblings, 2 replies; 8+ messages in thread
From: Radu Grosu @ 1999-07-30 10:48 UTC (permalink / raw)
  To: cygwin

I want to create two dll libraries. The second depends on the first.

I create the first one by adapting your make file for creating a dll and

it works. I am exporting all symbols with --export-all-symbols.

Then I want to create the second dll. Functions in the second one refer
to symbols in the first dll. Although I exported the symbols in the
first dll and I am importing the first dll I still get a lot of
references undefined to the symbols in the first dll.

What goes wrong?

Any help will be greately appreciated.

radu

--

Dr. Radu Grosu
School of Engineering and Applied Science
Department of Computer and Information Science
200 South 33rd Street
Philadephia, PA 19104-6389, USA

Email: grosu@saul.cis.upenn.edu
Tel:   (215)898-9511
Fax:   (215)898-0587



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Creating two dlls
  1999-07-30 10:48 Creating two dlls Radu Grosu
@ 1999-07-30 11:04 ` Mumit Khan
  1999-07-31 18:34   ` Mumit Khan
  1999-08-04 19:06   ` Radu Grosu
  1999-07-31 18:34 ` Radu Grosu
  1 sibling, 2 replies; 8+ messages in thread
From: Mumit Khan @ 1999-07-30 11:04 UTC (permalink / raw)
  To: Radu Grosu; +Cc: cygwin

Radu Grosu <grosu@saul.cis.upenn.edu> writes:
> I want to create two dll libraries. The second depends on the first.
> 
> I create the first one by adapting your make file for creating a dll and
> 
> it works. I am exporting all symbols with --export-all-symbols.
> 
> Then I want to create the second dll. Functions in the second one refer
> to symbols in the first dll. Although I exported the symbols in the
> first dll and I am importing the first dll I still get a lot of
> references undefined to the symbols in the first dll.
> 
> What goes wrong?
> 

You don't provide enough information to know for sure, but if I had to
guess, I'd say you're not creating import library for the first one.

Here's the sequence for 2 dlls, where dll2 depends on dll1.

1. Create dll1.dll and create libdll1.a (import library)
2. Create dll2.dll and provide libdll1.a on the link line to resolve the
   references from dll1.dll.


  $ dllwrap -o dll1.dll --export-all --output-lib libdll1.a \
      [list of object files and libraries]
  $ dllwrap -o dll2.dll --export-all --output-lib libdll2.a \
      [list of object files and libraries] libdll1.a

Of course, if you use dllimport/dllexport attributes (or via declspec)
to tag imported/exported symbols, you don't need --export-all.

Regards,
Mumit


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Creating two dlls
  1999-07-30 11:04 ` Mumit Khan
@ 1999-07-31 18:34   ` Mumit Khan
  1999-08-04 19:06   ` Radu Grosu
  1 sibling, 0 replies; 8+ messages in thread
From: Mumit Khan @ 1999-07-31 18:34 UTC (permalink / raw)
  To: Radu Grosu; +Cc: cygwin

Radu Grosu <grosu@saul.cis.upenn.edu> writes:
> I want to create two dll libraries. The second depends on the first.
> 
> I create the first one by adapting your make file for creating a dll and
> 
> it works. I am exporting all symbols with --export-all-symbols.
> 
> Then I want to create the second dll. Functions in the second one refer
> to symbols in the first dll. Although I exported the symbols in the
> first dll and I am importing the first dll I still get a lot of
> references undefined to the symbols in the first dll.
> 
> What goes wrong?
> 

You don't provide enough information to know for sure, but if I had to
guess, I'd say you're not creating import library for the first one.

Here's the sequence for 2 dlls, where dll2 depends on dll1.

1. Create dll1.dll and create libdll1.a (import library)
2. Create dll2.dll and provide libdll1.a on the link line to resolve the
   references from dll1.dll.


  $ dllwrap -o dll1.dll --export-all --output-lib libdll1.a \
      [list of object files and libraries]
  $ dllwrap -o dll2.dll --export-all --output-lib libdll2.a \
      [list of object files and libraries] libdll1.a

Of course, if you use dllimport/dllexport attributes (or via declspec)
to tag imported/exported symbols, you don't need --export-all.

Regards,
Mumit


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Creating two dlls
  1999-07-30 10:48 Creating two dlls Radu Grosu
  1999-07-30 11:04 ` Mumit Khan
@ 1999-07-31 18:34 ` Radu Grosu
  1 sibling, 0 replies; 8+ messages in thread
From: Radu Grosu @ 1999-07-31 18:34 UTC (permalink / raw)
  To: cygwin

I want to create two dll libraries. The second depends on the first.

I create the first one by adapting your make file for creating a dll and

it works. I am exporting all symbols with --export-all-symbols.

Then I want to create the second dll. Functions in the second one refer
to symbols in the first dll. Although I exported the symbols in the
first dll and I am importing the first dll I still get a lot of
references undefined to the symbols in the first dll.

What goes wrong?

Any help will be greately appreciated.

radu

--

Dr. Radu Grosu
School of Engineering and Applied Science
Department of Computer and Information Science
200 South 33rd Street
Philadephia, PA 19104-6389, USA

Email: grosu@saul.cis.upenn.edu
Tel:   (215)898-9511
Fax:   (215)898-0587



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Creating two dlls
  1999-07-30 11:04 ` Mumit Khan
  1999-07-31 18:34   ` Mumit Khan
@ 1999-08-04 19:06   ` Radu Grosu
  1999-08-31 23:49     ` Radu Grosu
  1 sibling, 1 reply; 8+ messages in thread
From: Radu Grosu @ 1999-08-04 19:06 UTC (permalink / raw)
  To: Mumit Khan; +Cc: cygwin

Mumit,

I have to questions:

1. Is it possible to compile your java-jni/c/HelloWorld example such that it
runs also from a Windows98/dos window? Currently I can run it only by
starting it from a cygwin window.

2. I am trying to build a java-jni /c application myself. For this, I started
with a set of standard C programs (that run on dec-alpha with java/c) and
built the dll libraries as you told me. This worked. Unfortunately, when
starting the java application, the library is load but I get the following
error message:

JAVA caused an invalid page fault in module CU.DLL at 015f:69aa0816

The dll I am loading by java is JMDD.DLL. It was built by using CU.LIB and
GLU.LIB. I tried also by building JMDD.DLL by using instead of CU.LIB another
library I built, CMU.LIB but I get now invalid page fault in CMU.DLL. The
dependencies are:

                             glu
                       /       |     \
                   cmu     |      cu
                        \      |      /
                          jmdd

Do you have any idea why this happens?

Many thanks again,

radu


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Creating two dlls
  1999-08-04 19:06   ` Radu Grosu
@ 1999-08-31 23:49     ` Radu Grosu
  0 siblings, 0 replies; 8+ messages in thread
From: Radu Grosu @ 1999-08-31 23:49 UTC (permalink / raw)
  To: Mumit Khan; +Cc: cygwin

Mumit,

I have to questions:

1. Is it possible to compile your java-jni/c/HelloWorld example such that it
runs also from a Windows98/dos window? Currently I can run it only by
starting it from a cygwin window.

2. I am trying to build a java-jni /c application myself. For this, I started
with a set of standard C programs (that run on dec-alpha with java/c) and
built the dll libraries as you told me. This worked. Unfortunately, when
starting the java application, the library is load but I get the following
error message:

JAVA caused an invalid page fault in module CU.DLL at 015f:69aa0816

The dll I am loading by java is JMDD.DLL. It was built by using CU.LIB and
GLU.LIB. I tried also by building JMDD.DLL by using instead of CU.LIB another
library I built, CMU.LIB but I get now invalid page fault in CMU.DLL. The
dependencies are:

                             glu
                       /       |     \
                   cmu     |      cu
                        \      |      /
                          jmdd

Do you have any idea why this happens?

Many thanks again,

radu


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Creating two dlls
  1999-08-02  2:28 Emanuele ALIBERTI
@ 1999-08-31 23:49 ` Emanuele ALIBERTI
  0 siblings, 0 replies; 8+ messages in thread
From: Emanuele ALIBERTI @ 1999-08-31 23:49 UTC (permalink / raw)
  To: grosu, cygwin

>I want to create two dll libraries. The second depends on the first.
What kind of symbols does the first one export: cdecl or stdcall functions? 
data?


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Creating two dlls
@ 1999-08-02  2:28 Emanuele ALIBERTI
  1999-08-31 23:49 ` Emanuele ALIBERTI
  0 siblings, 1 reply; 8+ messages in thread
From: Emanuele ALIBERTI @ 1999-08-02  2:28 UTC (permalink / raw)
  To: grosu, cygwin

>I want to create two dll libraries. The second depends on the first.
What kind of symbols does the first one export: cdecl or stdcall functions? 
data?


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~1999-08-31 23:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-07-30 10:48 Creating two dlls Radu Grosu
1999-07-30 11:04 ` Mumit Khan
1999-07-31 18:34   ` Mumit Khan
1999-08-04 19:06   ` Radu Grosu
1999-08-31 23:49     ` Radu Grosu
1999-07-31 18:34 ` Radu Grosu
1999-08-02  2:28 Emanuele ALIBERTI
1999-08-31 23:49 ` Emanuele ALIBERTI

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).