Linking problems with 0.10.0

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
anime4christ
Posts: 8
Joined: Thu Mar 31, 2005 5:08 am

Linking problems with 0.10.0

Post by anime4christ »

I'm not sure if this is the right place to post this or not, but I can't seem to link my project with Irrlicht 0.10.0, it worked fine with 0.9. I changed the refrences and everything, but I still get errors.

Here's what I get even if I try to compile one of the 0.10.0 examples:

------ Build started: Project: Quake3Map, Configuration: Debug Win32 ------
Linking...
main.obj : error LNK2019: unresolved external symbol __imp_?createDevice@irr@@YAPAVIrrlichtDevice@1@W4E_DRIVER_TYPE@video@1@ABV?$dimension2d@H@core@1@I_N22PAVIEventReceiver@1@PB_W@Z referenced in function _main
.\Debug/Quake3Map.exe : fatal error LNK1120: 1 unresolved externals
Build log was saved at "file://c:\Documents and Settings\No1\Desktop\irrlicht-0.10.0\irrlicht-0.10.0\examples\Copy of 02.Quake3Map\Debug\BuildLog.htm"
Quake3Map - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Why do hardware manufacturers like to give sofware developers a headache?

Antivirus developers are alive only because viruses exist.
AlexL
Posts: 184
Joined: Tue Mar 02, 2004 6:06 pm
Location: Washington State

Post by AlexL »

This problem may be because your library paths are not set to the new directory released with Irrlicht v0.10.0. So all you need to do, if this is the case, is change your paths to "~/lib/Win32-VisualStudio" :)
anime4christ
Posts: 8
Joined: Thu Mar 31, 2005 5:08 am

Post by anime4christ »

That's the thing I don't get, I did that and I still get the error.
Why do hardware manufacturers like to give sofware developers a headache?

Antivirus developers are alive only because viruses exist.
anime4christ
Posts: 8
Joined: Thu Mar 31, 2005 5:08 am

Post by anime4christ »

I just don't get it, I tried a fresh new project but still got the error. Here's my VCComponents.dat file:

Code: Select all

[VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directories]
Include Dirs=C:\Documents and Settings\No1\Desktop\irrlicht-0.10.0\irrlicht-0.10.0\include;C:\Program Files\Microsoft Platform SDK for Windows XP SP2\Include;$(VCInstallDir)include;$(VCInstallDir)PlatformSDK\include\prerelease;$(VCInstallDir)PlatformSDK\include;$(FrameworkSDKDir)include
Reference Dirs=$(FrameWorkDir)$(FrameWorkVersion)
Library Dirs=C:\Documents and Settings\No1\Desktop\irrlicht-0.10.0\irrlicht-0.10.0\lib\Win32-VisualStudio;C:\Program Files\Microsoft Platform SDK for Windows XP SP2\Lib;$(VCInstallDir)lib;$(VCInstallDir)PlatformSDK\lib\prerelease;$(VCInstallDir)PlatformSDK\lib;$(FrameworkSDKDir)lib;$(VSInstallDir);$(VSInstallDir)lib
Source Dirs=$(VCInstallDir)crt\src
Exclude Dirs=$(VCInstallDir)include;$(VCInstallDir)PlatformSDK\include\prerelease;$(VCInstallDir)PlatformSDK\include;$(FrameworkSDKDir)include;$(FrameWorkDir)$(FrameWorkVersion)
Path Dirs=C:\Program Files\Microsoft Platform SDK for Windows XP SP2\Bin;$(VCInstallDir)bin;$(VCInstallDir)PlatformSDK\bin;$(VSInstallDir)Common7\Tools\bin\prerelease;$(VSInstallDir)Common7\Tools\bin;$(VSInstallDir)Common7\tools;$(VSInstallDir)Common7\ide;$(ProgramFiles)\HTML Help Workshop;$(FrameworkSDKDir)bin;$(FrameworkDir)$(FrameworkVersion);$(VSInstallDir);$(PATH)
And I still get:

Code: Select all

------ Build started: Project: try, Configuration: Debug Win32 ------
Compiling...
main.cpp
Linking...
main.obj : error LNK2019: unresolved external symbol __imp_?createDevice@irr@@YAPAVIrrlichtDevice@1@W4E_DRIVER_TYPE@video@1@ABV?$dimension2d@H@core@1@I_N22PAVIEventReceiver@1@PB_W@Z referenced in function _main
Debug\try.exe : fatal error LNK1120: 1 unresolved externals
Build log was saved at "file://c:\Documents and Settings\No1\My Documents\Visual Studio\Projects\try\try\Debug\BuildLog.htm"
try - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Why can't I link 0.10.0?! T_T
Why do hardware manufacturers like to give sofware developers a headache?

Antivirus developers are alive only because viruses exist.
Trouble

Linking problem with Irrlicht 0.10.0

Post by Trouble »

I am having the same problem.

What happens is

Compiling with VC8 (Command line or Visual Studio IDE) the linker generates

CamraScript1.obj : error LNK2019: unresolved external symbol
__imp_?createDevice@irr@@YAPAVIrrlichtDevice@1@W4E_DRIVER_TYPE@video@1@ABV?$dimension2d@H@core@1@I_N22PAVIEventReceiver@1@PB_W@Z referenced in function _main
CamraScript1.exe : fatal error LNK1120: 1 unresolved externals


Compiling with MinGW the linker generates

CamraScript1.o(.text+0x87):CamraScript1.cpp: undefined reference to
`_imp___ZN3irr12createDeviceENS_5video13E_DRIVER_TYPEERKNS_4core11dimension2dIiEEjbbbPNS_14IEventReceiverEPKw@32'
collect2: ld returned 1 exit status
Brinsky
Posts: 28
Joined: Sun May 08, 2005 3:05 pm
Location: Slovenia

Post by Brinsky »

I get the same sh*t. Anybody comes up with a solution, please post it. I'm sick of getting rid of this bug. It's like the static lib doesn't interact with the dll corectly. All linkers are set properly and still... if anybody compiled the new source code using VS8.0, please post .lib, .exp and .dll files as we couldn't compile source due to the similar (the same?) sort of error.
10 I lovez my computer
20 goto 10
Brinsky
Posts: 28
Joined: Sun May 08, 2005 3:05 pm
Location: Slovenia

SOLVED

Post by Brinsky »

I managed to recompile the engine, it's for Dx9 ONLY though...
anime4christ, Trouble, I hope it helps:

http://www2.arnes.si/~mhojni7/irrlicht/ ... mpiled.rar
10 I lovez my computer
20 goto 10
anime4christ
Posts: 8
Joined: Thu Mar 31, 2005 5:08 am

Post by anime4christ »

Thanks, it should work for a temporary soulution while I'm developing. :)
I hope we can make a permanent solution soon.

Edit: ok, it links but it doesn't run. :cry:
Why do hardware manufacturers like to give sofware developers a headache?

Antivirus developers are alive only because viruses exist.
Brinsky
Posts: 28
Joined: Sun May 08, 2005 3:05 pm
Location: Slovenia

Post by Brinsky »

ok, so here's the whole deal (except it's lacking the Dx8 support).
I have included both versions... debug and release.


http://www2.arnes.si/~mhojni7/irrlicht/ ... .NoDx8.rar

Note: when you compile your irr program, the directory structure looks something like this:

ProgRoot:
__[Debug]
__[Release]
__myProg.sln
__myProg.ncb
__myProg.suo
__[MyProg]
_____-> here are all your working files (.cpp ...)
_____[Debug]
_____[Release]

In irr 0.9 you had to copy the .dll file into the [MyProg] directory to link it properly. After you compile your program, you'll get an error msgbox. That's OK, because now the Root/Debug directory is created. Just copy the .dll into it and recompile. Have fun :wink:
10 I lovez my computer
20 goto 10
anime4christ
Posts: 8
Joined: Thu Mar 31, 2005 5:08 am

Post by anime4christ »

Ok, I got it working now, but only after I installed the DX9 SDK.
Users obviously won't have the SDK installed so this will only work for a tempoarary solution.
At least I can develop for now, though.
Thanks ^_^

We do need a permanent solution worked out though or I might have to release the game with 0.9
Why do hardware manufacturers like to give sofware developers a headache?

Antivirus developers are alive only because viruses exist.
phrounz
Posts: 45
Joined: Thu Feb 10, 2005 11:45 am
Location: France
Contact:

Post by phrounz »

I have the same link problems, on DevC++.

Code: Select all

  [Linker error] undefined reference to `_imp__createDevice' 
  [Linker error] undefined reference to `_imp__createDevice' 
 I:\prog\devcpp\funblobr\Makefile.win [Build Error]  [Projet1.exe] Error 1 
And when I tried to compile the sources (with or without DirectX) :

Code: Select all

 H:\irrlicht-0.10.0\source\source\Irrlicht\CGUIContextMenu.cpp In member function `virtual s32  irr::gui::CGUIContextMenu::addItem(const wchar_t*, int, bool, bool)' cannot allocate an object of type ` irr::gui::CGUIContextMenu'  because the following virtual functions are  abstract: 
41 F:\progs\Dev-Cpp\include\IGUIContextMenu.h 	virtual s32  irr::gui::IGUIContextMenu::addItem(wchar_t*, int, bool, bool) 

 H:\irrlicht-0.10.0\source\source\Irrlicht\Makefile.win [Build Error]  [CGUIContextMenu.o] Error 1 
I had no problem with the previous irrlicht releases.

Another problem : there seems to be a width problem with the irrlicht forum, using Firefox as web browser.
phrounz
Posts: 45
Joined: Thu Feb 10, 2005 11:45 am
Location: France
Contact:

Post by phrounz »

Sorry, the compilation problem was my fault. And it works perfectly after the compilation.
Brinsky
Posts: 28
Joined: Sun May 08, 2005 3:05 pm
Location: Slovenia

Post by Brinsky »

Users obviously won't have the SDK installed so this will only work for a tempoarary solution

When you release your solution, you don't need the SDK. The needed DX source is already compiled into your solution. The user only needs the Dx runtimes, that's redistributables.
10 I lovez my computer
20 goto 10
anime4christ
Posts: 8
Joined: Thu Mar 31, 2005 5:08 am

Post by anime4christ »

Yeah, but the official irrlicht runs by itsself, I would like my autorun on the cd to be 3D, before anything is installed, so we'd have to wait for the next official release or something, I guess.

BTW, why can't I link the irrlicht engine itself in MSVS 8 B2?
How do you go about compiling the source?
Why do hardware manufacturers like to give sofware developers a headache?

Antivirus developers are alive only because viruses exist.
Brinsky
Posts: 28
Joined: Sun May 08, 2005 3:05 pm
Location: Slovenia

Post by Brinsky »

Yeah, but the official irrlicht runs by itsself, I would like my autorun on the cd to be 3D, before anything is installed, so we'd have to wait for the next official release or something, I guess.
Well... If your solution creates a device using the edt_directx9 device creation flag, it means the host MUST have preinstaled DX9 runtime else it will not run. If the device is created using the OGL then it must work as long as the host system is using the correct graphic drivers. Since I guess you're using the dx9 for IrrlichtDevice and your env is VS8.0, i suggest you download a redistrubatble version of Dx9.0c and include it as a prerequirement into the installation setup for your program (using the InstallShield or a similar app). It's true though your 3D autorun won't work on a Win95-2000 without the Dx9.0c preinstalled if first case, since dx9.0c runtime libs are a basic part of WinXP Sp2.
How do you go about compiling the source?
Open the source solution, search for "IrrCompileConfig.h", eliminate the line with the "Dx8 compile" declaration (since I guess you don't have the Dx8 SDK), and rebuild the solution. I hope that helps. Btw. your links to Dx9SDK include and library directories are set right i suppose?
Regards
10 I lovez my computer
20 goto 10
Post Reply