1 Replies - 462 Views - Last Post: 01 February 2015 - 09:44 PM Rate Topic: -----

#1 dargscisyhp   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 01-February 15

Getting xodeint from numerical recipes to work in dev-c++

Posted 01 February 2015 - 12:17 PM

I am taking a computational physics course, and currently I have very little knowledge of programming. I have downloaded the numerical recipes machine-readable code, and I am trying to get one of their examples to work in dev-c++. Unfortunately, I am having difficulty.

I have copied xodeint.c, odeint.c, nrutil.h, nrutil.c, and nr.h from subdirectories of ./nr_c304/legacy/nr2/C_211 into my project folder. I then pulled up xodeint.c in dev-c++. Upon compilation, I got the following errors:

6   0   C:\Users\Amol\Documents\School\graduate computational\ODEexample\xodeint.c  In file included from C:\Users\Amol\Documents\School\graduate computational\ODEexample\xodeint.c
183 7   C:\Users\Amol\Documents\School\graduate computational\ODEexample\nr.h   [Warning] conflicting types for built-in function 'fmin' [enabled by default]
C:\Users\Amol\AppData\Local\Temp\ccAOtzsJ.o xodeint.c:(.text+0x195): undefined reference to `vector'
C:\Users\Amol\AppData\Local\Temp\ccAOtzsJ.o xodeint.c:(.text+0x1a8): undefined reference to `vector'
C:\Users\Amol\AppData\Local\Temp\ccAOtzsJ.o xodeint.c:(.text+0x1cd): undefined reference to `matrix'
C:\Users\Amol\AppData\Local\Temp\ccAOtzsJ.o xodeint.c:(.text+0x1ef): undefined reference to `bessj0'
C:\Users\Amol\AppData\Local\Temp\ccAOtzsJ.o xodeint.c:(.text+0x211): undefined reference to `bessj1'
C:\Users\Amol\AppData\Local\Temp\ccAOtzsJ.o xodeint.c:(.text+0x238): undefined reference to `bessj'
C:\Users\Amol\AppData\Local\Temp\ccAOtzsJ.o xodeint.c:(.text+0x25f): undefined reference to `bessj'
C:\Users\Amol\AppData\Local\Temp\ccAOtzsJ.o xodeint.c:(.text+0x2b5): undefined reference to `rkqs'
C:\Users\Amol\AppData\Local\Temp\ccAOtzsJ.o xodeint.c:(.text+0x30a): undefined reference to `odeint'
C:\Users\Amol\AppData\Local\Temp\ccAOtzsJ.o xodeint.c:(.text+0x3e7): undefined reference to `bessj'
C:\Users\Amol\AppData\Local\Temp\ccAOtzsJ.o xodeint.c:(.text+0x4d4): undefined reference to `free_matrix'
C:\Users\Amol\AppData\Local\Temp\ccAOtzsJ.o xodeint.c:(.text+0x4f1): undefined reference to `free_vector'
C:\Users\Amol\AppData\Local\Temp\ccAOtzsJ.o xodeint.c:(.text+0x508): undefined reference to `free_vector'
c:\program files (x86)\dev-cpp\mingw64\x86_64-w64-mingw32\bin\ld.exe    C:\Users\Amol\AppData\Local\Temp\ccAOtzsJ.o: bad reloc address 0x0 in section `.pdata'
C:\Users\Amol\Documents\School\graduate computational\ODEexample\collect2.exe   [Error] ld returned 1 exit status


So I suppose I'm missing some files in my project folder that are necessary to compile the code, but I'm not sure what I'm missing. I have tried adding certain files to my project folder, such as bessj1.c, however this does not change the errors I receive. Any help in getting this working would be much appreciated.

Regards.

Is This A Good Question/Topic? 0
  • +

Replies To: Getting xodeint from numerical recipes to work in dev-c++

#2 Skydiver   User is offline

  • Code herder
  • member icon

Reputation: 6216
  • View blog
  • Posts: 21,452
  • Joined: 05-May 12

Re: Getting xodeint from numerical recipes to work in dev-c++

Posted 01 February 2015 - 09:44 PM

Also posted here.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1