[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dynamic loading in static exe
From: |
Paul Kienzle |
Subject: |
Re: dynamic loading in static exe |
Date: |
Mon, 27 Jan 2003 09:17:44 -0500 |
User-agent: |
Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.3a) Gecko/20021212 |
Paul Kienzle wrote:
Is there any reason not to make a shared version of libstdc++? I see
that
the symbols are available in the .a file [of course!] --- I will try
today to create
the dll with dlltool.
Okay, it didn't work. The dll was easy to create:
dlltool --export-all --output-exp libstdc++.exp --output-lib
libstdc++.dll.a /usr/lib/libstdc++.a
gcc -shared libstdc++.exp /usr/lib/libstdc++.a -o libstdc++.dll
rm libstdc++.exp
But there were a couple of link errors from the following main:
#include <iostream>
int main(int argc, char *argv[])
{
std::cout << "hello world" << std::endl;
return 0;
}
$ gcc hello.o -L. -lstdc++.dll -o direct
fu000001.o: undefined reference to `_libstdc__dll_a_iname'
nmth000000.o: undefined reference to `__nm___ZSt4cout'
Info: resolving std::cout by linking to __imp___ZSt4cout (auto-import)
collect2: ld returned 1 exit status
Any suggestions?
Paul Kienzle
address@hidden