Hi there,
I have a setup where I distribute libraries built for a release version, and allow a user to use them as a DLL. I originally released them as VC 7.0 libs.
I had a user try to link these using VC exp 8, and received errors which appeared to be stl related. I got express and rebuilt the libs in release form (converting the older projects) and everything built and linked fine.
Unfortunately, there is a runtime error with the user's DLL I have yet to solve.
In an attempt to build a debug DLL, my "release" libs are coming up with no symbol errors for
"__invalid_parameter_noinfo"
There is very little info available on this symbol. It is listed in libcmt.lib but not libcmtd.lib . Is there a switch I need to set and recompile the libs with Or is there an incompatibility problem here
Thanks.

mixing libraries - making debug - missing symbol __invalid_parameter_noinfo
stivo
If you can produce a small repro case, please post it. If you cannot, please post your cl.exe/link.exe command lines (usually located in buildlog.htm).
I'm probably wrong, but this might have something to do with the /RTC or /GS set of command switches. Are those release libs static libs or DLLs
Tom Sapp
I take it that did not solve your problem, so let's try something else.
It looks like you're encountering a far more common problem that occurs with complex solutions that have many dependencies.
By default, a debug project cannot use a release library unless that library was compiled as a DLL. The CRT object code (selected via Project Properties -> C/C++ -> Code Generation -> Runtime library) does not get resolved until link time, and if the runtime library is different between any 2 projects (eg. one lib compiles with /MT, the other /MD), the linker will not know which one to choose (hence, your linker errors).
If you want to mix debug projects with release libs, you'll need to convert those release libs into DLLs.
keiichi
/Zl, or using /nodefaultlib:xxx or defining _SECURE_SCL=0. I've tried these without success, so far. Any clues
Sarika_MS
_CRTIMP void __cdecl _invalid_parameter_noinfo(void)
{
}
make under your own risk
gunning
Sorry, I had to go away on business so I failed to reply in a timely manner. Thanks for your responses.
Yes, these libraries are being staticly linked.
I do find it disappointing that the compiler now now does not fully support the use of static linking as an end user product as a DLL is not appropriate for this case.
It seems to me if it is missing one symbol this symbol could be stubbed out. Do you have the signature for this symbol
Lanceli
I working with closed commercial libraries, how can build my code around these libraries...use printf and dont debug my source
Nev
golf4dee
It's always been like that. I've never been able to mix release libs in a debug project, because I always got untold amounts of LNK2005 errors related to the C runtime. And these errors occurred in VC6 and VC2003. The Correct C++ tutorial (chapter 5) alludes to it.
The only time I've been able to mix debug and release libs is when one lib tries to eliminate it's use of the CRT (no STL, no string.h, no stdio.h, ...). Are any of your DLLs trying to eliminate its use of the CRT
I've traditionally solved this problem by compiling all debug version of the libs. That way, all of my projects in the solution are debug, and I get no linker problems.
The reason Win32 SDK libs (release libs) can link with no error, is because they reference DLLs. As DLLs, the linker need not worry about resolving functions on the DLL side.
Although the source code to this function is available (crt/src/invarg.c), I doubt this will help you with your problems (it's like hacking the includes directory to solve some bug in your code. Sure, strcpy doesn't check for a NULL pointer, but that doesn't mean you should alter strcpy to make it check for NULL. You have to fix your caller code).
In this case, I suggest either creating Debug versions libs and running them under AppVerifier, or creating a release DLL that does a lot of logging.
Jayen
Probably not a good idea. It may make the release libs work, but will cause LNK2005s (or even a runtime crash) in debug builds. Wasn't that function supposed to call _invalid_parameter()
Pad with #ifdefs/#endifs and (for portable code) #ifdef _MSC_VER #if (_MSC_VER==1400)/#endif #endif.