views:

166

answers:

3

Is it possible to link a static library built with VS2005 into an application that is to be built with gcc (in Cygwin)?

A: 

Theoretically it should work, but I would suggest to just try it.

kkaploon
+2  A: 

Unlike UNIX where there was no standard C++ ABI for years, Windows has had a standard C++ ABI from the beginning. So, yes, it's possible. But it can be difficult.

Max Lybbert
I never got it working, I tried creating a DLL instead and that worked like a charm.
Soo Wei Tan
I'm sorry the static option didn't work. I've noticed Windows sometimes has trouble if I name my output files "file.o" instead of "file.obj". I haven't yet figured out why that is.
Max Lybbert
A: 

I used to link a *.dll in G++ which compiled with a *.lib, It works well currently, but I'm not sure about static library, May be you can compiled it in dll for a try. Good luck.

coanor