Library.

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
irrlichter
Posts: 33
Joined: Sat Sep 09, 2006 12:12 pm

Library.

Post by irrlichter »

Well I tryed again to fix the problems, everything working fine now but still the library is in trouble.

When compiling the Hello World tutorial I get this

--------------------Configuration: 01_tut_hello_world - Win32 Debug--------------------
Linking...
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/01_tut_hello_world.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

01_tut_hello_world.exe - 2 error(s), 0 warning(s)

The next strange thing is sometimes I don't get an exe file.
Can anybody tell me what i'm doing wrong?
I had set up all 3 directorys from the libraries.
Like:
D:\IRRLICHT-1.1\LIB\WIN32-VISUALSTUDIO
D:\IRRLICHT-1.1\LIB\WIN32-GCC
D:\IRRLICHT-1.1\LIB
Why does that wont work?
Thanks a lot guys.
No one?
________
Ford c170 platform
Last edited by irrlichter on Mon Feb 14, 2011 10:44 pm, edited 1 time in total.
Ico
Posts: 289
Joined: Tue Aug 22, 2006 11:35 pm

Post by Ico »

You don't have to add all of Irrlicht's LIB directories (you shoudln't do it!).

Instead only add the sub directory that matches your compiler - I assume it's Visual Studio?

What does your main function look like? Is it a "main" or a "WinMain"?

You'll need one like this to compile your Project as a Win32 program:

Code: Select all

int __stdcall WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nCmdShow )
{
  ...
}

Another solution: Change your project's application type to "Console".
irrlichter
Posts: 33
Joined: Sat Sep 09, 2006 12:12 pm

Post by irrlichter »

Now i deleted the libraries exept of the irrlicht/lib.
He compiles it and i dont get an error but also no executable exe file.
I try to compile the hello world original example and this works fine.
If I try mine this doenst work.
Its yes its visual studio 6.0 and i start doing this with a win32 application.
adding there a main.cpp and writing there the code.

Code: Select all

using namespace irr;


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


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



int main()
{
	

	IrrlichtDevice *device =
		createDevice( video::EDT_SOFTWARE2, dimension2d<s32>(640, 480), 16,
			false, false, false, 0);


	IVideoDriver* driver = device->getVideoDriver();
	ISceneManager* smgr = device->getSceneManager();
	IGUIEnvironment* guienv = device->getGUIEnvironment();
So I really must say i suck completltey now there.
i'm sorry for borthering you, thanks for helping.
________
Extreme Vaporizer
Last edited by irrlichter on Mon Feb 14, 2011 10:44 pm, edited 1 time in total.
Ico
Posts: 289
Joined: Tue Aug 22, 2006 11:35 pm

Post by Ico »

Exchange your main() function with the one above. Win32 programs need a "WinMain", other programs are happy with a "main()". ;)
irrlichter
Posts: 33
Joined: Sat Sep 09, 2006 12:12 pm

Post by irrlichter »

hmmm it isnt aroudn the main.
Just tried another compiling it gaves me 0 errors and 0 warnings but he is telling me that he couldn't execute hello world.exe
If I compile the original hello world tutorial he gaves me the sydney mesh out like it should work normally.
I'm running against a wall now....:)
________
Iolite Vaporizer
Last edited by irrlichter on Mon Feb 14, 2011 10:44 pm, edited 1 time in total.
Ico
Posts: 289
Joined: Tue Aug 22, 2006 11:35 pm

Post by Ico »

Your compiled executable is able to find the irrlicht.dll (right version)?
irrlichter
Posts: 33
Joined: Sat Sep 09, 2006 12:12 pm

Post by irrlichter »

Ico wrote:Your compiled executable is able to find the irrlicht.dll (right version)?
it was finally only the .dlls fault, i need it always when starting something with the irrlicht engine and the tutorials dont ask me why.
hey thanks lot guys.:)
________
F151
Last edited by irrlichter on Mon Feb 14, 2011 10:46 pm, edited 1 time in total.
randomMesh
Posts: 1186
Joined: Fri Dec 29, 2006 12:04 am

Post by randomMesh »

irrlichter wrote:
Ico wrote:Your compiled executable is able to find the irrlicht.dll (right version)?
it was finally only the .dlls fault, i need it always when starting something with the irrlicht engine and the tutorials dont ask me why.
hey thanks lot guys.:)
I am curious.

Did you really need 1.5+ years to figure out or are you just spamming the forums? :shock:
Post Reply