Welcome
Welcome to the WXTide32 and svHorizon forum.

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access other special features. Registration is fast, simple, and absolutely free, so please, join our community today!

Problem compiling wxtide32

Issues or problems using the WXTide32 program.

Problem compiling wxtide32

Postby ian » 30 Nov 2011 13:32

Hello,

I have loaded the source code (from wxtid47.zip) on lcc-win32, to compile it.
(I chose lcc since this was the platform it was developed on.)

I get a small but decisively blocking error in the compilation:
(I have made absolutely no changes to the original code.)

lcc output follows:

Code: Select all
Wedit output window build: Wed Nov 30 14:20:41 2011
tide2idx.obj: multiple definition of _main
first definition is in file wxtidelcc.obj
loclib.obj: multiple definition of _allocate_copy_string
first definition is in file tide2idx.obj
xprintf.obj: multiple definition of _printf
first definition is in file wxtide.obj
Error d:\ioannis\documents\wxtide32\wxt47_source\wxtide.c 3841 undefined reference to _fabsf
Error d:\ioannis\documents\wxtide32\wxt47_source\wxtide.c 4518 undefined reference to __fabsi
C:\lcc\bin\make.exe
Compilation + link time:0.4 sec, Return code: 10


I'm referring to the undefined reference errors. In the header files, I can find defined "fabsf" and "_fabsi" (one underscore less).
Apparently the compiler prepends an extra underscore to these names, and then cannot find them to make the link.

If it's any help, Line 3841 is this:
Code: Select all
if (GetDlgItemFloat(hwnd, IDF_MARKLEV, &tmpFloat) &&
                !FSAME(tmpFloat, pSection->marklev))


Any help with this would be greatly appreciated!
Thanks in advance,
Ioannis
ian
 
Posts: 1
Joined: 30 Nov 2011 13:13

 

Re: Problem compiling wxtide32

Postby mmmike » 16 Jan 2012 17:45

It appears that error must be caused by the FSAME macro but I haven't a clue why. I recently had a hard disk crash and will be rebuilding things using more up-to-date tools and Windows 7 so I should be able to find out what is causing that problem.

The FSAME macro is pretty simple, it looks like:
Code: Select all
#define FSAME(a,b) (fabs(a-b) < 0.0001)


Mike
mmmike
Site Admin
 
Posts: 9
Joined: 22 Apr 2008 12:47
Location: Tampa, FL, USA


Return to WXTide32 Support

Who is online

Users browsing this forum: No registered users and 0 guests

cron
suspicion-preferred