Hello,

As the topic said, i am unable to find the wine libs (-lole32, -ladvapi32, etc...) for linking with winegcc. Can someone please point out the right package for them? They was deleted by some update about 2 years ago and I cannot find them since then. wine-devel seems to only have includes.

    SilverBird775 Hmm, I dunno, wine-32bit? They're only there in .dll form though. I'm not sure how the winegcc setup is supposed to look like

      Staudey Nope, that one is only for binaries as well (".dll"). winegcc expects wraps around dll's, ".o" or maybe ".so"? The most expected corresponding imports for in-wine linking are usually ".a" files.

      winegcc even have an option for the case:

      -Wl,--out-implib,lib.a
          When linking a dll, also create its corresponding import library.

      I'm sure wine-devel somehow dropped them at some point by mistake.

        SilverBird775 Nope, that one is only for binaries as well (".dll"). winegcc expects wraps around dll's, ".o" or maybe ".so"? The most expected corresponding imports for in-wine linking are usually ".a" files.

        The release notes linked in the above change mention this

        • Most modules are built in PE format (Portable Executable, the
          Windows binary format) instead of ELF when the MinGW compiler is
          available. This helps various copy protection schemes that check
          that the on-disk and in-memory contents of system modules are
          identical.

        • The actual PE binaries are copied into the Wine prefix instead of
          the fake DLL files. This makes the prefix look more like a real
          Windows installation, at the cost of some extra disk space.
          [...]
          The Wine C runtime is updated to support linking to MinGW-compiled
          binaries; it is used by default instead of the MinGW runtime when
          building DLLs.

        Not sure exactly what this means for your use case

          Staudey Well, my use case is winegcc and the above change is kind of backfired because winegcc left with nothing to link with, not even the mandatory common libs.
          Because winegcc is not MinGW, it compiles and works with wine's ELF, not windows PE.

          To better understand the problem you may try to compile hello.cpp:

          #include <iostream>
          int main()
          {
          	std::cout << "Hello, World!" << std::endl;
          	return 0;
          }

          with $ winegcc hello.cpp

          Yeah, I can reproduce the issue. Probably best to open a bug report on the issue tracker, so this doesn't get lost.

          5 months later

          Hi was there ever any resolution to this, I am currently running into this issue as well.