Page 1 of 1

"Build Error" and "No new line in the end of

Posted: Sat Oct 08, 2005 1:51 pm
by Guest
Can anyone explain me what my Dev-C++ compiler wants to tell me???

Posted: Sat Oct 08, 2005 1:55 pm
by Halan
sry i misstyped something...

i mean when i compile with dev-cpp i get the error "Build Error" and a warning "no new line at the end of file"

Posted: Sat Oct 08, 2005 2:40 pm
by ThommyE
if he's telling you the file he's complaining about, just open it with wordpad or whatever and add an empty line at the end of the file... (go to the very bottom after the very last written letter/symbol and press enter;))

bdw. compilers often tell you what they want=) he just wanted an empty line at the end of the file.
although i couldn't remember a compiler seriosly aborting his job due to a missing line.
any other errors?
... or anyone knows if dev-cpp relly hold on something silly like this?

Posted: Sat Oct 08, 2005 3:13 pm
by Guest
its not devc++ fault its gcc

Posted: Sat Oct 08, 2005 9:22 pm
by Halan
i dont think he broke up cause of the missing line i think it was the "build error" and ive no idea what it means...

Btw: im englischen heisst es "it" und nicht "he". typischer deutscher fehler ;) (just a english-help for the german guy)

Edit: could it be that i need a .devpack-file for irrlicht? if yes, where can i get it?

Posted: Sun Oct 09, 2005 2:37 am
by Leiden
IIRR the newline is not an error but a warning message. It must be something else in the code thats amis.

Posted: Sun Oct 09, 2005 11:20 am
by Halan
Leiden wrote:IIRR the newline is not an error but a warning message. It must be something else in the code thats amis.
As i said, ive also the ERROR: "Build Error". Has something to do with the compiler, not the code, imo.

Posted: Sun Oct 09, 2005 6:04 pm
by Halan
no idea what build error is? :(

Posted: Sun Oct 09, 2005 8:46 pm
by Halan
heres the code

Code: Select all

//Including the Irrlicht Engine (http://irrlicht.sourceforge.net/) and other stuff
#include <irrlicht.h>
#include <windows.h>
#include <stdio.h>

using namespace irr;

using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;

#pragma comment(lib, "Irrlicht.lib")

int WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT)
{
    //Create Device
    IrrlichtDevice *device = createDevice(video::EDT_SOFTWARE,
         core::dimension2d<s32>(512, 384), 32, false, false, false, 0);
		
    device->setWindowCaption(L"Age of War - MenĂ¼");
    
    IVideoDriver* driver = device->getVideoDriver();
    ISceneManager* smgr = device->getSceneManager();
    IGUIEnvironment* guienv = device->getGUIEnvironment();
    
    //MenĂ¼ Title
    guienv->addStaticText(L"Age of War",
    rect<int>(10,10,200,22), true);
    
    smgr->addCameraSceneNode(0, vector3df(0,30,-40), vector3df(0,5,0)); //Intialize Camera
    
    IAnimatedMesh* zwergmesh = smgr->getMesh("./media/menu/models/dwarf.ms3D"); //get mesh
    IAnimatedMeshSceneNode* zwerg = smgr->addAnimatedMeshSceneNode( zwergmesh ); //get scene node
    
    if (zwerg)
    {
	zwerg->setMaterialFlag(EMF_LIGHTING, false); //disable Lightning
	zwerg->setFrameLoop(0, 60);	//Limitate Frames to 60
	zwerg->setMaterialTexture( 0, driver->getTexture("./media/menu/textures/dwarf.bmp") );//Set Texture
    }
    
    //Run everything :)
    while(device->run())
    {
    driver->beginScene(true, true, SColor(0,200,200,200));

    smgr->drawAll();
    guienv->drawAll();

    driver->endScene();
    }

    //End of All
    device->drop();
    return 0;
}

Posted: Sun Oct 09, 2005 11:52 pm
by luckymutt
The build error should give you more information.
Check the "Compile Log" tab at the bottom of the IDE and it should describe what it was trying to do when it hi tthe build error.

Posted: Mon Oct 10, 2005 1:50 am
by Guest
Compare it with the tutorials. The compiler will give a line number that is at fault. What is it?

Posted: Mon Oct 10, 2005 11:41 am
by Electron
Halan we realize its a build error, but lack of a newline generates a warning, not a build error, so the build error is something else

Posted: Mon Oct 10, 2005 11:44 am
by omaremad
give us the whole build log or a screen shot please

Did u remember to link irrlicht.a

Posted: Mon Oct 10, 2005 5:53 pm
by Halan
Ok i read the log and i think i misslinked the irrlicht.a file

And yes everthings works.

Thanks to this nice community :)