From: Brian D. <br...@de...> - 2007-08-28 00:44:08
|
Suresh Govindachar wrote: > A) Added -lperl58 and got the same error about undefined reference That this did not give a "cannot find" error means that the linker was able to successfully find and read the perl library, thus adding -Lc:\opt\perl\lib is unnecessary (but probably harmless.) > B) Added -Lc:\opt\perl\lib -lperl58 and got the same error about undefined reference Like I said, this is usually caused by incorrect ordering of arguments. Please post the exact command. > C) Why do things work when c: is replaced by x:? Adding an invalid path to the list of locations to search is not an error, but it is a no-op. -L alone does not tell the linker to necessarily do anything, just adds another location to search for libfoo when you later specify -lfoo. > D) Just to make sure, I added -lblah and got the new error message: > > c:\opt\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot find -lblah Naturually. Brian |