Jump to content
Eternal Lands Official Forums
Sign in to follow this  
DarkWarriorBOW

Undefined Reference To _imp__xmlfree ?

Recommended Posts

Well, getting EL to compile with only one error.. namely this one :

 

notepad.o:notepad.c:(.text+0x5be): undefined reference to `_imp__xmlFree'

 

Anyone know how to get rid of this one ?

 

Here is the complete compiler output :

 

gcc.exe 2d_objects.o 3d_objects.o actor_scripts.o actors.o asc.o books.o buddy.o cache.o chat.o colors.o console.o consolewin.o cursors.o dialogues.o draw_scene.o elconfig.o elwindows.o encyclopedia.o errors.o events.o filter.o font.o frustum.o gamewin.o gl_init.o help.o hud.o ignore.o init.o interface.o items.o keys.o knowledge.o lights.o loginwin.o main.o manufacture.o map_io.o mapwin.o md2loader.o md5.o misc.o multiplayer.o new_actors.o new_character.o notepad.o openingwin.o options.o particles.o paste.o pathfinder.o pm_log.o questlog.o reflection.o rules.o sector.o shadows.o sound.o spells.o stats.o storage.o tabs.o text.o textures.o tile_map.o timers.o trade.o translate.o weather.o widgets.o Eternal_Lands_private.res -o "Eternal Lands.exe" -L"C:/Dev-Cpp/iconv-1.9.1.win32/lib" -L"lib" -L"C:/Dev-Cpp/libxml2-2.6.19+.win32/lib" -L"C:/Dev-Cpp/oggvorbis-win32sdk-1.0.1/lib" -mwindows -lSDL -lopengl32 -llibxml2 -lSDL_net -lALut -lOpenAL32 -lvorbisfile -liberty C:/Dev-Cpp/iconv-1.9.1.win32/lib/iconv.lib -mwindows

 

Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized

notepad.o:notepad.c:(.text+0x5be): undefined reference to `_imp__xmlFree'

collect2: ld returned 1 exit status

 

make.exe: *** ["Eternal] Error 1

 

 

Gracias for any help you can give me.

 

DW

Share this post


Link to post
Share on other sites

no matter... fixed it.

 

note[no_notes]->window = -1;

 

//xmlFree (name);

 

no_notes++;

 

Probably not freeing up something now.. We'll see.

Share this post


Link to post
Share on other sites

Yes, that will cause a slight memory leak. Did you follow crusadingknight's guide?

 

It's probably safe to replace "xmlFree" with "free", or you could compile without "-DNOTEPAD".

Share this post


Link to post
Share on other sites

It seems your libxml installation for some weird reason lacks the xmlFree() function. Maybe it got corrupted, have you tried removing and reinstalling libxml2?

Share this post


Link to post
Share on other sites

Hmm yes, i did try and remove and reinstall the libxml libraries. and indeed, there is no xmlFree.h anywhere to be found. That is why i was like 'huh ? O_o'.

 

tried both the libxml 2.1.19 and 2.1.19+ packages several times, to no avail.

(in fact, i tried to get through this error for 4 hours straight until i gave up and just commented out. was sick of it).

 

Yes, i did follow the guide to the letter, and tried both VC7 (which was a pain in the ass, but worked) and Dev-C++.

 

The tutorial I might add, is -off-. if you start from scratch, it won't work. Probably due to changes in the sources.

 

Why xmlFree function is not in the libxml package.. hmm.. good question that i can't answer lol.

I sifted through many many sites and it appears that if the libraries are statically linked, this error does not occur, but is related to the MinGW compiler.

 

Hope this helps.

 

 

(oh, and free (name) works.. thanks)

Edited by DarkWarriorBOW

Share this post


Link to post
Share on other sites
tried both the libxml 2.1.19 and 2.1.19+ packages several times, to no avail.

Those seem to be very old versions of libxml2. I use version 2.6.17 here. Have you tried to update to a much more recent release?

 

<edit>Checked xmlsoft.org: the version you are using seem to be from summer 2000. Quite ancient :D

Edited by Malaclypse

Share this post


Link to post
Share on other sites

:angry: Yeah, i meant 2.6.19. sorry lol

I am using the latest and apparantly not so greatest version out there.

 

Anyway, that can't be it as that is also the recommended version to download in the tutorial.

Share this post


Link to post
Share on other sites

just tryed it myself and all i got was a unknown entrypoint error...

 

hmm, just checked the page for latest version of libxml and it seems there is a 2.6.19+ listed with a date of 03-May-2005...

 

the + versions dont seem to be normal, i can only se maybe 5 other versions that have gotten a + version.

 

hmm, with the + version in place i got a working compile without needing to edit any *.h file...

Edited by duran

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×