Visual studio builds a .lib instead of a .dll when building AGain sample

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

I have configuration type set to .dll, the extension is set to .dll, in the pre-processor directives I have "_WINDLL", and I set the output file to be like this "$(CommonProgramW6432)\VST3\Steinberg\$(ProjectName).dll" . However, it still builds a static (.lib) every time and I don't know why. I'm building the AGain sample literally straight from steinberg.

Post

Have you maybe only looked in the 'obj' folder? Try 'bin'...
We are the KVR collective. Resistance is futile. You will be assimilated. Image
My MusicCalc is served over https!!

Post

no bin folder gets created just "Release" ,it was a good thought though.

Post

c0mputer-fr0d wrote:I have configuration type set to .dll, the extension is set to .dll, in the pre-processor directives I have "_WINDLL", and I set the output file to be like this "$(CommonProgramW6432)\VST3\Steinberg\$(ProjectName).dll" . However, it still builds a static (.lib) every time and I don't know why. I'm building the AGain sample literally straight from steinberg.
Is the project type set as shared library?

Post

I don't know how do I check? I googled it didn't find a single thing regarding changing project type to shared lib.
I also tried changing the runtime library to /MD (multi threaded dll) it just gives me the following errors

Code: Select all

Error	127	error LNK1169: one or more multiply defined symbols found	C:\Program Files\Common Files\VST3\Steinberg\AGain.vst3	1
Error	115	error LNK2005: "void __cdecl terminate(void)" (?terminate@@YAXXZ) already defined in MSVCRT.lib(MSVCR110.dll)	C:\VST3 SDK\public.sdk\samples\vst\again\win\LIBCMT.lib(hooks.obj)
Error	114	error LNK2005: __CppXcptFilter already defined in MSVCRT.lib(MSVCR110.dll)	C:\VST3 SDK\public.sdk\samples\vst\again\win\LIBCMT.lib(winxfltr.obj)
Error	110	error LNK2005: __crtCaptureCurrentContext already defined in MSVCRT.lib(MSVCR110.dll)	C:\VST3 SDK\public.sdk\samples\vst\again\win\LIBCMT.lib(winapisupp.obj)
Error	111	error LNK2005: __crtCapturePreviousContext already defined in MSVCRT.lib(MSVCR110.dll)	C:\VST3 SDK\public.sdk\samples\vst\again\win\LIBCMT.lib(winapisupp.obj)
Error	112	error LNK2005: __crtTerminateProcess already defined in MSVCRT.lib(MSVCR110.dll)	C:\VST3 SDK\public.sdk\samples\vst\again\win\LIBCMT.lib(winapisupp.obj)
Error	113	error LNK2005: __crtUnhandledException already defined in MSVCRT.lib(MSVCR110.dll)	C:\VST3 SDK\public.sdk\samples\vst\again\win\LIBCMT.lib(winapisupp.obj)
Error	120	error LNK2005: __iob_func already defined in MSVCRT.lib(MSVCR110.dll)	C:\VST3 SDK\public.sdk\samples\vst\again\win\LIBCMT.lib(_file.obj)
Error	118	error LNK2005: __xc_a already defined in MSVCRT.lib(cinitexe.obj)	C:\VST3 SDK\public.sdk\samples\vst\again\win\LIBCMT.lib(crt0init.obj)
Error	119	error LNK2005: __xc_z already defined in MSVCRT.lib(cinitexe.obj)	C:\VST3 SDK\public.sdk\samples\vst\again\win\LIBCMT.lib(crt0init.obj)
Error	116	error LNK2005: __xi_a already defined in MSVCRT.lib(cinitexe.obj)	C:\VST3 SDK\public.sdk\samples\vst\again\win\LIBCMT.lib(crt0init.obj)
Error	117	error LNK2005: __xi_z already defined in MSVCRT.lib(cinitexe.obj)	C:\VST3 SDK\public.sdk\samples\vst\again\win\LIBCMT.lib(crt0init.obj)
Error	106	error LNK2005: _amsg_exit already defined in MSVCRT.lib(MSVCR110.dll)	C:\VST3 SDK\public.sdk\samples\vst\again\win\LIBCMT.lib(crt0dat.obj)
Error	107	error LNK2005: _initterm_e already defined in MSVCRT.lib(MSVCR110.dll)	C:\VST3 SDK\public.sdk\samples\vst\again\win\LIBCMT.lib(crt0dat.obj)
Error	108	error LNK2005: _lock already defined in MSVCRT.lib(MSVCR110.dll)	C:\VST3 SDK\public.sdk\samples\vst\again\win\LIBCMT.lib(mlock.obj)
Error	109	error LNK2005: _unlock already defined in MSVCRT.lib(MSVCR110.dll)	C:\VST3 SDK\public.sdk\samples\vst\again\win\LIBCMT.lib(mlock.obj)
Error	121	error LNK2005: iswalnum already defined in MSVCRT.lib(MSVCR110.dll)	C:\VST3 SDK\public.sdk\samples\vst\again\win\LIBCMT.lib(_wctype.obj)
Error	122	error LNK2005: iswalpha already defined in MSVCRT.lib(MSVCR110.dll)	C:\VST3 SDK\public.sdk\samples\vst\again\win\LIBCMT.lib(_wctype.obj)
Error	123	error LNK2005: iswdigit already defined in MSVCRT.lib(MSVCR110.dll)	C:\VST3 SDK\public.sdk\samples\vst\again\win\LIBCMT.lib(_wctype.obj)
Error	124	error LNK2005: iswspace already defined in MSVCRT.lib(MSVCR110.dll)	C:\VST3 SDK\public.sdk\samples\vst\again\win\LIBCMT.lib(_wctype.obj)
Error	103	error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in cvstguitimer.obj	C:\VST3 SDK\public.sdk\samples\vst\again\win\base_vc9.lib(conststringtable.obj)
Error	104	error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in cvstguitimer.obj	C:\VST3 SDK\public.sdk\samples\vst\again\win\base_vc9.lib(fstring.obj)
Error	105	error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in cvstguitimer.obj	C:\VST3 SDK\public.sdk\samples\vst\again\win\base_vc9.lib(fthread.obj)
most interesting is this error

Code: Select all

error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in cvstguitimer.obj
which I don't know why it's doing that. even if I set both the Base lib and the Again plugin to dlls it still does it.
Last edited by c0mputer-fr0d on Wed May 06, 2015 6:14 pm, edited 1 time in total.

Post

Project properties in Visual Studio. I don't believe you, it's one of the first thing you can find on Google/MSDN :p

Post

oh if you mean configuration type , yeah I got that set I said that in the first post so I didn't think that's what you were talking about sorry.

Post

---
Last edited by Chapelle on Fri Oct 06, 2023 10:18 pm, edited 1 time in total.

Post

oh really? I have no idea how to do make it compile into a .vst3. that actually helps a lot but now I'm lost in a different way.Thanks very much for that input. Leave it to steinberg to make using their sdk even harder by introducing some new file format that probably just wraps around a dll.

Post

A .vst3 is just a dll with another extension. So check the configuration, it has to indicate shared library, and then change the name to .vst3.
Download the application called depends.exe (32 or 64bits depending on your config) and open the vst3 file to check if it can be read and is actually a shared library.

Post

I still can't figure it out, I am literally using the sample that comes right with the sdk with 0 modifications to it what's so ever. It just builds a .lib and no .vst3. Back when I tried working with vst2.4 the steinberg sdk was incredibly user unfriendly but it was usable, but apparently now they really give -1 shits about the developers. I uninstalled vs 2012 , reinstalled vs 2010 twice, installed vs 2010 service pack 1, tried compiling the base library into a static library to avoid compiling both AGain and base at the same time. Now I have to pay someone to do something that should work out of the box. Could anyone help me?

here are all my command line options, they are the default ones that come with the "again_vc9.sln" project.

Code: Select all


/I"../../../../../vstgui.sf" /I"../../../../.." /ZI /nologo /W3 /WX- /Od /Oy- /D "WINDOWS=1" /D "DEVELOPMENT=1" /D "_CRT_SECURE_NO_DEPRECATE=1" /D "_VC80_UPGRADE=0x0710" /D "_WINDLL" /Gm- /EHsc /RTC1 /MTd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fp"Win32\Debug\AGain.pch" /Fa"Win32\Debug\" /Fo"Win32\Debug\" /Fd"Win32\Debug\vc100.pdb" /FR"Win32\Debug\" /Gd /analyze- /errorReport:queue 

Code: Select all


/OUT:"C:\Program Files (x86)\Common Files\VST3\Steinberg\AGain.vst3" /INCREMENTAL /NOLOGO /DLL "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" "C:\VST3 SDK\base\win\Win32\Debug.base_vc9\base_vc9.lib" /DEF:"again.def" /MANIFEST:NO /ManifestFile:"Win32\Debug\AGain.vst3.intermediate.manifest" /ALLOWISOLATION /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"Win32\Debug\again.pdb" /SUBSYSTEM:WINDOWS /PGD:"C:\VST3 SDK\public.sdk\samples\vst\again\win\Win32\Debug\AGain.pgd" /TLBID:1 /DYNAMICBASE:NO /MACHINE:X86 /ERRORREPORT:QUEUE

I was on Visual studio 2012 express but now I switched to 2010 because I read that visual studio 2012 ruins 2010 installations somehow because microsoft.

Post

Try creating a new empty C++ project for a Win32 library (press next - not finish- in the project wizard - select Dll option) and copy in the source files... (but not the project file)...?

[2c]
Grtx, Marc Jacobi.
VST.NET | MIDI.NET

Post

This line:
/OUT:"C:\Program Files (x86)\Common Files\VST3\Steinberg\AGain.vst3"

Means it will build a file called "again.vst3" and stick it in "C:\Program Files (x86)\Common Files\VST3\Steinberg\" except that location isn't normally writeable unless you are running as admin, perhaps that is your problem? Inspect the log to see what happened and then work a solution from there.

Randomly switching versions of Visual Studio is really a bad idea. You should use the version that matches the project you are trying to build. Normally I'd recommend Visual Studio 2013 Community Edition since it's now free (and not stripped down like previous Express versions). Since you are building a 32 bit plugin so who knows what OS you are running. It really only matters what the project you are trying to build was built with/for. Moving projects from one version of Visual Studio to another can be tricky.
-Matt

Post

I was able to fix it by changing the extension to .dll and then making the output path to blank.
so you are right it was the the fact that common files is read only yet I thought I had solved it a long time ago by turning that flag off in folder options but it changed right back. Thank you very much, I have no idea why they have it output to that folder by default. I switched to visual studio 2015 community but I could of avoided all this by just changing the output directory. Windows permissions are really frustrating.

Post

Another reason to use portable software, +1 shits given :lol:

Post Reply

Return to “DSP and Plugin Development”