Can someone point me in the right direction towards solving this problem?

I built a static libraries on Linux based on some open source c and h
files. I can compile things fine with gcc/mingw-265 nd use ar to turn the
object files into a static lib. The problem is when I try yo compile on
Windows with the static lib I get the linking errors below:

Error: Undefined symbol: _malloc
Error: Undefined symbol: _free
Error: Undefined symbol: __assert
Error: Undefined symbol: __setjmp3
Error: Undefined symbol: _longjmp
Error: Undefined symbol: _realloc
Fatal: There were 6 errors compiling module, stopping

On Linux I ran an nm command in the mingw-w64 folder and found those
functions in libmsvcrt.a and libmsvcr100.a ... so I copied those files to
my windows box and tried linking with each one (separately) as well, but I
still get the same linking errors. I am guessing the missing functions
above are in windows dlls and not static.libs but I think they are remapped
or something as I can't get my code to link to msvcr100.dll either.

I'd really appreciate it if anyone could help me better understand how to
work with static libraries compiled on Linux and linked on windows.

Thanks.
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to