Irrphysx link error

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Adler1337
Posts: 471
Joined: Sat Aug 09, 2008 6:10 pm
Location: In your base.

Post 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?
multum in parvo
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Sure there aren't any other errors given? Try googling the error to see what can cause it.
Image Image Image
Adler1337
Posts: 471
Joined: Sat Aug 09, 2008 6:10 pm
Location: In your base.

Post 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.
multum in parvo
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

What about adding a main() or setting the project to create a library?
Adler1337
Posts: 471
Joined: Sat Aug 09, 2008 6:10 pm
Location: In your base.

Post by Adler1337 »

I have a main(), but i'm not sure what you mean by setting the project to create a library.
multum in parvo
Clash
Posts: 80
Joined: Thu Apr 19, 2007 4:20 pm

Post by Clash »

Which IDE are you using?
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post 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
Image Image Image
Adler1337
Posts: 471
Joined: Sat Aug 09, 2008 6:10 pm
Location: In your base.

Post by Adler1337 »

@Clash: I am using visual studio.

@JP: ok thanks for explaining. I am making an exe.
multum in parvo
Adler1337
Posts: 471
Joined: Sat Aug 09, 2008 6:10 pm
Location: In your base.

Post 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
multum in parvo
Post Reply