[openbeos] Re: Hit a wall with cygwin
- From: "Urias McCullough" <umccullough@xxxxxxxxx>
- To: openbeos@xxxxxxxxxxxxx
- Date: Tue, 14 Nov 2006 21:39:01 -0800
On 11/14/06, Ingo Weinhold <bonefish@xxxxxxxxxxxxxxx> wrote:
Build a liba.so from a.cpp and a libb.so from b.cpp. libb.so should be
linked
against liba.so, and either library should be linked against libstdc++.a.
I
would expect linking libb.so to fail just like linking libbe_build.so
fails.
If it does, you have a small example you can play with. I suppose it
shouldn't be to hard to find out how to build C++ libraries under cygwin.
Ok, i got that to work with the following (retyped here - so hopefully no
typos):
cc -c a.cpp -o a.o
cc -c b.cpp -o b.o
cc -shared -Xlinker -oliba.so a.o -lstdc++
cc -shared -Xlinker --allow-multiple-definition -olibb.so b.o liba.so-lstdc++
So, I went back and attempted to MANUALLY build libbe_build.so using the
--allow-multiple-definition and it worked - even using the *_kit.o files!
I'm not sure what I had done previously - but I did find that -soname
apparently isn't a supported option for some reason - even though it's
listed in the ld --help. I removed this.
So, I continued with another jam -q haiku-image...
copyattr failed with the same problem - so I manually linked it also... (by
adding "-Xlinker --allow-multiple-definition" to the cc) and then ran into a
new issue: copyattr.exe had been built instead.
Not really a problem - but the build system didn't recognize that it was
built - so I copied it to copyattr to satisfy the build system's
interrogation.
I worked my way through xres with the same changes - but I cannot get the
AddFileDataResource1 to run without failure (on makebootable). When i run
the xres command directly, it works without any visual error...
That seems to be my new stopping point for now. Thanks for the pointers!
- References:
- [openbeos] Hit a wall with cygwin
- From: Urias McCullough
- [openbeos] Re: Hit a wall with cygwin
- From: Ingo Weinhold
- [openbeos] Re: Hit a wall with cygwin
- From: Urias McCullough
- [openbeos] Re: Hit a wall with cygwin
- From: Ingo Weinhold
Other related posts:
- » [openbeos] Hit a wall with cygwin
- » [openbeos] Re: Hit a wall with cygwin
- » [openbeos] Re: Hit a wall with cygwin
- » [openbeos] Re: Hit a wall with cygwin
- » [openbeos] Re: Hit a wall with cygwin
- » [openbeos] Re: Hit a wall with cygwin
- » [openbeos] Re: Hit a wall with cygwin
- » [openbeos] Re: Hit a wall with cygwin
- » [openbeos] Re: Hit a wall with cygwin
- » [openbeos] Re: Hit a wall with cygwin
Build a liba.so from a.cpp and a libb.so from b.cpp. libb.so should be linked against liba.so, and either library should be linked against libstdc++.a. I would expect linking libb.so to fail just like linking libbe_build.so fails. If it does, you have a small example you can play with. I suppose it shouldn't be to hard to find out how to build C++ libraries under cygwin.
- [openbeos] Hit a wall with cygwin
- From: Urias McCullough
- [openbeos] Re: Hit a wall with cygwin
- From: Ingo Weinhold
- [openbeos] Re: Hit a wall with cygwin
- From: Urias McCullough
- [openbeos] Re: Hit a wall with cygwin
- From: Ingo Weinhold