This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: undefined symbols in dlls?


vikramshrowty@yahoo.com wrote:

Hi,
	Aren't dlls alowed to  have undefined symbols?
--------------
foo.c:

int bar();

int foo() {
  return bar();
}
--------------

When I try to compile foo.c like this...
gcc -shared -o foo.dll foo.c

I get an error message complaning that '_bar' is undefined.

Funny, this pops up again and again.. =)


Maybe this should be in FAQ (if it isn't already there).

Well answer is no. DLL's aren't allowed to have unbounded undefined symbols. There is few ways to get this over, see message thread "DLL and external symbols" started by me and "DLL vs. shared object linking behavior" started by Karl Robillard.

- Jani Tiainen

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]