I'm trying to link a MS static obj file in Dev-C++ and it results in the following link error:
.drectve `-defaultlib:uuid.lib ' unrecognized
With some googling I found this answer:
From: Filip Navara
Re: Re: [Mingw-users] Warning: .drectve `%.*s" unrecognized
2003-11-12 12:24
This is directive that MSVC puts in object files
to tell the linker to link with particular library.
You can safely ignore this and pass the correct
libraries on command line (or in makefile, ...).
Example: /DEFAULTLIB:"uuid.lib"
has equivalent -luuid in GCC.
I have added "-luuid" to my makefile.win as so:
EDIT: adding libuuid to the project library list doesn't change the file size either.
However, after compiling I noticed the file size of the exe is 48 kb from Dev-C++ and 237 kb from MSVC. Does this indicate something is still wrong? At this moment I don't have access to the equipment necessary to run this software. EDIT: Going to try to get the equipment today to test this.
-luuid may not be enough.
Yes, the difference in size could indicate a problem, but MSVC does add a lot of overhead to executables, beyond just the code, so it's hard to tell.
But the point is that you might need to specify a full pathname to the MSVC uuid library -- hopefully your other compiler can read the format. Your other compiler might not even HAVE a uuid library.
* Btw I did also try adding libuuid in the project menu of Dev-Cpp with the same result (same file size), as indicated in my edit of the OP
Dev-Cpp does indeed have libuuid in it's library directory and if I pass something like "-ljhsdjfhsdf" to gcc it complains that it doesn't exists, so I know it is at least checking that libuuid exists when compiling.
I will try your idea of linking with the MSVC libuuid.