Jump to content
Eternal Lands Official Forums
jamesvm

Help With Little Error

Recommended Posts

geting lnk error and can't figure it out

use visual c++ copiler

window xp

yes found acos and atan2f in math.h which is declared

 

------ Build started: Project: elc, Configuration: Release Win32 ------

Compiling...
shadows.c
shadows.c(59) : warning C4244: '=' : conversion from 'double' to 'GLfloat', possible loss of data
shadows.c(61) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
shadows.c(62) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
shadows.c(63) : warning C4244: '=' : conversion from 'double' to 'GLfloat', possible loss of data
shadows.c(64) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
shadows.c(65) : warning C4244: '=' : conversion from 'double' to 'GLfloat', possible loss of data
shadows.c(66) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
shadows.c(67) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
shadows.c(68) : warning C4244: '=' : conversion from 'double' to 'GLfloat', possible loss of data
shadows.c(69) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
shadows.c(70) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
shadows.c(71) : warning C4244: '=' : conversion from 'double' to 'GLfloat', possible loss of data
shadows.c(85) : warning C4244: 'initializing' : conversion from 'double' to 'float', possible loss of data
shadows.c(89) : warning C4013: 'acosf' undefined; assuming extern returning int
shadows.c(89) : warning C4244: '=' : conversion from 'int' to 'float', possible loss of data
shadows.c(91) : warning C4013: 'atan2f' undefined; assuming extern returning int
shadows.c(104) : warning C4244: 'function' : conversion from 'GLsizei' to 'GLfloat', possible loss of data
shadows.c(104) : warning C4244: 'function' : conversion from 'GLsizei' to 'GLfloat', possible loss of data
shadows.c(325) : warning C4244: 'function' : conversion from 'double' to 'GLfloat', possible loss of data
shadows.c(325) : warning C4244: 'function' : conversion from 'double' to 'GLfloat', possible loss of data
shadows.c(325) : warning C4244: 'function' : conversion from 'double' to 'GLfloat', possible loss of data
shadows.c(368) : warning C4244: 'function' : conversion from 'double' to 'GLfloat', possible loss of data
shadows.c(368) : warning C4244: 'function' : conversion from 'double' to 'GLfloat', possible loss of data
shadows.c(368) : warning C4244: 'function' : conversion from 'double' to 'GLfloat', possible loss of data
shadows.c(388) : warning C4244: '=' : conversion from 'float' to 'int', possible loss of data
shadows.c(389) : warning C4244: '=' : conversion from 'float' to 'int', possible loss of data
shadows.c(405) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data
shadows.c(406) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data
shadows.c(429) : warning C4244: '=' : conversion from 'float' to 'int', possible loss of data
shadows.c(430) : warning C4244: '=' : conversion from 'float' to 'int', possible loss of data
shadows.c(441) : warning C4244: '=' : conversion from 'float' to 'int', possible loss of data
shadows.c(442) : warning C4244: '=' : conversion from 'float' to 'int', possible loss of data
shadows.c(459) : warning C4244: '=' : conversion from 'float' to 'int', possible loss of data
shadows.c(460) : warning C4244: '=' : conversion from 'float' to 'int', possible loss of data
shadows.c(483) : warning C4244: '=' : conversion from 'float' to 'int', possible loss of data
shadows.c(484) : warning C4244: '=' : conversion from 'float' to 'int', possible loss of data
shadows.c(524) : warning C4244: '=' : conversion from 'float' to 'int', possible loss of data
shadows.c(525) : warning C4244: '=' : conversion from 'float' to 'int', possible loss of data
shadows.c(551) : warning C4244: '=' : conversion from 'float' to 'int', possible loss of data
shadows.c(552) : warning C4244: '=' : conversion from 'float' to 'int', possible loss of data
shadows.c(634) : warning C4244: 'function' : conversion from 'int' to 'GLfloat', possible loss of data
shadows.c(634) : warning C4244: 'function' : conversion from 'int' to 'GLfloat', possible loss of data
shadows.c(634) : warning C4244: 'function' : conversion from 'int' to 'GLfloat', possible loss of data
shadows.c(659) : warning C4244: '=' : conversion from 'double' to 'GLfloat', possible loss of data
shadows.c(659) : warning C4244: '=' : conversion from 'double' to 'GLfloat', possible loss of data
shadows.c(659) : warning C4244: '=' : conversion from 'double' to 'GLfloat', possible loss of data
shadows.c(659) : warning C4244: '=' : conversion from 'double' to 'GLfloat', possible loss of data
shadows.c(664) : warning C4244: '=' : conversion from 'double' to 'GLfloat', possible loss of data
shadows.c(664) : warning C4244: '=' : conversion from 'double' to 'GLfloat', possible loss of data
shadows.c(664) : warning C4244: '=' : conversion from 'double' to 'GLfloat', possible loss of data
shadows.c(664) : warning C4244: '=' : conversion from 'double' to 'GLfloat', possible loss of data
shadows.c(669) : warning C4244: '=' : conversion from 'double' to 'GLfloat', possible loss of data
shadows.c(669) : warning C4244: '=' : conversion from 'double' to 'GLfloat', possible loss of data
shadows.c(669) : warning C4244: '=' : conversion from 'double' to 'GLfloat', possible loss of data
shadows.c(669) : warning C4244: '=' : conversion from 'double' to 'GLfloat', possible loss of data
shadows.c(674) : warning C4244: '=' : conversion from 'double' to 'GLfloat', possible loss of data
shadows.c(674) : warning C4244: '=' : conversion from 'double' to 'GLfloat', possible loss of data
shadows.c(674) : warning C4244: '=' : conversion from 'double' to 'GLfloat', possible loss of data
shadows.c(674) : warning C4244: '=' : conversion from 'double' to 'GLfloat', possible loss of data
Linking...
shadows.obj : error LNK2019: unresolved external symbol _atan2f referenced in function _calc_shadow_matrix
shadows.obj : error LNK2019: unresolved external symbol _acosf referenced in function _calc_shadow_matrix
Release/el.exe : fatal error LNK1120: 2 unresolved externals

Build log was saved at "file://c:\James\complie el source code\elc\Release\BuildLog.htm"
elc - 3 error(s), 59 warning(s)


---------------------- Done ----------------------

   Build: 0 succeeded, 1 failed, 0 skipped

can anyone help me

Edited by jamesvm

Share this post


Link to post
Share on other sites

It is changing the format of the data beacuse it has determined that you do not need the double, you just need a float. So it changes it. Unless data actually WAS lost, nothing really happened.

Share this post


Link to post
Share on other sites

freeone3000: The question was about the link error:

shadows.obj : error LNK2019: unresolved external symbol _atan2f referenced in function _calc_shadow_matrix
shadows.obj : error LNK2019: unresolved external symbol _acosf referenced in function _calc_shadow_matrix

As I already told jamesvm, I don't know what he needs to link to, but I hope someone else here does :P

Share this post


Link to post
Share on other sites
As I already told jamesvm, I don't know what he needs to link to, but I hope someone else here does

The linker turns the .obj file into a .exe file. Only .exe files, to my knodlage, can be run as programs.

EDIT: That should answer that question. :EDIT

Edited by freeone3000

Share this post


Link to post
Share on other sites
The linker turns the .obj file into a .exe file. Only .exe files, to my knodlage, can be run as programs.

Yes, congratulations, and a compiler turns C code into object files. What does that have to do with anything? :P

Share this post


Link to post
Share on other sites

I don't think he should link to anything...

The functions atan and acos without the f are in the dynamic and static c library..

The others (atanf, acosf) simply don't exist in either.

It of course dosen't matter if they're in the .h (inside conditional defines btw).

So my guess is that there's something wrong with the project's settings or some #define that makes the program try to link to the wrong functions.

As far as i see in my .h the f variants are supposed to be simply replaced inline with the others.

If they are actually referenced as atanf, acosf in teh source, then just delete the f and see if it works.

Share this post


Link to post
Share on other sites

ok got to compile but now come up with

el.exe-Entry point not found

The procedure entry point UTF8Toisolat1 could not be located in the dynamic link library libxml2.dll

I have libxml2.dll in directer where release is that when try run el.exe

Share this post


Link to post
Share on other sites

Added a couple of defines for visual c users to use atan2 and acos instead of the float versions.

 

James: Update your libxml2, it must be old.

Share this post


Link to post
Share on other sites

To get the warning messages out :

 

Select all .c files in the file pane

Rightclick them

Click on Settings

In the combobox "setting for" select "All configurations"

Set combobox "Warning level" to "none"

Click "Ok"

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

  • Recently Browsing   0 members

    No registered users viewing this page.

×