Transfer project to Code::Blocks



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 27/09/2011 at 13:01, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:    
    Platform:      
    Language(s) :

    ---------
    Hello Guys,

    I've started C++ some weeks ago and I really like it. I can now successfully complile C++ Plugins.

    But I would like to work in Code::Blocks rather than in Visual Studio. I'm having problems with the include directories and lib-linking for the c4d headerfiles.

    1. Can you please give me a list of directories I have to include ?
    2. Do I have to link a library (.lib)  ?
    3. Can I compile with GCC or do I have to use the MSVC ?
    4. As I'm very new to C++, I would like to know how I compile the Dynamic Library. I mean, I saw that in VC there is the Main.cpp, but I don't understand how VC knows that the Main.cpp should be compiled to a library . Also, the Main.cpp doesn't include the 'AsyncDialog.cpp' for instance, but it can call RegisterAsyncDialog(). Why ?

    I'd very appreciate a good explanation or a couple of links if their content is well explained. :)

    Thanks you.
    Greetins, Niklas



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 27/09/2011 at 13:26, xxxxxxxx wrote:

    Hello Niklas,

    You can use Code::Blocks but its not supported.

    All you know about setup a working compiler in Code::Blocks are in MSVC: Project->Properties
    1. Properties->C/C++->General->Additional Include Directories
    2. Properties->Linker->Input->Additional Dependencies
    3. If you can get a working setup in GCC, than it would work, why not. ?!?
    4. Main.cpp only register the plugins, but the plugins get called separate from c4d.

    Send me a privat message or via messanger, if you need more informations. ;)



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 28/09/2011 at 06:23, xxxxxxxx wrote:

    I have transfered all include paths etc but I'm getting thousands of warnings about "unused constants s1" and "multi-character constant". And I get a compiler error that C4DGLuint hasn't been declared.. :/
    I can also use the MSVC Compiler in Code::Blocks but I'm getting all the same errors.
    Seems like I am forced to use Visual Studio..

    Thanks for your help anyway. :)



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 28/09/2011 at 12:12, xxxxxxxx wrote:

    Can't someone tell me what exactly I need to compile a cdl for C4D ?
    Ty.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 29/09/2011 at 01:03, xxxxxxxx wrote:

    Microsoft Visual Studio 2003 or later.  You can use the free Express version and do some fix ups to get 64-bit builds as well.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 29/09/2011 at 11:07, xxxxxxxx wrote:

    Why can't it be used with another IDE ? Or why can't I compile it per commandline ?
    Thy



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 29/09/2011 at 11:20, xxxxxxxx wrote:

    Remember that the result is a dynamic library for use with Cinema 4D and that the library executable must be compatible with the OS in question (Windows, MacOS, Linux).   While we have heard that one can use other IDEs to build plugins for C4D, I have never heard of a 'success story' in using anything but the recommended IDEs (Visual Studio for Windows and Xcode for MacOS (CodeWarrior in the past for MacOS 9 and earlier)).  It may be disconcerting but why not use the recommended and supported build systems?  As I mentioned, you can use the FREE version of Visual Studio (Express) to build C4D plugins.  Xcode is free as well.  So I see no reason to subject oneself to needless issues when there are means as 'affordable' which are more attainable.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 29/09/2011 at 12:56, xxxxxxxx wrote:

    I can compile x64 and I have VC 2008, but I really don't like VC. And there must be a way of "simply" including all necessary headerfiles, right ?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 29/09/2011 at 13:35, xxxxxxxx wrote:

    I'm afraid I can't help you much. As mentioned currently only Visual Studio and XCode are supported. You have to dig through the command line options on your own, sorry. Make sure to compile the api libraries first and link against them (api_x64_release.lib or api_x64_debug.lib for x64).

    cheers,
    Matthias



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 01/10/2011 at 01:48, xxxxxxxx wrote:

    Thanks for you answer Matthias. I haven't linked the libraries yet, that would have been an error for sure later. ^^
    Using GCC it tells me 'C4DGLuint' wasn't declared and MSVC it can't find 'pthread.h' (and me neither on my harddisk'. :(



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 01/10/2011 at 09:59, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    Thanks for you answer Matthias. I haven't linked the libraries yet, that would have been an error for sure later. ^^Using GCC it tells me 'C4DGLuint' wasn't declared and MSVC it can't find 'pthread.h' (and me neither on my harddisk'. :(

    Switching a project to a different compiler and IDE ain't something you should try as a beginner in C++.

    It requires intimate knowledge about the compilers, the preprocessor defines and behaviour, the systems ABI, the padding behaviour of the compilers (and how to change it) and what is expected by the OS, usage of exceptions (or the lack of in our case), parameter passing conventions, inheritance, ..., the influence and meaning of the compiler's options, the linker, ...

    The messages you get are the ones of the Linux or Mac part of the code (as several preprocessor defines are missing in your project settings).

    Best regards,

    Wilfried Behne



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 07/11/2011 at 07:10, xxxxxxxx wrote:

    Finally, I can successfully compile Cinema 4D Plugins with MinGW Gcc. :)
    It took alot of Workaround, and I even had to modify the c4d _api a little bit, but it works good yet. :)



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 20/11/2011 at 04:16, xxxxxxxx wrote:

    Modified C4D API? Well, have fun with that. After a C4D update, your changes might be gone, or you will have to do additional changes to make it work again.

    I still don't understand why you're hacking your way into the API and doing such a cumbersome effort just to compile your projects in an unsupported IDE. Really, it can't get much better than with VisualStudio 2005 Pro and VisualAssistX, those are well worth their money. And you could spend your time on developing the actual plugin instead of spending it on finding workarounds for problems with other IDEs.


Log in to reply