jamesvm Report post Posted October 31, 2004 (edited) 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 October 31, 2004 by jamesvm Share this post Link to post Share on other sites
freeone3000 Report post Posted October 31, 2004 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
Umrion Report post Posted October 31, 2004 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 Share this post Link to post Share on other sites
freeone3000 Report post Posted October 31, 2004 (edited) 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 October 31, 2004 by freeone3000 Share this post Link to post Share on other sites
Cicero Report post Posted October 31, 2004 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? Share this post Link to post Share on other sites
jamesvm Report post Posted October 31, 2004 what don't understand is why geting when in math.h i can clearly see the two function that it have problem. Share this post Link to post Share on other sites
Cicero Report post Posted October 31, 2004 There is some math library that you need to link with. -lm ? Share this post Link to post Share on other sites
jamesvm Report post Posted October 31, 2004 hmm maybe gamedev site forum could help me cause I know math.h has the fucntion acos and atan2f. Share this post Link to post Share on other sites
Xilcox Report post Posted October 31, 2004 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
jamesvm Report post Posted November 1, 2004 ok got to compile but now come up with el.exe-Entry point not foundThe 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
Sadez Report post Posted November 2, 2004 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
jamesvm Report post Posted November 2, 2004 James: Update your libxml2, it must be old. thid stupid question but where can get update version of it Share this post Link to post Share on other sites
Sadez Report post Posted November 2, 2004 The official page is www.xmlsoft.org, but you can find windows binaries here: ftp://ftp.zlatkovic.com/pub/libxml/ Share this post Link to post Share on other sites
teranoz Report post Posted November 2, 2004 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
jamesvm Report post Posted November 2, 2004 thankyou all for help it work fully now Share this post Link to post Share on other sites