Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix tools build for mingw #155

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ognevny
Copy link

@ognevny ognevny commented Apr 17, 2024

add -municode LDFLAG for WinMain symbol. IS NOT related to #152

  • Accept to license the library and tools code under the terms
    of the LGPL 2.0 or later
  • Accept to license the library and tools code under the terms
    of the MPL 2.0
  • Accept to license the test code under the terms
    of the MIT-0
  • Read contributions guidelines
  • Checked coding style
  • The commits sequence is clean without work in progress/bugged revisions and merge commits. In doubt, squash the commits and/or rebase master

Copy link
Contributor

@ceztko ceztko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay. The test for MINGW must be in the else() branch, not as elseif() of MSVC. Just put the if(MINGW)/endif() in the else() branch.

@ognevny
Copy link
Author

ognevny commented May 4, 2024

Sorry for the delay. The test for MINGW must be in the else() branch, not as elseif() of MSVC. Just put the if(MINGW)/endif() in the else() branch.

ok, will do. but I'm currently on vacation until tomorrow

@ognevny
Copy link
Author

ognevny commented May 5, 2024

Sorry for the delay. The test for MINGW must be in the else() branch, not as elseif() of MSVC. Just put the if(MINGW)/endif() in the else() branch.

done

@ognevny
Copy link
Author

ognevny commented May 5, 2024

now (with this change) podofo lib+tools succesfully builds for clang, but lib only for gcc
error:

FAILED: target/podofobox.exe
C:\WINDOWS\system32\cmd.exe /C "cd . && C:\msys64\ucrt64\bin\c++.exe -Wall -Woverloaded-virtual -Wswitch -Wcast-qual -Wwrite-strings -Wredundant-decls -Wreorder -Wno-format-truncation -Wno-unknown-pragmas -Wno-unknown-warning-option -municode tools/podofobox/CMakeFiles/podofobox.dir/boxsetter.cpp.obj tools/podofobox/CMakeFiles/podofobox.dir/podofobox.cpp.obj -o target\podofobox.exe -Wl,--out-implib,target\libpodofobox.dll.a -Wl,--major-image-version,0,--minor-image-version,0  target/libpodofo.dll.a  target/libtools_private.a  target/libpodofo_private.a  C:/msys64/ucrt64/lib/libssl.dll.a  C:/msys64/ucrt64/lib/libcrypto.dll.a  C:/msys64/ucrt64/lib/libfontconfig.dll.a  C:/msys64/ucrt64/lib/libfreetype.dll.a  C:/msys64/ucrt64/lib/libxml2.dll.a  C:/msys64/ucrt64/lib/libpng.dll.a  C:/msys64/ucrt64/lib/libtiff.dll.a  C:/msys64/ucrt64/lib/libjpeg.dll.a  C:/msys64/ucrt64/lib/libz.dll.a  -lkernel32  -luser32  -lgdi32  -lwinspool  -lcomdlg32  -ladvapi32  -lshell32  -lole32  -loleaut32  -luuid  -lws2_32  -lCrypt32  C:/msys64/ucrt64/lib/libidn.dll.a  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
C:/msys64/ucrt64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: target/libtools_private.a(MainEntryPoint.cpp.obj):MainEntryPoint:(.text+0x24c): undefined reference to `PoDoFo::PdfError::what() const'
collect2.exe: error: ld returned 1 exit status

@ceztko
Copy link
Contributor

ceztko commented May 5, 2024

Then I guess you can do if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND MINGW), still within the else() branch.

@ognevny
Copy link
Author

ognevny commented May 5, 2024

Then I guess you can do if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND MINGW), still within the else() branch.

looks like that's not related to this PR. maybe it's even a broken build...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants