PBuilder redefines the functions?

Hi,

I’m using DC-ME-NET Development kit.

I’ve crated a new project with DigiESP’s wizard. And it’s running, i can entered the web pages.

But when i modified the web pages(text an logo modified only), re-compiled the pages with PBuilder, and replaced the new *.c and *_v.c files with old files. DigiESP gives building errors (mostly redefinition errors).

In example, PBuilder created getCompanyURL function twice:


/* Created with PageBuilder version 4.04 on Wed Jul 4 13:56:45 2007 */

#include “AsExtern.h”

#if RomPagerServer

/* ************************************ /
/
* Built from “html\home.htm” * /
/
************************************ */

extern char *getProductName(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr);
char *getProductName(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr) {
char * theResult;

return theResult;

}

extern char *getCompanyURL(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr);
char *getCompanyURL(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr) {
char * theResult;

return theResult;

}

extern char *getCompanyLogo(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr);
char *getCompanyLogo(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr) {
char * theResult;

return theResult;

}

extern char *getProductName(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr);
char *getProductName(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr) {
char * theResult;

return theResult;

}

extern Signed32 getTemperatureF(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr);
Signed32 getTemperatureF(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr) {
Signed32 theResult;

return theResult;

}

extern Signed32 getTemperatureC(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr);
Signed32 getTemperatureC(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr) {
Signed32 theResult;

return theResult;

}

extern Unsigned32 getWindSpeed(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr);
Unsigned32 getWindSpeed(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr) {
Unsigned32 theResult;

return theResult;

}

extern Unsigned32 getWindSpeedMetric(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr);
Unsigned32 getWindSpeedMetric(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr) {
Unsigned32 theResult;

return theResult;

}

extern char *getWindDirectionString(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr);
char *getWindDirectionString(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr) {
char * theResult;

return theResult;

}

extern Signed32 getHighTemperatureF(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr);
Signed32 getHighTemperatureF(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr) {
Signed32 theResult;

return theResult;

}

extern Signed32 getHighTemperatureC(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr);
Signed32 getHighTemperatureC(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr) {
Signed32 theResult;

return theResult;

}

extern Signed32 getLowTemperatureF(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr);
Signed32 getLowTemperatureF(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr) {
Signed32 theResult;

return theResult;

}

extern Signed32 getLowTemperatureC(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr);
Signed32 getLowTemperatureC(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr) {
Signed32 theResult;

return theResult;

}

extern Unsigned32 getHighWindSpeed(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr);
Unsigned32 getHighWindSpeed(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr) {
Unsigned32 theResult;

return theResult;

}

extern Unsigned32 getHighWindSpeedMetric(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr);
Unsigned32 getHighWindSpeedMetric(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr) {
Unsigned32 theResult;

return theResult;

}

extern char *getFwRevision(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr);
char *getFwRevision(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr) {
char * theResult;

return theResult;

}

extern char *getFwDate(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr);
char *getFwDate(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr) {
char * theResult;

return theResult;

}

extern char *getIpAddr(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr);
char *getIpAddr(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr) {
char * theResult;

return theResult;

}

extern char *getMacAddress(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr);
char *getMacAddress(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr) {
char * theResult;

return theResult;

}

extern char *getUptime(void);
char *getUptime(void) {
char * theResult;

return theResult;

}

extern char *getCompanyCopyright(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr);
char *getCompanyCopyright(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr) {
char * theResult;

return theResult;

}

extern char *getCompanyURL(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr);
char *getCompanyURL(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr) {
char * theResult;

return theResult;

}

extern char *getCompanyDisplayURL(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr);
char *getCompanyDisplayURL(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr) {
char * theResult;

return theResult;

}

#endif /* RomPagerServer */

what can i do abot this problem?

Best Regards,

PBuilder is more of a translator than a compiler. It will take whatever you put in as RpGetPtr= value and make it a function, no matter that one before existed or not. If I were you, I would look in my HTML source for duplicates.

Hello

The project has two directories containing .c files (besides the main directory), namely \pbuilder and \html. Generally the projects are set up to have the pbuilder utility place the _v.c files (with the stub functions) into \html. This is done so that if you have filled in stub funtions and you rerun pbuilder, you do not squash your stub functions with the newly created _v.c file. What I generally do, once I have created my stub functions once and placed them into \pbuilder and I then updated my html files and rerun pbuilder, I copy whatever NEW stub functions were created in the new run and place them into the _v.c file in the \pbuilder directory.

The reason for the multiple definitions is that when ESP runs, it scans all directories in your project, for .c files. Thus it will see the _v.c files in both \pbuilder and \html. What I have done is after rerunning the pbuilder utility and BEFORE rebuilding under ESP, is to rename the _v.c files in \html by changing their extension to something other then .c (myfile_v.c to
myfile_v.c_dontletespseeme. This will keep ESP from seeing the _v.c files in \html when doing its scan process. Then when doing compile and link, you will not get the duplicates.

You right, but this html pages that i want to compile(or translate) are in the sample projects. I didn’t modify them. Just i tried to re-translate and re-compile the sample project. But i didn’t get the same same results.

Thanks for your advices

Best Regards,
Baris