开发者

VC++ Project, want to compile within another IDE but something is missing

开发者 https://www.devze.com 2023-04-10 02:31 出处:网络
I am fairly new to C++. I want to write plugins for an application called Cinema 4D. Maxon, the maker of C4D, provides an API for doing this. The header-files are located in a special folder.

I am fairly new to C++.

I want to write plugins for an application called Cinema 4D.

Maxon, the maker of C4D, provides an API for doing this. The header-files are located in a special folder.

The "cinema4dskd" is a Visual Studio project containing sample plugins. Within this project there is another subproject called _api .

VC++ Project, want to compile within another IDE but something is missing

The popupwindow is the "Project dependencies" dialog.

The _api sub project seems to be a link to a file that is present on my localdrive but it is not within the cinema4dsdk.vcproj.

All files within the _api project are located in a folder in the Cinema 4D installation path also called _api.

It is full of header and .cpp files.

This is basically what I need to compile plugins for Cinema 4D, including "c4d.h" in my source code.

But this is where the problems start.

I'm trying to compile a plugin within Code::Blocks, I have added all paths to "c4d.h", etc. But every compiler (gcc, and even msvc !) tell me thousands of warnings about:

C:\Programs\MAXON\Cinema 4D R12\resource\_api\ge_prepass.h |2668|warning: multi-character character constant|

And finally an error that C4DGLuint isn't declared. Why does it work in VC++ but not with any other compiler ? I must have missed something, but I really don't know what.

I don't think I am allowed to share this project, as the _api is owned by Maxon GmbH, but if you really need it I beg you to download the Cinema 4D Demo version where the cinema4dskd project is included.

Tell me if you need any further information, I hope you have an idea what may be missing. Why the heck can VC++ compile the Plugins right, but I can't using the command-line or any other IDE ?

Thank you very much.

Niklas

Updates:

Example of multicharacter constant error:

C:\Users\niklas\Documents\CodeBlocks\Cinema4D\_api\src\gui.h|690|warning: multi-character character constant|

C:\Users\niklas\Documents\CodeBlocks\Cinema4D\_api\src\gui.h|693|warning: multi-character character开发者_运维问答 constant|

690: BFM_SETVIEWPORTORIGIN  = 'cORG',
691:    BFM_SETVIEWPORTORIGIN_X=1,
692:    BFM_SETVIEWPORTORIGIN_Y=2,
693: BFM_SETVIEWPORTSIZE    = 'cSIZ',


'cORG'

is a so-called multi character literal. Its value does not fit into a char variable, you will need an 'int' to hold it, and according to this post

C++ multicharacter literal

it is compiler-specific how this thing is interpreted. Seems the other compiler you have tested does not support those kind of literals.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号