THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/12/2010 at 14:43, xxxxxxxx wrote:
Cinema 4D Version: R12
Platform: Windows ;
Language(s) : C++ ;
After converting a plug-in from cinema 4d r11.5 to r12 I got many problems. I´m solved all of them with one exception:
.res\description\xbmflip.res : fatal error LNK1107: invalid or corrupt file
I think it is a Visual C++ problem but I don´t know how to solve it.
If you need picture, code, files I will give you that.
The orginal plugin is from: http://www.microbion.co.uk/graphics/c4d/create_plugins3.htm
On 13/12/2010 at 15:03, xxxxxxxx wrote:
That file is read by Cinema 4D - you should _not_ include it as one of the source files of the Visual C project to be compiled/linked/processed (though some files may need to #include the related .h file). Same thing with "*.str" files... don't include them in the project either.
On 14/12/2010 at 02:52, xxxxxxxx wrote:
Thank you for your answer. I can follow you but now I get over 30 errors, similar to this:
bmflip.obj : Error LNK2001 : Unresolved External Symbol
On 14/12/2010 at 03:58, xxxxxxxx wrote:
Try doing a full rebuild.
On 14/12/2010 at 04:02, xxxxxxxx wrote:
Can you post the complete or bigger part of the error log please. It looks like not matching or missing declarations.
On 14/12/2010 at 04:47, xxxxxxxx wrote:
Here a part from the log:
1>bmflip.obj : error LNK2001: Unresolved External Symbol ""struct OperatingSystem * t_C4DOS" ([email protected]@[email protected]@A)".
1>main.obj : error LNK2001: Unresolved External Symbol ""struct OperatingSystem * t_C4DOS" ([email protected]@[email protected]@A)".
1>bmflip.obj : error LNK2019: An undefined external symbol l ""public: __thiscall
BaseData::BaseData(void)" ([email protected]@[email protected])" in function ""public: __thiscall NodeData::NodeData(void)" ([email protected]@[email protected])".
1>bmflip.obj : error LNK2001: Unresolved External Symbol ""public: virtual void __thiscall NodeData::Free(class GeListNode * )" ([email protected]@@[email protected]@@Z)".
Looks like an API problem...but I insert the sdk to the project via Debug and Release Property Managermanager.
Must I compile the hole api in the obj folder all time?
On 14/12/2010 at 06:16, xxxxxxxx wrote:
That's from one of my tutorial pages and I can say for sure that it compiles and links fine on R11.5
I haven't tried redoing it since I got R12 but if I find time I'll have a look at it. Keith is right of course - the only thing you need to have as source files in the project are the two .cpp files and the file bmflip.h as the sole header file. Anything else which needs to be loaded is brought in by #include directives. The .res and .str files are loaded at runtime.
You don't need to keep recompiling the api each time. Once you've done it once, just link to the correct library (e.g. _api_Win32_Debug.lib). You do this in the linker options. It looks to me as if you haven't linked to the correct library, or maybe you haven't told the linker where to find it.
(Edit - I see you've emailed me as well. Feel free to ask more by email if you want.)
On 14/12/2010 at 06:32, xxxxxxxx wrote:
A linker problem hmm, but don´t know how to solve it.
Now I use the original SDK and copy&paste it. Compile the api, rename all and delete all not necessary files. When the API is in the project-map, it works.
On 14/12/2010 at 07:36, xxxxxxxx wrote:
The api should be in your project map so you can set the dependency (as your sdk project is dependent on the api).
On 14/12/2010 at 08:09, xxxxxxxx wrote:
Thank you. It works now.