I’m using cygwin and gcc to create a new dll on Windows XP. I have an existing dll (MyCApi.dll) and example_wrap.o that I want to both use to create a new dll, example.dll. I ran the below gcc command and it looks like gcc can’t find MyCApi.dll. I have the directory it lives in on my path. Is there something else I need to do?
$ gcc -shared example_wrap.o -mno-cygwin -Wl,--add-stdcall-alias -lMyCApi -o example.dll
/usr/bin/ld: cannot find -lMyCApi
collect2: ld returned 1 exit status
I’m not sure what you mean when you say it’s on your path (LIBRARY_PATH?) but I suspect if you add
to the compilation line it’ll work just fine.