Hi Mavatar, > mavatar <acampbellb@xxxxxxxxxxx> writes: > > > I am trying to port a DLL project from MSVC to Eclipse/MinGW. I was able to > > build the DLL with Eclipse/MinGW and the resulting shared library was much > > larger than the same library built with MSVC. I found a "MinGW C Linker" > > option in project properties to "Omit all symbol information (-s)" after > > setting this option the DLL file size reduce by almost 200KB, but it still > > was >100KB bigger then the MSVC version. > > > > After inspecting the DLL with the MS "Dependency Walker" utility I noticed > > that the DLL produced by MinGW has entry points defined for every function > > in the DLL, including those that don't have the following descriptor before > > them. > > > > #define MY_API __declspec(dllexport) > > > > I would expect that ONLY function that have MY_API before them would be > > defined as an entry point, but this is not the case all function are defined > > as entry points. How is this possible? > > > > As a side note I do not provide a *.DEF file to the linker. I tried this and > > it did not seem to make a difference. > > > > Any ideas? > > I don't know the answer to this question. I do know that this is not an > issue with gcc proper. You are much more likely to get an answer if you > ask on the cygwin@xxxxxxxxxx mailing list (because this is Windows > related) or the binutils@xxxxxxxxxxxxxx mailing list (because this is > linker related). Even more appropriate would be the mingw mailing list. Nevertheless, here is a short answer: The behaviour you are describing is specific to the microsoft tool chain. The GNU linker exports all non-static symbols by default (as it does on unix-like systems). You can learn more about the behaviour of ld, by reading the info provided by 'ld --help'. Ronald