Author Topic: fnSaveNewPars  (Read 9382 times)

Offline Renan

  • Newbie
  • *
  • Posts: 15
    • View Profile
fnSaveNewPars
« on: October 16, 2008, 01:32:27 PM »
Hi,

I'm calling the function "fnSaveNewPars(SAVE_NEW_PARAMETERS)" in my file Myfile.c and it is giving compilation error.
In this file, I am only including Myfile.h and  config.h and CW shows:

Link Error : Undefined : "fnSaveNewPars" Referenced from "myfunction" in "MyFile.c".
Link Failed.

I´m It seems to be something simple but I am not getting solved.  ???
I'm using the SP8.

Thanks in advance.

Renan.


Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: fnSaveNewPars
« Reply #1 on: October 16, 2008, 04:30:04 PM »
Hi Renan

Have you included the following in your file?

#include "config.h"


This then includes application.h, where the prototype for extern int  fnSaveNewPars(int iTemp); is.
If not, you may be seeing a warning about fnSaveNewPars() when compiling your file MyFile.c and subsequently a linking error if the compiler assumed its form incorrectly.

Regards

Mark

Offline Renan

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: fnSaveNewPars
« Reply #2 on: October 16, 2008, 06:22:51 PM »
Hi Mark,

Yes, I´m  include "config.h".

This error in the "myfile.c" also happens if I try to use the fnSaveNewPars() function in the file "arp.c" (for example), which is included the "config.h". ???

Best Regards...

Renan.

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: fnSaveNewPars
« Reply #3 on: October 16, 2008, 08:14:17 PM »
Hi

Is the routine actually in the build? Check that you don't have USE_MAINTENANCE deactivated since it will remove a lot of things from the file debug.c, where the routine is.

I would go to the routine extern int fnSaveNewPars(int iTemp) in debug.c and make an error in it, and then check whether the file compiles. If it still compiles the routine is really not being added. If it errors then I also don't know what is going on.

Regards

Mark



Offline Renan

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: fnSaveNewPars
« Reply #4 on: October 16, 2008, 08:29:18 PM »
Hi Mark,

Exactly, USE_MAINTENANCE The routine has been disabled and was the cause of my mistakes. :-[
Thank you for your attention, I'm migrating from an older version to the SP8 and I hope not generate more errors. :D

Best Regards;

Renan