Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
fiend-o-hell

Chocolate doom compile error (undefined reference errors)

Recommended Posts

I've been meaning to get into source port editing for quite a while now, so I thought chocolate doom would be as good a port as any to start with. I'm still pretty new at this, so please be patient with my questions.

So here is the problem:
I got stuck somewhere compiling chocolate doom with code::blocks and MinGW in XP. I followed the setup directions from here to the letter. I'm compiling out of main.workspace.

Here is my build log:

D:/DOOM/ports/chocolate doom/SVN Source/textscreen/txt_gui.c:347: undefined reference to `TXT_DecodeUTF8'
D:/DOOM/ports/chocolate doom/SVN Source/textscreen/txt_gui.c:364: undefined reference to `TXT_UTF8_Strlen'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 10 seconds)
4 errors, 46 warnings
I'm not sure why these undefined reference errors are cropping up...

Share this post


Link to post

Add txt_utf8.c to libtextscreen's sources and txt_utf8.h to libtextscreen's headers.

Share this post


Link to post

Which libtextscreen source/header files? I checked txt_gui.c and its including txt_utf8.h.

I looked around the work space without having any luck finding txt_utf8.h. Is it supposed to be part of chocolate doom or is it part of an external lib?

Share this post


Link to post

In the project files on the left, open the libtextscreen tree.
Open the following two trees.
Under Sources, right click on textscreen and click Add files.
Select and open the txt_utf8.c file from the /textscreen directory.
Under Headers, right click on textscreen and click Add files.
Select and open the txt_utf8.h file from the /textscreen directory.
Bam.

Share this post


Link to post

I don't use or maintain code::blocks project files; Russell Rice does. Looks like they're out of date. Randy87's suggestions should probably fix the issue.

Share this post


Link to post

Managed to clear up the errors following Randy87's instructions. The only other error that cropped up required me to delete the .in extension from setup-manifest.xml file. Does that mess anything up?

I compiled and ran the build fine afterwards.

Share this post


Link to post

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
×