Compile error. Dupe post. sorry.

  • MassacreLand
    6th Feb 2012 Member 0 Permalink
    I posted about it but it was a older post so I am re posting

    I followed to tutorial to the te and this is what I got
    http://pastebin.com/YiHtLnZ3

    Code::Blocks


    Bump. Can someone please answer to this!
    I litteraly did everything step by step. Even tried alot of stuff on my own!
    And still getting either the pastebin error or BCON.H error (Not sure if its called bcon lol but something like that)

  • jacksonmj
    6th Feb 2012 Developer 0 Permalink
    Are you sure you have g++ installed? Although in fact you need to use gcc not g++ (the source is plain C, and some bits of it aren't compatible with C++ compilers).

    If you're getting errors about BSON.h not found, check you have completed this step:
    Under the Compiler tab, click Add, and browse to and add the "includes" folder of the source to the list. (It should be okay to leave it as a relative path, but if you get a bunch of errors about various .h files not being found, try using the full path of the includes folder.)
  • MassacreLand
    6th Feb 2012 Member 0 Permalink
    @jacksonmj (View Post)
    I have MinGW
    I beleive it comes with g++ and gcc.

    Also then how do I use to full path because I get this error even when using the preset projects.

    Thank you for helping me by the way.
  • jacksonmj
    6th Feb 2012 Developer 0 Permalink
    The full path would be something like "E:\Unknown\L\Powder\Mod\ModIWork\PowderCBNoFFTW" (might need "\includes" on the end as well). The preset projects don't use this because they don't know the full path - the path depends on where you extract it to.
  • MassacreLand
    6th Feb 2012 Member 0 Permalink
    Ohhhh Okay.
    Well I will try it.
    Thanks!

    I will have to re install code blocks lol I uninstalled it to retry VS.

    But then I will make sure everything is as you said.
  • jacksonmj
    6th Feb 2012 Developer 0 Permalink
    For some reason best known to itself, Code Blocks is using g++ to link TPT. If g++ is not installed, compilation will fail with the message "Execution of 'mingw32-g++.exe....' failed"

    There are two possible ways to fix this.

    A) Install g++: either when you install MinGW, or afterwards by running "mingw-get install g++" in command prompt.

    B) Change the linker executable in Code Blocks
    In Code Blocks, go to Settings -> Compiler and debugger.
    Under the "Toolchain executables" tab, change "Linker for dynamic libs" to mingw32-gcc.exe
  • jacksonmj
    6th Feb 2012 Developer 0 Permalink
    Are the files still in that location (E:\Unknown\L\Powder\Mod\PowderCBProj\) ?

    If they've been moved, try removing them from the project and adding them again. Otherwise, maybe try starting again with a blank project.

    (To remove and re-add: In the Management window you will see the project name listed there. Right-click it, click "Remove files...", and remove all of them. Right-click it, click "Add files recursively...", and choose the folder where all of the files are.)
  • MassacreLand
    6th Feb 2012 Member 0 Permalink
    Linking executable: bin\Release\Powder.exe
    mingw32-gcc.exe: error: obj\Release\obj\Release\src\Resources\powder-res.res: No such file or directory



    On the bright side. ONLY ERROR I GOT! Lol


    (New)
    Wow I added the .res to resources and got a crud load of errors xD
  • jacksonmj
    6th Feb 2012 Developer 0 Permalink
    Under the project name in the Management window:
    The only file in Resources should be src/Resources/powder-res.rc
    Remove any other files there.


    (.res files should be automatically generated from .rc files during the build process)