1.5 Win32/gcc build error
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
I did, and now I have Code::Blocks as well.
Right, SVN 1909 on the 1.5 branch restores the 1902 functionality: IdentityMatrix is declared but not defined with IRRLICHT_API.
I have tested this with both MSVC and mingw via Code::Blocks. I've added a test case for it, and a Code::Blocks test project (/tests/tests.cbp) which all works as expected.
The Code::Blocks project(s) also seem screwed up. Irrlicht_Win32-gcc.cbp didn't define __GNUWIN32__, so Irrlicht.cpp failed to compile due to trying to #include <crtdbg.h>
I've added that definition, which also updated Irrlicht_Win32-gcc.cbp to the C::B 8.02 version. ( <FileVersion major="1" minor="6" /> ). Apologies if this screws anyone over, but I don't fancy maintaining an older format by hand when I'm not familiar with it. We can always revert it if it causes problems.
The C::B example projects (or at least the Hello World one) look for libIrrlicht.a in ../../lib/Win32-gcc, which is peculiar as Irrlicht cbp builds that library in ../../bin/Win32-gcc. I won't update those yet until you C::Bers have a chance to shout out.
Right, SVN 1909 on the 1.5 branch restores the 1902 functionality: IdentityMatrix is declared but not defined with IRRLICHT_API.
I have tested this with both MSVC and mingw via Code::Blocks. I've added a test case for it, and a Code::Blocks test project (/tests/tests.cbp) which all works as expected.
The Code::Blocks project(s) also seem screwed up. Irrlicht_Win32-gcc.cbp didn't define __GNUWIN32__, so Irrlicht.cpp failed to compile due to trying to #include <crtdbg.h>
I've added that definition, which also updated Irrlicht_Win32-gcc.cbp to the C::B 8.02 version. ( <FileVersion major="1" minor="6" /> ). Apologies if this screws anyone over, but I don't fancy maintaining an older format by hand when I'm not familiar with it. We can always revert it if it causes problems.
The C::B example projects (or at least the Hello World one) look for libIrrlicht.a in ../../lib/Win32-gcc, which is peculiar as Irrlicht cbp builds that library in ../../bin/Win32-gcc. I won't update those yet until you C::Bers have a chance to shout out.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
-
- Posts: 43
- Joined: Mon Dec 01, 2008 6:35 pm
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
Sorry about the inconvenience, but until we get 1.5 released, you should consider it to be the de facto development trunk. All of the fixes are going on to 1.5 first, and are only moved to the trunk in batches.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
-
- Posts: 43
- Joined: Mon Dec 01, 2008 6:35 pm
I'm trying to get my SConstruct file working, but I'm having a couple of problems with it :\
I've added the flag for __GNUWIN32__ which, as you said, fixed the crtdbg problem, but I'm still getting the
error.
Adding the _IRR_STATIC_LIB_ flag gives me these errors:
I'm using the mingw compiler on Windows.
Any ideas?
-wyrmmage
I've added the flag for __GNUWIN32__ which, as you said, fixed the crtdbg problem, but I'm still getting the
Code: Select all
Irrlicht.cpp:44: error: external linkage required for symbol 'irr::core::Identit
yMatrix' because of 'dllexport' attribute.
Adding the _IRR_STATIC_LIB_ flag gives me these errors:
Code: Select all
Creating library file: libIrrlicht.a
CIrrDeviceWin32.o: In function `ZN3irr15CIrrDeviceWin3217activateJoysticksERNS_4
core5arrayINS_13SJoystickInfoENS1_12irrAllocatorIS3_EEEE':
D:/irrlicht svn/irrlicht/tags/release-1.5.beta/source/Irrlicht/CIrrDeviceWin32.c
pp:972: undefined reference to `joyGetNumDevs@0'
D:/irrlicht svn/irrlicht/tags/release-1.5.beta/source/Irrlicht/CIrrDeviceWin32.c
pp:986: undefined reference to `joyGetPosEx@8'
D:/irrlicht svn/irrlicht/tags/release-1.5.beta/source/Irrlicht/CIrrDeviceWin32.c
pp:986: undefined reference to `joyGetDevCapsA@12'
CIrrDeviceWin32.o: In function `ZN3irr15CIrrDeviceWin3213pollJoysticksEv':
D:/irrlicht svn/irrlicht/tags/release-1.5.beta/source/Irrlicht/CIrrDeviceWin32.c
pp:1034: undefined reference to `joyGetPosEx@8'
collect2: ld returned 1 exit status
scons: *** [Irrlicht.dll] Error 1
Any ideas?
-wyrmmage
Worlds at War (Current Project) - http://www.awkward-games.com
Ganadu'r, The Eternal Sage (Other Current Project) - http://rpg.naget.com
Ganadu'r, The Eternal Sage (Other Current Project) - http://rpg.naget.com
Well, I figured out what was wrong
The patch is below, and it's also in the tracker:
-wyrmmage
The patch is below, and it's also in the tracker:
Code: Select all
Index: SConstruct
===================================================================
--- SConstruct (revision 1913)
+++ SConstruct (working copy)
@@ -6,7 +6,7 @@
PROFILE = 1;
APPLICATION_NAME = 'Irrlicht';
-LIBRARIES = ['gdi32', 'opengl32', 'd3dx9d'];
+LIBRARIES = ['gdi32', 'opengl32', 'd3dx9d', 'winmm'];
if USE_GCC==1 and PROFILE==1:
LIBRARIES += ['gmon'];
@@ -81,7 +81,10 @@
if PROFILE:
CXXFLAGS += ['-pg'];
-CXXFLAGS += ['-DPNG_NO_MMX_CODE', '-DPNG_NO_MNG_FEATURES', '-DIRRLICHT_EXPORTS=1'];
+CXXFLAGS += ['-DPNG_NO_MMX_CODE', '-DPNG_NO_MNG_FEATURES', '-DIRRLICHT_EXPORTS=1', '-D_IRR_STATIC_LIB_'];
+if USE_GCC:
+ CXXFLAGS += ['-D__GNUWIN32__=1'];
+
env.Append(CCFLAGS = CXXFLAGS);
IrrlichtLibrary = env.SharedLibrary("Irrlicht.dll", LINKOBJ);
Worlds at War (Current Project) - http://www.awkward-games.com
Ganadu'r, The Eternal Sage (Other Current Project) - http://rpg.naget.com
Ganadu'r, The Eternal Sage (Other Current Project) - http://rpg.naget.com
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
Great, thanks. We already have winmm on the 1.5 branch, but I've added the __GNUWIN32__ flag in SVN 1921.
Can I suggest that you use the 1.5 branch for now, since all the fixes are going there.
Can I suggest that you use the 1.5 branch for now, since all the fixes are going there.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Thanks for the quick commit! I'll have to remember to use the 1.5 branch
Worlds at War (Current Project) - http://www.awkward-games.com
Ganadu'r, The Eternal Sage (Other Current Project) - http://rpg.naget.com
Ganadu'r, The Eternal Sage (Other Current Project) - http://rpg.naget.com
I'm trying to compile the Irrlicht 1.5 sdk (from the zip file and from svn) using mingw32 under windows xp.
I go to the source folder, and run
However I get the following error:
apparently it can't find crtdbg.h, which really is not in the source directory. How do I fix this?
I go to the source folder, and run
Code: Select all
mingw32-make sharedlib
Code: Select all
Irrlicht.cpp:12:22: crtdbg.h: No such file or directory
Irrlicht.cpp: In function `BOOL DllMain(void*, DWORD, void*)':
Irrlicht.cpp:61: error: `_CRTDBG_LEAK_CHECK_DF' was not declared in this scope
Irrlicht.cpp:61: error: `_CRTDBG_ALLOC_MEM_DF' was not declared in this scope
Irrlicht.cpp:61: error: `_CrtSetDbgFlag' was not declared in this scope
Irrlicht.cpp:61: warning: unused variable '_CRTDBG_LEAK_CHECK_DF'
Irrlicht.cpp:61: warning: unused variable '_CRTDBG_ALLOC_MEM_DF'
Irrlicht.cpp:61: warning: unused variable '_CrtSetDbgFlag'
I've found it. I hade to explicitly tell it to make windows version, otherwise gnuwin would not be set.
Then it gave another problem: the makefile uses cc as compiler, but the mingw compiler is called gcc. renaming the compiler, compiling and renaming back works as a one-time solution, but there should probably be a better one.
thanks for the help.
Code: Select all
mingw32-make win32
thanks for the help.