• Advertisement
Sign in to follow this  

[C++] How do I create a Release configuration?

This topic is 3867 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have finished working on a Adobe After Effects plugin, which is a dll. I only based my work from the samples given from AEE sdk, but the samples do not include a Release configuration, so I built one myself, but I kept receiving a linker error: Error 39 error LNK2019: unresolved external symbol __imp___CrtDbgReportW referenced in function "public: __thiscall std::_Vector_const_iterator<struct KeyframeDetails,class std::allocator<struct KeyframeDetails> >::_Vector_const_iterator<struct KeyframeDetails,class std::allocator<struct KeyframeDetails> >(struct KeyframeDetails *,class std::_Container_base const *)" (??0?$_Vector_const_iterator@UKeyframeDetails@@V?$allocator@UKeyframeDetails@@@std@@@std@@QAE@PAUKeyframeDetails@@PBV_Container_base@1@@Z) Aae2Cust.obj What I did was copy the settings from the provided Debug configuration, then change any "./debug" directory instances to "./release," (like output directory, intermediate, and change the runtime library (c/c++ -> code generation -> runtime library) from Multi-threaded Debug DLL to Multi-threaded DLL. Here are the command line options, as stated from the property pages. They almost look the same. C/C++ debug /Od /I "..\..\..\Headers\SP" /I "..\..\..\Headers\Legacy" /I "..\..\..\Headers\AS" /I "..\..\..\Headers\ADM" /I "..\..\..\Resources" /I "..\..\..\Util" /I "..\..\..\Headers" /D "MSWindows" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_VC80_UPGRADE=0x0710" /D "_WINDLL" /FD /EHsc /MDd /Zp4 /Fp".\Debug/ProjDumper.pch" /FAs /Fa".\Debug/" /Fo".\Debug/" /Fd".\Debug/" /FR".\Debug\\" /W3 /nologo /c /ZI /errorReport:prompt C/C++ release /Od /I "..\..\..\Headers\SP" /I "..\..\..\Headers\Legacy" /I "..\..\..\Headers\AS" /I "..\..\..\Headers\ADM" /I "..\..\..\Resources" /I "..\..\..\Util" /I "..\..\..\Headers" /D "MSWindows" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_VC80_UPGRADE=0x0710" /D "_WINDLL" /FD /EHsc /MD /Zp4 /Fp".\Release/ProjDumper.pch" /FAs /Fa".\Release/" /Fo".\Release/" /Fd".\Release/" /FR".\Release\\" /W3 /nologo /c /ZI /errorReport:prompt Linker debug: /OUT:"C:\Program Files\Adobe\After Effects 6.5\Support Files\Plug-ins\sdk\AEGP\Aae2Cust.aex" /INCREMENTAL /NOLOGO /DLL /MANIFEST /MANIFESTFILE:".\Debug\Aae2Cust.aex.intermediate.manifest" /DEBUG /PDB:".\Debug/ProjDumper.pdb" /SUBSYSTEM:WINDOWS /IMPLIB:".\Debug/ProjDumper.lib" /MACHINE:X86 /ERRORREPORT:PROMPT kernel32.lib Linker release: /OUT:"C:\Program Files\Adobe\After Effects 6.5\Support Files\Plug-ins\sdk\AEGP\Aae2Cust.aex" /INCREMENTAL /NOLOGO /DLL /MANIFEST /MANIFESTFILE:".\Release\Aae2Cust.aex.intermediate.manifest" /DEBUG /PDB:".\Release/ProjDumper.pdb" /SUBSYSTEM:WINDOWS /IMPLIB:".\Release/ProjDumper.lib" /MACHINE:X86 /ERRORREPORT:PROMPT kernel32.lib If I change release's runtime library back to multi-threaded debug dll, the linker error disappears and the output is produced. What can I do?

Share this post


Link to post
Share on other sites
Advertisement
I noticed you are building a DLL, but only LIBs are produced.

Under Project Properties, Under General=>Configuation Type,
insure it read "Dynamic Library (.dll)"

Other then that, for Release, stay with "Multi threaded DLL", not
"Moulti threaded debug DLL"

As long as the routines are imported/exported correctly from the DLL,
everything should work fine.

Share this post


Link to post
Share on other sites
Thanks for you help, but it does read dll on the configuration type, both for debug and release.

Apart from the changing directories from ".\debug" to ".\release," the only change, from the provided debug configuration to the release configuration, I made was toggling the runtime library from multi-threaded debug dll to multi-threaded dll. The debug configuration works fine, but my release configuration produces the linker error. I can't figure out why. More help please?

Share this post


Link to post
Share on other sites
According to your command line fo release build:

/OUT:"C:\Program Files\Adobe\After Effects 6.5\Support Files\Plug-ins\sdk\AEGP\Aae2Cust.aex" /INCREMENTAL /NOLOGO /DLL /MANIFEST
/MANIFESTFILE:".\Release\Aae2Cust.aex.intermediate.manifest" /DEBUG <<<----Debug!!
/PDB:".\Release/ProjDumper.pdb" /SUBSYSTEM:WINDOWS
/IMPLIB:".\Release/ProjDumper.lib" /MACHINE:X86 /ERRORREPORT:PROMPT kernel32.lib

I am suspicous of the *.AEX output (instead of *.DLL).

The /DEBUG flag is still set through a setting. Insure that Neither
compilier nor the linker generate any debug information. Also, insure debugging
is disabled (Which is what it looks like).

You runtime compilier also has /DEBUG...

Share this post


Link to post
Share on other sites
Thanks crypter. I followed your advice and removed any debug generators, but the linker error still appeared. I then tried to use the same way of creating a release config (switching from /MDd to /MD) on a copy of the sample provided code my plugin is based on, and I'm surprised that it run and built a release version. I managed to single out the cause in my code, and it turns out that, as stated in the linker error message, my vectors are giving me problems.

Since this turns out to be a different nature of the problem, I have created another thread with a more proper subject. You may view it at

http://www.gamedev.net/community/forums/topic.asp?topic_id=452818

By the way, aex is the extension for an Adobe After Effects plugin, I forgot to mention.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement