FreeImage icon indicating copy to clipboard operation
FreeImage copied to clipboard

Issue using FreeImage.lib in building colmap in Windows VS2022

Open kindaichinisan opened this issue 1 year ago • 1 comments

LNK2019 unresolved external symbol getopt referenced in function main colmap_sensor_bitmap_test C:\Users\hwenjun\Documents\GitHub\colmap_cmaked_VS2\src\colmap\sensor\FreeImage_d.lib(mkg3states.obj)

Analysing mkg3states.c shows that it uses #include "libport.h" which has int getopt(int argc, char * const argv[], const char *optstring); but the implementation is not found anywhere in the project.

How to resolve this?

kindaichinisan avatar Sep 25 '24 04:09 kindaichinisan

Can you state the full CMake command you build the lib? According to the last successful build via GitHub Actions (GHA) your isssue can not be reproduced. Hence I wonder what is missing on either your or the GHA side? Thanks.

tbeu avatar Oct 20 '24 10:10 tbeu

getopt is POSIX https://github.com/danoli3/FreeImage/blob/8268e809b0827870763444e8a8e58e0a83a733f5/Source/LibTIFF4/tif_config.h.cmake.in#L40

polluks avatar Sep 01 '25 11:09 polluks