Page 2 of 2

Posted: Mon Aug 31, 2009 3:32 pm
by Adler1337
This is my code now:

Code: Select all

#include <irrlicht.h>
#include "stdafx.h"
#include <IrrPhysx.h>
#include <MastEventReceiver.h>

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

#pragma comment(lib, "Irrlicht.lib")
#pragma comment(lib, "PhysxLoader.lib")
#pragma comment(lib, "NxCharacter.lib")
#pragma comment(lib, "NxCooking.lib")
#pragma comment(lib, "IrrPhysx.lib")
When i compile i get this error:
Error 1 fatal error LNK1257: code generation failed

Any ideas?

Posted: Tue Sep 01, 2009 10:35 am
by JP
Sure there aren't any other errors given? Try googling the error to see what can cause it.

Posted: Tue Sep 01, 2009 12:51 pm
by Adler1337
No other errors. I think it's a problem with visual studio. I tried googling it, but i can't find an answer that fixes it.

Posted: Tue Sep 01, 2009 5:26 pm
by hybrid
What about adding a main() or setting the project to create a library?

Posted: Thu Sep 03, 2009 12:31 pm
by Adler1337
I have a main(), but i'm not sure what you mean by setting the project to create a library.

Posted: Thu Sep 03, 2009 12:55 pm
by Clash
Which IDE are you using?

Posted: Thu Sep 03, 2009 2:21 pm
by JP
Adler1337 wrote:I have a main(), but i'm not sure what you mean by setting the project to create a library.
They were two options, only one of which would work based on what you're trying to do. If you want to build an exe then you need a main if you want to build a library then you need the compiler to be configured for that

Posted: Thu Sep 03, 2009 3:13 pm
by Adler1337
@Clash: I am using visual studio.

@JP: ok thanks for explaining. I am making an exe.

Posted: Thu Sep 10, 2009 10:47 pm
by Adler1337
Sorry i haven't replied in a while. Good news i got it working. I'm not sure what i did, but it successfully compiled the other day and everything has been working fine ever since. Thanks for all the help and good work with irrphysx JP. :D