473,322 Members | 1,718 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Wierd linking errors that I donnn't quite get yet.

I'm trying to compile an open source game called IVAN
[ivan.sourceforge.net], and I'm able to compile it from a makefile, but
not from an IDE. I have attempted to recreate the way the makefile
compiles the project as closely as possible, yet I'm getting odd
linking errors. I think I've traced it to some kind of problem with
the SDL libraries it uses, yet I can't explain why it will compile from
the makefile and not from the IDE. I have made sure that the ide knows
all of the include paths, and is linking to all of the libraries in the
makefile (and then some). Here is the makefile:
=======================================
# Iter Vehemens ad Necem makefile for MinGW environment

# Copyrights (C) Timo Kiviluoto / IvanDev 2002-2004

CC = g++ -o
FeLibDIR = FeLib
FeLibGCH =
#FeLibGCH = $(FeLibDIR)/Include/allocate.h.gch
$(FeLibDIR)/Include/bitmap.h.gch $(FeLibDIR)/Include/config.h.gch
$(FeLibDIR)/Include/error.h.gch $(FeLibDIR)/Include/fearray.h.gch
$(FeLibDIR)/Include/feio.h.gch $(FeLibDIR)/Include/felibdef.h.gch
$(FeLibDIR)/Include/felist.h.gch $(FeLibDIR)/Include/feloops.h.gch
$(FeLibDIR)/Include/femath.h.gch $(FeLibDIR)/Include/festring.h.gch
$(FeLibDIR)/Include/fetime.h.gch $(FeLibDIR)/Include/graphics.h.gch
$(FeLibDIR)/Include/hscore.h.gch $(FeLibDIR)/Include/rawbit.h.gch
$(FeLibDIR)/Include/rect.h.gch $(FeLibDIR)/Include/save.h.gch
$(FeLibDIR)/Include/v2.h.gch $(FeLibDIR)/Include/whandler.h.gch
FeLibOBJ = $(FeLibDIR)/Source/bitmap.o $(FeLibDIR)/Source/config.o
$(FeLibDIR)/Source/error.o $(FeLibDIR)/Source/feio.o
$(FeLibDIR)/Source/felist.o $(FeLibDIR)/Source/femain.o
$(FeLibDIR)/Source/femath.o $(FeLibDIR)/Source/festring.o
$(FeLibDIR)/Source/fetime.o $(FeLibDIR)/Source/graphics.o
$(FeLibDIR)/Source/hscore.o $(FeLibDIR)/Source/rawbit.o
$(FeLibDIR)/Source/save.o $(FeLibDIR)/Source/whandler.o
IVANDIR = Main
IVANBIN = IVAN.exe
IVANGCH =
#IVANGCH = $(IVANDIR)/Include/action.h.gch
$(IVANDIR)/Include/actions.h.gch $(IVANDIR)/Include/area.h.gch
$(IVANDIR)/Include/bodypart.h.gch $(IVANDIR)/Include/char.h.gch
$(IVANDIR)/Include/command.h.gch $(IVANDIR)/Include/cont.h.gch
$(IVANDIR)/Include/database.h.gch $(IVANDIR)/Include/dungeon.h.gch
$(IVANDIR)/Include/entity.h.gch $(IVANDIR)/Include/fluid.h.gch
$(IVANDIR)/Include/game.h.gch $(IVANDIR)/Include/gear.h.gch
$(IVANDIR)/Include/god.h.gch $(IVANDIR)/Include/gods.h.gch
$(IVANDIR)/Include/human.h.gch $(IVANDIR)/Include/iconf.h.gch
$(IVANDIR)/Include/id.h.gch $(IVANDIR)/Include/igraph.h.gch
$(IVANDIR)/Include/iloops.h.gch $(IVANDIR)/Include/item.h.gch
$(IVANDIR)/Include/level.h.gch $(IVANDIR)/Include/lsquare.h.gch
$(IVANDIR)/Include/lterra.h.gch $(IVANDIR)/Include/lterras.h.gch
$(IVANDIR)/Include/materia.h.gch $(IVANDIR)/Include/materias.h.gch
$(IVANDIR)/Include/message.h.gch $(IVANDIR)/Include/miscitem.h.gch
$(IVANDIR)/Include/nonhuman.h.gch $(IVANDIR)/Include/object.h.gch
$(IVANDIR)/Include/pool.h.gch $(IVANDIR)/Include/proto.h.gch
$(IVANDIR)/Include/rain.h.gch $(IVANDIR)/Include/room.h.gch
$(IVANDIR)/Include/rooms.h.gch $(IVANDIR)/Include/script.h.gch
$(IVANDIR)/Include/smoke.h.gch $(IVANDIR)/Include/square.h.gch
$(IVANDIR)/Include/stack.h.gch $(IVANDIR)/Include/team.h.gch
$(IVANDIR)/Include/terra.h.gch $(IVANDIR)/Include/trap.h.gch
$(IVANDIR)/Include/traps.h.gch $(IVANDIR)/Include/worldmap.h.gch
$(IVANDIR)/Include/wskill.h.gch $(IVANDIR)/Include/wterra.h.gch
$(IVANDIR)/Include/wterras.h.gch
IVANOBJ = $(IVANDIR)/Source/actset.o $(IVANDIR)/Source/areaset.o
$(IVANDIR)/Source/charset.o $(IVANDIR)/Source/charsset.o
$(IVANDIR)/Source/command.o $(IVANDIR)/Source/coreset.o
$(IVANDIR)/Source/dataset.o $(IVANDIR)/Source/dungeon.o
$(IVANDIR)/Source/game.o $(IVANDIR)/Source/godset.o
$(IVANDIR)/Source/iconf.o $(IVANDIR)/Source/id.o
$(IVANDIR)/Source/igraph.o $(IVANDIR)/Source/itemset.o
$(IVANDIR)/Source/levelset.o $(IVANDIR)/Source/main.o
$(IVANDIR)/Source/materset.o $(IVANDIR)/Source/message.o
$(IVANDIR)/Source/object.o $(IVANDIR)/Source/roomset.o
$(IVANDIR)/Source/script.o $(IVANDIR)/Source/slotset.o
$(IVANDIR)/Source/trapset.o $(IVANDIR)/Source/wmapset.o
$(IVANDIR)/Source/wskill.o
#FLAGS = -DGCC -DUSE_SDL -DWIZARD -IInclude -I$(FeLibDIR)/Include -pg
-ffast-math -W -Wall -pedantic -march=athlon-xp -mrtd
-maccumulate-outgoing-args -mwindows
#FLAGS = -DGCC -DUSE_SDL -DWIZARD -IInclude -I$(FeLibDIR)/Include -pg
-O3 -ffast-math -march=athlon-xp -mwindows
FLAGS = -DGCC -DUSE_SDL -DWIZARD -D_WIN32 -IInclude
-I$(FeLibDIR)/Include -O3 -ffast-math -s -W -Wall -pedantic -mwindows
LIBS = -lmingw32 -lSDLmain -lSDL

all: $(IVANBIN)

$(FeLibGCH) : %.h.gch : %.h
@echo Compiling $@...
@$(CC) $@ -c $< $(FLAGS)

$(FeLibOBJ) : %.o : %.cpp
@echo Compiling $@...
@$(CC) $@ -c $< $(FLAGS)

$(IVANGCH) : %.h.gch : %.h
@echo Compiling $@...
@$(CC) $@ -c $< $(FLAGS) -I$(IVANDIR)/Include

$(IVANOBJ) : %.o : %.cpp
@echo Compiling $@...
@$(CC) $@ -c $< $(FLAGS) -I$(IVANDIR)/Include

$(IVANBIN) : $(FeLibGCH) $(FeLibOBJ) $(IVANGCH) $(IVANOBJ)
@echo Compiling $(IVANBIN)...
@$(CC) $(IVANBIN) $(FeLibOBJ) $(IVANOBJ) $(FLAGS) $(LIBS)
=======================================
And here is my build log (note, the IDE divides the FeLib and main
program into separate projects):
=======================================
-------------- Build: Win32 Release in FeLib ---------------
Target is up to date.

-------------- Build: Win32 Release in Main ---------------
mingw32-g++.exe -O3 -finline-functions -IInclude -IFeLib/Include
-ffast-math -s -mwindows -DGCC -DUSE_SDL -DWIZARD -D_WIN32
-IMain\Include -IMain\Include -IFeLib\Include -IC:\MinGW\include -c
..\Main\Source\charset.cpp -o Main\Release\Main\Source\charset.o
mingw32-g++.exe -O3 -finline-functions -IInclude -IFeLib/Include
-ffast-math -s -mwindows -DGCC -DUSE_SDL -DWIZARD -D_WIN32
-IMain\Include -IMain\Include -IFeLib\Include -IC:\MinGW\include -c
..\Main\Source\charsset.cpp -o Main\Release\Main\Source\charsset.o
mingw32-g++.exe -O3 -finline-functions -IInclude -IFeLib/Include
-ffast-math -s -mwindows -DGCC -DUSE_SDL -DWIZARD -D_WIN32
-IMain\Include -IMain\Include -IFeLib\Include -IC:\MinGW\include -c
..\Main\Source\command.cpp -o Main\Release\Main\Source\command.o
mingw32-g++.exe -O3 -finline-functions -IInclude -IFeLib/Include
-ffast-math -s -mwindows -DGCC -DUSE_SDL -DWIZARD -D_WIN32
-IMain\Include -IMain\Include -IFeLib\Include -IC:\MinGW\include -c
..\Main\Source\coreset.cpp -o Main\Release\Main\Source\coreset.o
mingw32-g++.exe -O3 -finline-functions -IInclude -IFeLib/Include
-ffast-math -s -mwindows -DGCC -DUSE_SDL -DWIZARD -D_WIN32
-IMain\Include -IMain\Include -IFeLib\Include -IC:\MinGW\include -c
..\Main\Source\dataset.cpp -o Main\Release\Main\Source\dataset.o
mingw32-g++.exe -O3 -finline-functions -IInclude -IFeLib/Include
-ffast-math -s -mwindows -DGCC -DUSE_SDL -DWIZARD -D_WIN32
-IMain\Include -IMain\Include -IFeLib\Include -IC:\MinGW\include -c
..\Main\Source\dungeon.cpp -o Main\Release\Main\Source\dungeon.o
mingw32-g++.exe -O3 -finline-functions -IInclude -IFeLib/Include
-ffast-math -s -mwindows -DGCC -DUSE_SDL -DWIZARD -D_WIN32
-IMain\Include -IMain\Include -IFeLib\Include -IC:\MinGW\include -c
..\Main\Source\game.cpp -o Main\Release\Main\Source\game.o
mingw32-g++.exe -O3 -finline-functions -IInclude -IFeLib/Include
-ffast-math -s -mwindows -DGCC -DUSE_SDL -DWIZARD -D_WIN32
-IMain\Include -IMain\Include -IFeLib\Include -IC:\MinGW\include -c
..\Main\Source\godset.cpp -o Main\Release\Main\Source\godset.o
mingw32-g++.exe -O3 -finline-functions -IInclude -IFeLib/Include
-ffast-math -s -mwindows -DGCC -DUSE_SDL -DWIZARD -D_WIN32
-IMain\Include -IMain\Include -IFeLib\Include -IC:\MinGW\include -c
..\Main\Source\iconf.cpp -o Main\Release\Main\Source\iconf.o
mingw32-g++.exe -O3 -finline-functions -IInclude -IFeLib/Include
-ffast-math -s -mwindows -DGCC -DUSE_SDL -DWIZARD -D_WIN32
-IMain\Include -IMain\Include -IFeLib\Include -IC:\MinGW\include -c
..\Main\Source\id.cpp -o Main\Release\Main\Source\id.o
mingw32-g++.exe -O3 -finline-functions -IInclude -IFeLib/Include
-ffast-math -s -mwindows -DGCC -DUSE_SDL -DWIZARD -D_WIN32
-IMain\Include -IMain\Include -IFeLib\Include -IC:\MinGW\include -c
..\Main\Source\igraph.cpp -o Main\Release\Main\Source\igraph.o
mingw32-g++.exe -O3 -finline-functions -IInclude -IFeLib/Include
-ffast-math -s -mwindows -DGCC -DUSE_SDL -DWIZARD -D_WIN32
-IMain\Include -IMain\Include -IFeLib\Include -IC:\MinGW\include -c
..\Main\Source\itemset.cpp -o Main\Release\Main\Source\itemset.o
mingw32-g++.exe -O3 -finline-functions -IInclude -IFeLib/Include
-ffast-math -s -mwindows -DGCC -DUSE_SDL -DWIZARD -D_WIN32
-IMain\Include -IMain\Include -IFeLib\Include -IC:\MinGW\include -c
..\Main\Source\levelset.cpp -o Main\Release\Main\Source\levelset.o
mingw32-g++.exe -O3 -finline-functions -IInclude -IFeLib/Include
-ffast-math -s -mwindows -DGCC -DUSE_SDL -DWIZARD -D_WIN32
-IMain\Include -IMain\Include -IFeLib\Include -IC:\MinGW\include -c
..\Main\Source\main.cpp -o Main\Release\Main\Source\main.o
mingw32-g++.exe -O3 -finline-functions -IInclude -IFeLib/Include
-ffast-math -s -mwindows -DGCC -DUSE_SDL -DWIZARD -D_WIN32
-IMain\Include -IMain\Include -IFeLib\Include -IC:\MinGW\include -c
..\Main\Source\materset.cpp -o Main\Release\Main\Source\materset.o
mingw32-g++.exe -O3 -finline-functions -IInclude -IFeLib/Include
-ffast-math -s -mwindows -DGCC -DUSE_SDL -DWIZARD -D_WIN32
-IMain\Include -IMain\Include -IFeLib\Include -IC:\MinGW\include -c
..\Main\Source\message.cpp -o Main\Release\Main\Source\message.o
mingw32-g++.exe -O3 -finline-functions -IInclude -IFeLib/Include
-ffast-math -s -mwindows -DGCC -DUSE_SDL -DWIZARD -D_WIN32
-IMain\Include -IMain\Include -IFeLib\Include -IC:\MinGW\include -c
..\Main\Source\object.cpp -o Main\Release\Main\Source\object.o
mingw32-g++.exe -O3 -finline-functions -IInclude -IFeLib/Include
-ffast-math -s -mwindows -DGCC -DUSE_SDL -DWIZARD -D_WIN32
-IMain\Include -IMain\Include -IFeLib\Include -IC:\MinGW\include -c
..\Main\Source\roomset.cpp -o Main\Release\Main\Source\roomset.o
mingw32-g++.exe -O3 -finline-functions -IInclude -IFeLib/Include
-ffast-math -s -mwindows -DGCC -DUSE_SDL -DWIZARD -D_WIN32
-IMain\Include -IMain\Include -IFeLib\Include -IC:\MinGW\include -c
..\Main\Source\script.cpp -o Main\Release\Main\Source\script.o
mingw32-g++.exe -O3 -finline-functions -IInclude -IFeLib/Include
-ffast-math -s -mwindows -DGCC -DUSE_SDL -DWIZARD -D_WIN32
-IMain\Include -IMain\Include -IFeLib\Include -IC:\MinGW\include -c
..\Main\Source\slotset.cpp -o Main\Release\Main\Source\slotset.o
mingw32-g++.exe -O3 -finline-functions -IInclude -IFeLib/Include
-ffast-math -s -mwindows -DGCC -DUSE_SDL -DWIZARD -D_WIN32
-IMain\Include -IMain\Include -IFeLib\Include -IC:\MinGW\include -c
..\Main\Source\trapset.cpp -o Main\Release\Main\Source\trapset.o
mingw32-g++.exe -O3 -finline-functions -IInclude -IFeLib/Include
-ffast-math -s -mwindows -DGCC -DUSE_SDL -DWIZARD -D_WIN32
-IMain\Include -IMain\Include -IFeLib\Include -IC:\MinGW\include -c
..\Main\Source\wmapset.cpp -o Main\Release\Main\Source\wmapset.o
mingw32-g++.exe -O3 -finline-functions -IInclude -IFeLib/Include
-ffast-math -s -mwindows -DGCC -DUSE_SDL -DWIZARD -D_WIN32
-IMain\Include -IMain\Include -IFeLib\Include -IC:\MinGW\include -c
..\Main\Source\wskill.cpp -o Main\Release\Main\Source\wskill.o
mingw32-g++.exe -LFeLib\Release -LC:\MinGW\lib -o
C:\Projects\ivan-0.50\Main\Release\Main.exe
Main\Release\Main\Source\actset.o Main\Release\Main\Source\areaset.o
Main\Release\Main\Source\charset.o Main\Release\Main\Source\charsset.o
Main\Release\Main\Source\command.o Main\Release\Main\Source\coreset.o
Main\Release\Main\Source\dataset.o Main\Release\Main\Source\dungeon.o
Main\Release\Main\Source\game.o Main\Release\Main\Source\godset.o
Main\Release\Main\Source\iconf.o Main\Release\Main\Source\id.o
Main\Release\Main\Source\igraph.o Main\Release\Main\Source\itemset.o
Main\Release\Main\Source\levelset.o Main\Release\Main\Source\main.o
Main\Release\Main\Source\materset.o Main\Release\Main\Source\message.o
Main\Release\Main\Source\object.o Main\Release\Main\Source\roomset.o
Main\Release\Main\Source\script.o Main\Release\Main\Source\slotset.o
Main\Release\Main\Source\trapset.o Main\Release\Main\Source\wmapset.o
Main\Release\Main\Source\wskill.o Main\Release\Main\Resource\Ivan.res
..\..\MinGW\lib\libmingw32.a ..\..\MinGW\lib\libSDLmain.a
...\..\MinGW\lib\libSDL.a FeLib\Release\libFeLib.a
...\..\MinGW\lib\libwinmm.a -mwindows
...\..\MinGW\lib\libSDL.a(SDL_dx5video.o): In function `DX5_Available':
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:487:
undefined reference to `IID_IDirectDrawSurface3'
...\..\MinGW\lib\libSDL.a(SDL_dx5video.o): In function `DX5_VideoInit':
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:915:
undefined reference to `IID_IDirectDraw2'
...\..\MinGW\lib\libSDL.a(SDL_dx5video.o): In function
`DX5_AllocDDSurface':
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:1672:
undefined reference to `IID_IDirectDrawSurface3'
...\..\MinGW\lib\libSDL.a(SDL_dx5video.o): In function
`DX5_SetVideoMode':
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:1320:
undefined reference to `IID_IDirectDrawSurface3'
...\..\MinGW\lib\libSDL.a(SDL_dx5video.o): In function
`DX5_SetGammaRamp':
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:2268:
undefined reference to `IID_IDirectDrawGammaControl'
...\..\MinGW\lib\libSDL.a(SDL_dx5video.o): In function
`DX5_GetGammaRamp':
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:2314:
undefined reference to `IID_IDirectDrawGammaControl'
...\..\MinGW\lib\libSDL.a(SDL_dx5video.o): In function `DX5_Available':
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:460:
undefined reference to `GUID_XAxis'
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:462:
undefined reference to `GUID_YAxis'
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:465:
undefined reference to `GUID_ZAxis'
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:466:
undefined reference to `GUID_RxAxis'
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:471:
undefined reference to `GUID_RyAxis'
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:472:
undefined reference to `GUID_RzAxis'
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:472:
undefined reference to `GUID_Slider'
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:472:
undefined reference to `GUID_Slider'
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:474:
undefined reference to `GUID_POV'
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:474:
undefined reference to `GUID_POV'
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:481:
undefined reference to `GUID_POV'
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:481:
undefined reference to `GUID_POV'
...\..\MinGW\lib\libSDL.a(SDL_dx5video.o): In function
`DX5_CreateDevice':
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:532:
undefined reference to `GUID_XAxis'
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:533:
undefined reference to `GUID_YAxis'
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:537:
undefined reference to `GUID_ZAxis'
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:577:
undefined reference to `GUID_Key'
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:579:
undefined reference to `GUID_Key'
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:582:
undefined reference to `GUID_Key'
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:582:
undefined reference to `GUID_Key'
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:588:
undefined reference to `GUID_Key'
...\..\MinGW\lib\libSDL.a(SDL_dx5video.o):/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:589:
more undefined references to `GUID_Key' follow
...\..\MinGW\lib\libSDL.a(SDL_dx5events.o): In function
`DX5_CreateWindow':
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5events.c:177:
undefined reference to `IID_IDirectInputDevice2A'
...\..\MinGW\lib\libSDL.a(SDL_dx5events.o): In function
`GetTopLevelParent':
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5events.c:72:
undefined reference to `GUID_SysKeyboard'
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5events.c:76:
undefined reference to `GUID_SysMouse'
...\..\MinGW\lib\libSDL.a(SDL_dx5yuv.o): In function
`DX5_CreateYUVOverlay':
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5yuv.c:86:
undefined reference to `IID_IDirectDrawSurface3'
FeLib\Release\libFeLib.a(graphics.o):graphics.cpp: (.text+0xff):
undefined reference to `SDL_RWFromFile'
FeLib\Release\libFeLib.a(graphics.o):graphics.cpp: (.text+0x110):
undefined reference to `SDL_LoadBMP_RW'
collect2: ld returned 1 exit status
=======================================

As you can see there aren't any errors until linking, yet I cannot
identify where these errors are coming from. It LOOKS like some
library or another isn't being included, but no extra libraries are
listed in the makefile, which compiles just fine. You can even see
that I attempted to fix some of the errors by including libwinmm.a, but
that didn't solve all of them, and I've decided to ask for help rather
than attempting to include random libraries without any direction ;)

Apr 30 '06 #1
3 4345

<wa******@gmail.com> wrote in message
news:11*********************@i40g2000cwc.googlegro ups.com...
I'm trying to compile an open source game called IVAN
[ivan.sourceforge.net], and I'm able to compile it from a makefile, but
not from an IDE. I have attempted to recreate the way the makefile
compiles the project as closely as possible, yet I'm getting odd
linking errors. I think I've traced it to some kind of problem with
the SDL libraries it uses, yet I can't explain why it will compile from
the makefile and not from the IDE. I have made sure that the ide knows
all of the include paths, and is linking to all of the libraries in the
makefile (and then some). Here is the makefile:


I dont' see where you're linking to the directx libraries in your makefile.
Apr 30 '06 #2
Which libraries should I link? I don't think it's a problem with the
makefile.

If I run "mingw32-make -f ivanmgw.mak" from the command line, it works
fine. ivanmgw.mak is the makefile that I pasted in the message above,
and as you can see, it makes no mention of directx libraries. It seems
to be a problem with the way the SDL is being linked through the IDE.

Further, I've tried linking almost all of the directx libraries that
come with mingw to the project through the IDE and nothing works.

Apr 30 '06 #3
I think I've narrowed it down to a library dependancy issue during
linking. These are the libraries I'm linking. When they are linked in
this order:

...\..\MinGW\lib\libmingw32.a
...\..\MinGW\lib\libwinmm.a
...\..\MinGW\lib\libSDLmain.a
...\..\MinGW\lib\libSDL.a
FeLib\Release\libFeLib.a

The errors start like so:

...\..\MinGW\lib\libSDL.a(SDL_systimer.o): In function `SDL_StartTicks':
/home/hercules/public_cvs/SDL12/src/timer/SDL_systimer.c:73: undefined
reference to `timeBeginPeriod@4'
/home/hercules/public_cvs/SDL12/src/timer/SDL_systimer.c:74: undefined
reference to `timeGetTime@0'
...\..\MinGW\lib\libSDL.a(SDL_systimer.o): In function `SDL_GetTicks':
/home/hercules/public_cvs/SDL12/src/timer/SDL_systimer.c:101: undefined
reference to `timeGetTime@0'

=====================

When they are linked in this order:

...\..\MinGW\lib\libmingw32.a
...\..\MinGW\lib\libSDLmain.a
...\..\MinGW\lib\libSDL.a
...\..\MinGW\lib\libwinmm.a
FeLib\Release\libFeLib.a -mwindows

The errors start like so:

...\..\MinGW\lib\libSDL.a(SDL_dx5video.o): In function `DX5_Available':
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:487:
undefined reference to `IID_IDirectDrawSurface3'
...\..\MinGW\lib\libSDL.a(SDL_dx5video.o): In function `DX5_VideoInit':
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:915:
undefined reference to `IID_IDirectDraw2'

although IID_ errors appear in both cases.

Can anyone help me???

May 1 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Joonas Paalasmaa | last post by:
Hi, When compiling Sketch's streamfilter C extension the errors below are raised during linking. What could cause the errors? (Python 2.3, MinGw 1.1 with GCC 2.95.3-6, Windows 98) Here are...
0
by: SM | last post by:
Hi, While linking orbix C++ application, we get a lot of linking errors. Few errors are pasted below. If someone could tell us which are the libraries that need to be added, it would be of help....
7
by: Steven T. Hatton | last post by:
Is there anything that gives a good description of how source code is converted into a translation unit, then object code, and then linked. I'm particularly interested in understanding why putting...
3
by: Markus Fischer | last post by:
Hi, I'm experiencing a wierd problem with IE 6 in Windows with two _slightly_ different Version. Give the following HTMl-Code, ideally the output of offsetTop should be "105"; a few pixel...
1
by: Christoph Wienands | last post by:
Hello everybody, I'm a C# programmer that recently was forced to look into Managed C++. Please forgive me if I might be asking stupid questions ;-) I currently have to write a wrapper class...
3
by: rich | last post by:
Hi there, I've been working with dynamic libraries for a quite big software and now and then I may get some weird linking errors, like following MSVCRTD.lib(MSVCR71D.dll) : error LNK2005:...
10
by: Julian | last post by:
I get the following error when i try to link a fortran library to a c++ code in .NET 2005. LINK : fatal error LNK1104: cannot open file 'libc.lib' the code was working fine when built using...
6
by: oyk | last post by:
I hope someone could help me on this. I have linked an excel worksheet to access but the some data shown in the access table has the #Num errors. Presumably, this must be because the data in the...
2
by: pssraju | last post by:
Hi, At present application was built on solaris 9 using sun studio 9 (Sun C++ 5.6) & rouguewave sorce pro 5. We are planning to port the same application onto SuSE Linux 9.5.0 using GCC 3.3.3 & RW...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.