You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
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
Windows 10
TensorFlow installed from (source or binary): source
C++ Visual Studio 2015 Update 3
GPU model and memory: NO USE
Describe the problem
I have a Static library project, containing some codes that are using Tensorflow as Additional Dependencies.
I want to make a static libray (name "
myLib.lib
") from these codes to use in another Win32 App.
In my static library project, I used
/WHOLEARCHIVE
flag to include all tensorflow's lib files to the my final static library,
myLib.lib
file.
I build it and make
myLib.lib
file.
In another Win32 App I link this
myLib.lib
to use it and also use
/WHOLEARCHIVE:myLib.lib
as a Additional options in Linker->Command Line.
But when I run this win32app, I got the error:
fatal error LNK1000: Internal error during CImplib::EmitThunk
I searched many topics but I didn't find any appropriate solution. I totaly confused. What should I do?
I have to say that I added
/WHOLEARCHIVE
flag in order to prevent error
No session factory registered for the given session options
when using Tensorflow.
@fmmohammadi
Please provide details about what platform you are using (operating system, architecture). Also include your TensorFlow version. Also, did you compile from source or install a binary?
Make sure you also include the exact command if possible to produce the output included in your test case. If you are unclear what to include see the issue template displayed in
the Github new issue template
.
We ask for this in the issue submission template, because it is really difficult to help without that information. Thanks!
@muddham
@ZLeopard
After tons of searching I found that the problem is because of Visual Studio 2015. As mentioned
here
the cause of problem is:
This problem occurs in rare cases because Link.exe might not handle import objects and incremental linking correctly if it uses the /WHOLEARCHIVE switch.
And the solution is to download and install a hotfix (vc14-kb4020481.exe) from
here
.
It's worth to mention that my OS is Windows 10, I use vs2015 update 3, TensorFlow version 1.10.1 which is compiled from source code and I have .lib files to use.