Resolved : VISUAL STUDIO 2017 2>LINK : fatal error LNK1104: cannot open file ',<project>lib'

Hi all I am trying to build a plugin on windows.
Xcode OSX worked fine.

I am reusing the projucer just adde an exporter for visual studio 2017 .
What should I do here ?
I am opening the projucer from inside the folder with the plugin source.
I downloaded JUCE from the website windows link just now and just opened it up.
Does it need to be compiled I dont think so the demo projects build when clicked on inside the JUCE folder which I stuck on my desktop.
Thanks for you help. Sean

1>c:\users\seanw\desktop\juce\modules\juce_audio_processors\utilities\juce_audioparameterfloat.h(33): note: see reference to class template instantiation 'juce::RangedAudioParameterAttributes<juce::AudioParameterFloatAttributes,float>' being compiled
1>c:\users\seanw\desktop\juce\modules\juce_audio_basics\audio_play_head\juce_audioplayhead.h(321): note: see reference to class template instantiation 'juce::Optional<int64_t>' being compiled
1>Done building project "waylosynth55_SharedCode.vcxproj" -- FAILED.
2>------ Build started: Project: waylosynth55_VST3, Configuration: Debug x64 ------
2>LINK : fatal error LNK1104: cannot open file 'waylosynth55.lib'
2>Done building project "waylosynth55_VST3.vcxproj" -- FAILED.
1 Like

Download and install Visual Studio. The Community edition is free.

The Projucer does not create Visual Studio Code configurations.
Although the names of these IDEs are very much alike, they are different tools.

Thanks sorry I am using Visual Studio my headline was misleading

bump help

First question, why aren you using such an old version of VisualStudio?

Oh that’s a good question actually let me upgrade it and see !

Same error in a different looking GUI sadly.

This is the more of the output from Visual stufio 2022
I hope it’s appropriate to paste all this.
Tons of warnings but no errros until the very end it seems. I am mystified.
I wonder if all the includes are being found ?

Build started...
1>------ Build started: Project: waylosynth55_SharedCode, Configuration: Debug x64 ------
1>ADSR.cpp
1>AttackDecayEnvelope.cpp

1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(25,35): warning C4244: 'argument': conversion from 'double' to 'float', possible loss of data
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(26,43): warning C4244: 'argument': conversion from 'double' to 'float', possible loss of data
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(31,24): warning C4244: 'argument': conversion from 'double' to 'float', possible loss of data
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(23,60): warning C4100: 'currentPitchWheelPosition': unreferenced formal parameter
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(36,60): warning C4100: 'allowTailOff': unreferenced formal parameter
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(44,29): warning C4244: 'argument': conversion from 'int' to 'float', possible loss of data
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(52,47): warning C4244: 'argument': conversion from 'double' to 'float', possible loss of data
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(58,52): warning C4244: 'argument': conversion from 'double' to 'Type', possible loss of data
1>        with
1>        [
1>            Type=float
1>        ]
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(779,41): warning C4100: 'index': unreferenced formal parameter
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(783,46): warning C4100: 'index': unreferenced formal parameter
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(788,62): warning C4100: 'newName': unreferenced formal parameter
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(788,41): warning C4100: 'index': unreferenced formal parameter
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(793,56): warning C4100: 'samplesPerBlock': unreferenced formal parameter
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(861,24): warning C4456: declaration of 'processedMidi' hides previous local declaration
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(855,20): message : see declaration of 'processedMidi'
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(863,25): warning C4456: declaration of 'm' hides previous local declaration
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(854,21): message : see declaration of 'm'
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(865,30): warning C4996: 'juce::MidiBuffer::Iterator': was declared deprecated
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(913,26): warning C4996: 'juce::MidiBuffer::Iterator': was declared deprecated
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(1019,25): warning C4456: declaration of 'm' hides previous local declaration
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(1015,21): message : see declaration of 'm'
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(1021,30): warning C4996: 'juce::MidiBuffer::Iterator': was declared deprecated
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(1081,25): warning C4456: declaration of 'm' hides previous local declaration
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(1076,21): message : see declaration of 'm'
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(1082,25): warning C4456: declaration of 'n' hides previous local declaration
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(1077,21): message : see declaration of 'n'
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(1084,30): warning C4996: 'juce::MidiBuffer::Iterator': was declared deprecated
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(865,40): warning C4996: 'juce::MidiBuffer::Iterator::Iterator': was declared deprecated
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(913,36): warning C4996: 'juce::MidiBuffer::Iterator::Iterator': was declared deprecated
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(1021,40): warning C4996: 'juce::MidiBuffer::Iterator::Iterator': was declared deprecated
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(1084,40): warning C4996: 'juce::MidiBuffer::Iterator::Iterator': was declared deprecated
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt_math.h(419,16): error C2668: 'fpclassify': ambiguous call to overloaded function (compiling source file ..\..\Source\Oscillator.cpp)
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt_math.h(304,31): message : could be 'int fpclassify(long double) noexcept' (compiling source file ..\..\Source\Oscillator.cpp)
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt_math.h(299,31): message : or       'int fpclassify(double) noexcept' (compiling source file ..\..\Source\Oscillator.cpp)
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt_math.h(294,31): message : or       'int fpclassify(float) noexcept' (compiling source file ..\..\Source\Oscillator.cpp)
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt_math.h(419,16): message : while trying to match the argument list '(_Ty)'
1>        with
1>        [
1>            _Ty=int
1>        ] (compiling source file ..\..\Source\Oscillator.cpp)
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\Oscillator.cpp(731,39): message : see reference to function template instantiation 'bool isnan<int>(_Ty) noexcept' being compiled
1>        with
1>        [
1>            _Ty=int
1>        ]
1>include_juce_gui_extra.cpp
1>include_juce_opengl.cpp
1>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.36.32532\include\memory(3465,35): warning C4996: 'juce::AudioProcessorValueTreeState::Parameter::Parameter': Prefer the signature taking an Attributes argument (compiling source file ..\..\Source\PluginProcessor.cpp)
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(499,31): message : see reference to function template instantiation 'std::unique_ptr<Parameter,std::default_delete<Parameter>> std::make_unique<Parameter,juce::ParameterID,juce::String,juce::String,juce::NormalisableRange<float>,float,juce::String(__cdecl &)(float),float(__cdecl &)(const juce::String &),0>(juce::ParameterID &&,juce::String &&,juce::String &&,juce::NormalisableRange<float> &&,float &&,juce::String (__cdecl &)(float),float (__cdecl &)(const juce::String &))' being compiled
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(453,15): warning C4505: 'filtAttackShapeSliderValueToText': unreferenced function with internal linkage has been removed
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(458,14): warning C4505: 'filtAttackShapeSliderTextToValue': unreferenced function with internal linkage has been removed
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(463,15): warning C4505: 'filtDecayShapeSliderValueToText': unreferenced function with internal linkage has been removed
1>C:\Users\seanw\Desktop\waylosynth2-main\Source\PluginProcessor.cpp(468,14): warning C4505: 'filtDecayShapeSliderTextToValue': unreferenced function with internal linkage has been removed
1>Done building project "waylosynth55_SharedCode.vcxproj" -- FAILED.
2>------ Build started: Project: waylosynth55_VST3, Configuration: Debug x64 ------
3>------ Build started: Project: waylosynth55_StandalonePlugin, Configuration: Debug x64 ------
2>include_juce_audio_plugin_client_VST3.cpp
3>include_juce_audio_plugin_client_Standalone.cpp
2>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(1127,5): error MSB6006: "link.exe" exited with code 1104.
2>LINK : fatal error LNK1104: cannot open file 'waylosynth55.lib'
2>Done building project "waylosynth55_VST3.vcxproj" -- FAILED.
3>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(1127,5): error MSB6006: "link.exe" exited with code 1104.
3>LINK : fatal error LNK1104: cannot open file 'waylosynth55.lib'
3>Done building project "waylosynth55_StandalonePlugin.vcxproj" -- FAILED.
========== Build: 0 succeeded, 3 failed, 0 up-to-date, 0 skipped ==========
========== Build started at 3:13 AM and took 29.696 seconds ==========

Is it this error crashing the build ?

1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\ucrt\corecrt_math.h(419,16): error C2668: 'fpclassify': ambiguous call to overloaded function (compiling source file ..\..\Source\Oscillator.cpp)

Bingo ! this was the error unique to the windows compiler

I had to change

isnan(integer) call with isnan(static_cast<double>(integer)).

Glad you got it figured out. Also good that you upgraded to latest VS. I assume you have a call to fpclassify, or some other library that you are using calls it?

### XCODE C++ compiler this passed ok 
#include <math.h>
if (midi_note_number > 0 && !(isnan(midi_note_number)))
        {
            m_mod_g = m_mod_g + 1 / midi_note_number;
        };

## compiler in visual studio wanted this 
if (midi_note_number > 0 && !(isnan(static_cast<double>(midi_note_number))))
        {
            m_mod_g = m_mod_g + 1 / midi_note_number;
        };

I believe underneath the math library is the fpclassify which didnt like having an int passed to it in that compiler.

Thanks for you great help and patience.
Sean

1 Like