|
sdk wizard for c++
hi,
i'm trying to create an addin, in in c++, using ms visual studio.net 2003 and solidworks 2008 sdk.
the code generated by wizard can be compiled only in debug mode. if i switch to release mode, it just don't compile.
i took a look at the project properties and saw that the wizard configures the project only for debug mode.
did any one have the same problem?
tanks in advance.
vinicius
yes! - we have had the same problem.
i have wasted a lot of time playing around trying to get our new projects to build in release mode after creating new projects using this sdk, but even having got it to compile, it still doesn't seem to work properly in solidworks! - calls to (for example) m_psolidworks->get_iactivedoc2(&lpmodel) always return no model. - command works fine in a debug build, but just cannot get them to work in release builds from these projects!
let us know if you get anything working in a a release build for you, please!
thanks,
chris.
what error do you get when compiling?
i have used the solidworks 2008 template project, created a new project using it in visual studio 2005 and that will build using debug build.
however, building switching to release mode fails to build with these errors:
c:\temp\testaddin\testaddin\stdafx.h(49) : fatal error c1083: cannot open type library file: 'swpublished.tlb': no such file or directory
so, i add the missing path to the "additional include directories" of the release project and rebuild.
i then get error:
.\bitmaphandler.cpp(45) : error c2440: '=' : cannot convert from 'bstr' to 'lptstr'
so, at this point i start working through the project settings, finding lots of differences between the debug and release project. (eg "configuration properties - general - configuration type" is set to "application (.exe)" instead of "dyanamic library (.dll)", "use of mfc" not set, "character set" incorrect).
basically, it just looks like the release projects haven't been set at all for the starter templates.
you dont have a working, correctly configured starter project / template set for a solidworks 2008 (we also need to support back to 2007) project do you? - or know of a downloadable version somewhere?
we have recently upgraded an older project to a new project under solidworks 2008. - everything has built and tested fine using the debug builds, we have made lots of changes to the release build to get it to link and build correctly, but when running the release dll it always fails (to start with!) on calls to the function "m_psolidworks->get_iactivedoc2(&lpmodel)" when enabling / disabling menu options (depending on whether there is an open model or not!)
thanks!
chris.
sounds like either the 2008 template has lost its details or converts down badly to 2005 causing invalid project settings, or they had to tweak the template to work and forgot to do the release configuration too.
as for a template; my new book covers add-ins in depth in the first chapter and i may create a template for use with 2005-2008 i will see how it goes when i get to that.
well... thanks for your help!
i'll contact solidworks api support direct and see if i can get a working project from them...
thanks,
chris.
quick |
|