Page 1 of 1

Using Irrlicht with Visual C++ 2010

Posted: Sat Nov 13, 2010 5:52 pm
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

Posted: Sat Nov 13, 2010 7:47 pm
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?

Posted: Sat Nov 13, 2010 8:17 pm
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]

Posted: Sat Nov 13, 2010 9:59 pm
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)).

Posted: Sun Nov 14, 2010 3:33 am
by slavik262
Better yet, just create an empty project and fill it with your code.

Posted: Sun Nov 14, 2010 10:56 am
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]

Posted: Sun Nov 14, 2010 11:25 am
by roxaz
looks like you removed inherited lib paths. do not do that :)

Posted: Sun Nov 14, 2010 12:32 pm
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.

Posted: Sun Nov 14, 2010 4:40 pm
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

Posted: Sun Nov 14, 2010 6:00 pm
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 :)

Posted: Sun Nov 14, 2010 6:16 pm
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...