Menu

#337 Exported symbol errors compiling under MSVC 2022 with CMake project

1.29.x
closed-wont-fix
nobody
None
5
2023-03-19
2022-04-18
Indy Sams
No

I don't know if there are others but after compiling both of the win32 output modules don't export their info ( mpg123_module_t mpg123_output_module_info) and also the out123_stringlists_free function isn't exported either. Everything compiles fine but when you go to link out123_stringlists_free is missing and the output modules won't load. I got it to work by throwing some __declspec(dllexport)'s in front of them though that isn't a proper fix of course :)

Discussion

  • Indy Sams

    Indy Sams - 2022-04-18

    Oh, and this is with building shared DLLs of course.

     
  • Thomas Orgis

    Thomas Orgis - 2022-04-20

    So you're building all of mpg123 with MSVC? I'm not sure that has been tried before … in theory, things should juts work with cmake, but of course not in practice. The old MSVC projects were just about getting a libmpg123 DLL, not all the other stuff with it, like even libout123 and modules.

    The static build is fine, right?

    To conclude: Only out123_stringlists_free() is missing from the library (no other symbols) and the modules need exporting of their entry point? This API function uses the same MPG123_EXPORT macro as the others. It should be expanded to dllexport when BUILD_MPG123_DLL is defined (and LINK_MPG123_DLL when using the library). Hm, we miss that whole machinery in the cmake files, apparently. Seems like an obvious hole in the plan.

    Your libmpg123.dll is fine, though?

     
  • Thomas Orgis

    Thomas Orgis - 2022-06-26

    Any update on this? Right now there's a big if(UNIX) in front of the build of the frontend binaries in ports/cmake …

     
  • Thomas Orgis

    Thomas Orgis - 2022-09-14

    Were you just building libout123 and then tried to use it in a project of your own? The CMake build might need some love there.

     
  • Thomas Orgis

    Thomas Orgis - 2022-09-20

    Please give some details on this … we are discussing fixing up the CMake and MSVC build on bug #330 . Would be good to get this here sorted out, too, if it is a bug on our side.

     
  • Thomas Orgis

    Thomas Orgis - 2023-01-15

    I'll close this without further feedback. So far we don't do the output module stuff with MSVC, just the decoder library.

     
  • Thomas Orgis

    Thomas Orgis - 2023-03-19
    • status: open --> closed-wont-fix
     

Log in to post a comment.

MongoDB Logo MongoDB