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

Linking Issues on Windows with Visual Studio 2017 BuildTools #1699

Closed
KelSolaar opened this issue Jun 5, 2017 · 3 comments
Closed

Linking Issues on Windows with Visual Studio 2017 BuildTools #1699

KelSolaar opened this issue Jun 5, 2017 · 3 comments

Comments

@KelSolaar
Copy link
Contributor

Problem

Hi,

I have linking issues on Windows using Visual Studio 2017 BuildTools.

Expected behavior:

Linking should occur without errors.

Actual behavior:

Linking occurs with errors:

"D:\Documents\Development\ThirdParty\openimageio\build\oiio\INSTALL.vcxproj" (default target) (1) ->
"D:\Documents\Development\ThirdParty\openimageio\build\oiio\ALL_BUILD.vcxproj" (default target) (3) ->
"D:\Documents\Development\ThirdParty\openimageio\build\oiio\src\libOpenImageIO\OpenImageIO.vcxproj" (default target) (5) ->
(Link target) ->
  jpeg.lib(jerror.c.obj) : error LNK2019: unresolved external symbol __imp___iob_func referenced in function output_message [D:\Documents\Development
\ThirdParty\openimageio\build\oiio\src\libOpenImageIO\OpenImageIO.vcxproj]
  tiff.lib(tif_unix.obj) : error LNK2001: unresolved external symbol __imp___iob_func [D:\Documents\Development\ThirdParty\openimageio\build\oiio\src
\libOpenImageIO\OpenImageIO.vcxproj]
  tiff.lib(tif_unix.obj) : error LNK2019: unresolved external symbol __imp_vfprintf referenced in function unixWarningHandler [D:\Documents\Developme
nt\ThirdParty\openimageio\build\oiio\src\libOpenImageIO\OpenImageIO.vcxproj]
  tiff.lib(snprintf.obj) : error LNK2019: unresolved external symbol __imp__vscprintf referenced in function _TIFF_vsnprintf_f [D:\Documents\Developm
ent\ThirdParty\openimageio\build\oiio\src\libOpenImageIO\OpenImageIO.vcxproj]
  tiff.lib(snprintf.obj) : error LNK2019: unresolved external symbol __imp__vsnprintf_s referenced in function _TIFF_vsnprintf_f [D:\Documents\Develo
pment\ThirdParty\openimageio\build\oiio\src\libOpenImageIO\OpenImageIO.vcxproj]
  D:\Documents\Development\ThirdParty\openimageio\build\oiio\src\libOpenImageIO\Release\OpenImageIO.dll : fatal error LNK1120: 4 unresolved externals
 [D:\Documents\Development\ThirdParty\openimageio\build\oiio\src\libOpenImageIO\OpenImageIO.vcxproj]

Steps to Reproduce

I'm running with a very minimalist set of dependencies right now and the command I issue is as follows:

cmake D:\Documents\Development\ThirdParty\openimageio\oiio -DCMAKE_INSTALL_PREFIX=D:\Documents\Development\ThirdParty\openimageio/build\release -DILMBASE_INCLUDE_PATH=C:\Users\thomas\Packages\ilmbase\2.2.0\ilmbase\include -DOPENEXR_INCLUDE_PATH=C:\Users\thomas\Packages\openexr\2.2.0\openexr\include -DBOOST_ROOT=C:\Users\thomas\Packages\boost\1.64.0\boost -G "Visual Studio 15 Win64" -T v141,host=x64

Here is a Gist with the full output: https://gist.github.com/KelSolaar/d27ee328824fc7a079fdfbbc28b9d03d

Versions

  • OIIO branch/version: 1.7.15
  • OS: Windows 10
  • C++ compiler: Visual Studio 2017 BuildTools - cl
@KelSolaar
Copy link
Contributor Author

Just to confirm that same happens with https://github.com/OpenImageIO/oiio/releases/tag/Release-1.8.4dev

@KelSolaar
Copy link
Contributor Author

KelSolaar commented Jun 7, 2017

I think that what happened is that CMake find_package picked the jpeg and tiff libraries from my Python installation and they are not compatible.

I noticed that by setting -DVERBOSE=ON.

@DaciP
Copy link

DaciP commented Jan 3, 2018

Try to link "legacy_stdio_definitions.lib" library to your input project, this is for deprecated function names compatibility that was substituted into recent visual studio releases.

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

No branches or pull requests

2 participants