Compiling in VS2005 Express

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
noone

Compiling in VS2005 Express

Post by noone »

Hi!

The following error drives me crazy... What iam doing wrong?

Code: Select all


------ Build started: Project: Irrlicht, Configuration: Debug Win32 ------
Linking...
Irrlicht.obj : warning LNK4224: /COMMENT is no longer supported;  ignored
   Creating library .\..\Debug/Irrlicht.lib and object .\..\Debug/Irrlicht.exp
CIrrDeviceWin32.obj : error LNK2019: unresolved external symbol "class irr::video::IVideoDriver * __cdecl irr::video::createSoftwareDriver2(class irr::core::dimension2d<int> const &,bool,class irr::io::IFileSystem *,class irr::video::IImagePresenter *)" (?createSoftwareDriver2@video@irr@@YAPAVIVideoDriver@12@ABV?$dimension2d@H@core@2@_NPAVIFileSystem@io@2@PAVIImagePresenter@12@@Z) referenced in function "private: void __thiscall irr::CIrrDeviceWin32::createDriver(enum irr::video::E_DRIVER_TYPE,class irr::core::dimension2d<int> const &,unsigned int,bool,bool,bool,bool)" (?createDriver@CIrrDeviceWin32@irr@@AAEXW4E_DRIVER_TYPE@video@2@ABV?$dimension2d@H@core@2@I_N222@Z)
.\..\Debug/Irrlicht.dll : fatal error LNK1120: 1 unresolved externals
Build log was saved at "file://c:\Dokumente und Einstellungen\Thorben Linneweber\Desktop\irrlicht-0.14.0_\irrlicht-0.14.0\source\Debug\BuildLog.htm"
Irrlicht - 2 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


I hope thats enough information :roll:
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

Did you download MS Platform SDK? There are some header files required from it.

also check this thread:
http://irrlicht.sourceforge.net/phpBB2/ ... c&start=30

and here:
http://irrlicht.sourceforge.net/phpBB2/ ... c&start=45

Check Baal Cadar's quote:
Step 4. Update the corewin_express.vsprops file.

You just need to take one more step(..) You need to edit the corewin_express.vsprops file (found in C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults) and change the string that reads:

AdditionalDependencies="kernel32.lib"

to

AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"
I think this will fix your prob.
lostpencil
Posts: 17
Joined: Fri Dec 16, 2005 5:46 pm
Contact:

Post by lostpencil »

Hmm... I had the same error and adding libs didn't solve the problem. In the end I went into CSoftwareDriver.cpp and duplicated the code near the bottom:

Code: Select all

IVideoDriver* createSoftwareDriver(const core::dimension2d<s32>& windowSize, bool fullscreen, io::IFileSystem* io, video::IImagePresenter* presenter)
{
	return new CSoftwareDriver(windowSize, fullscreen, io, presenter);
}
and then renamed the function like so:

Code: Select all

IVideoDriver* createSoftwareDriver2(const core::dimension2d<s32>& windowSize, bool fullscreen, io::IFileSystem* io, video::IImagePresenter* presenter)
{
	return new CSoftwareDriver(windowSize, fullscreen, io, presenter);
}
It simply can't find the routine createSoftwareDriver2 when it tries to link. So I just gave it a dummy one based on the createSoftwareDriver function since I don't expect to use any of the software video drivers...
Cheers,
Paul Mikulecky
Lost Pencil Animation Studios Inc.
http://www.lostpencil.com

"The art of character animation is to try
to catch lightning in a bottle.... one volt
at a time." Brad Bird
noone

Post by noone »

BIG THX!

I opened the "Irrlicht7.1.vcproj" with VS Express 2005 and changed the following:

Code: Select all



Go to : C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults

open "corewin_express.vsprops" (XML-File)

replace

AdditionalDependencies="kernel32.lib"

with

AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib" 

afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

oh yes! you're right on that one too. Irrlicht's 0.14 VC8 project has got some errors so opening and converting the 7.1 project will compile with no problems.

Also, Duncan Mac Leod uploaded a working (corrected) MSVC8 project here:
http://www.tucan-entertainment.com/Irrlicht8.0.vcproj

here's the thread:
http://irrlicht.sourceforge.net/phpBB2/ ... 2005#59769

:wink:
Post Reply