Using Irrlicht with Visual C++ 2010

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.
Post Reply
T-Bone
Posts: 5
Joined: Sat Nov 13, 2010 5:44 pm
Location: Germany , Dortmund

Using Irrlicht with Visual C++ 2010

Post by T-Bone »

Hey,

I want to use Irllicht with Visual C++ 2010 but I have problems.

I had a look at the first tutorial and that way isnt possible in 2010 or I´m too stupid to find the options menu.

I tried to set the path to irrlich in the project properties but that don´t work

I don´t find any information for this with google

Hope someone can help me
RuggJack93
Posts: 39
Joined: Mon Sep 06, 2010 5:09 pm
Location: Italy

Post by RuggJack93 »

Are you sure you have set up directories correctly?

After you've created your project, you have to right-click on your project, select properties and under configuration properties select VC++ Directories and set your include and lib paths. Then click apply and every should be fine.

If you've done all correctly, then could you post the compiler/application errors?
T-Bone
Posts: 5
Joined: Sat Nov 13, 2010 5:44 pm
Location: Germany , Dortmund

Post by T-Bone »

1>MSVCRTD.lib(crtexew.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_WinMain@16" in Funktion "___tmainCRTStartup".

That´s the error message.



Image

Where I have to put the path?

I tried it with every but I get always this error.



[/code]
RuggJack93
Posts: 39
Joined: Mon Sep 06, 2010 5:09 pm
Location: Italy

Post by RuggJack93 »

1>MSVCRTD.lib(crtexew.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_WinMain@16" in Funktion "___tmainCRTStartup".
This error comes out when you attempt to make for example an irrlicht application starting with a Win32 application. What you need to do is make a console application.
Image
Then for the directories, click on includeverzeichnisse ,select <Edit...>(or the german world for it), add an new folder and put in it your irrlicht include path.
Do the same for the libs.(Bibliotheksverzeichnisse-><Edit...>->newfolder->irrlicht lib folder(Win32-visualstudio)).
slavik262
Posts: 753
Joined: Sun Nov 22, 2009 9:25 pm
Location: Wisconsin, USA

Post by slavik262 »

Better yet, just create an empty project and fill it with your code.
T-Bone
Posts: 5
Joined: Sat Nov 13, 2010 5:44 pm
Location: Germany , Dortmund

Post by T-Bone »

Thanks :)

I tried it the way RuggJack93 wrote down.

When I start the application I get this error.
1>LINK : fatal error LNK1104: Datei "kernel32.lib" kann nicht geöffnet werden.


File "kernel32.lib" cant be open
:? Why is it so tricky.

What is the problem now?

[/code]
roxaz
Posts: 575
Joined: Tue Jan 23, 2007 8:35 pm
Location: LT

Post by roxaz »

looks like you removed inherited lib paths. do not do that :)
T-Bone
Posts: 5
Joined: Sat Nov 13, 2010 5:44 pm
Location: Germany , Dortmund

Post by T-Bone »

Ok I had a look and you are right ;)


But now there is the error
"1>MSVCRTD.lib(crtexe.obj) : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_main" in Funktion "___tmainCRTStartup". "
again.

I createt a new win 32 console appllication and set the pathes right.
Super SHN
RuggJack93
Posts: 39
Joined: Mon Sep 06, 2010 5:09 pm
Location: Italy

Post by RuggJack93 »

Have you defined the int main() function in your project?

Also googled a bit and i found this:
THE ERRORs if you SET subsystem to CONSOLE is:

MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function _mainCRTStartup

OR THE ERROR if you SET subsystem to WINDOWS is:

MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function _WinMainCRTStartup

The error means you do not have the main visible to the the linker. But you are editing the file with main or WinMain in the VS Editor, so what is wrong?

Visual Studio can be used as a stand alone editor giving you the illusion that the stuff you are editing can and should be compilable. So the solution is simple you failed to add the file you are editing to the project.

Right click on solution name->Add->Existing Item->file with main
T-Bone
Posts: 5
Joined: Sat Nov 13, 2010 5:44 pm
Location: Germany , Dortmund

Post by T-Bone »

It works now.

I created a new , empty project and not a win32 console project and it works.

Thanks to everybody who helped me :)
Super SHN
macron12388
Posts: 126
Joined: Wed Sep 29, 2010 8:23 pm

Post by macron12388 »

Happy that it worked! :) I am having a problem with my IDE too, and I just know it's going to be something stupidly simple... I just have to find out what it is, I think I have to make sure gcc-core files are all in order...
Post Reply