AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Where is the main function of ChatScript program?
 
 
  [ # 16 ]

These are new ERRORS:

In file included from common.h:199:0,
            from textUtilities.cpp:1:
textUtilities.cpp: In function ‘bool AdjustUTF8(char*, char*)’:
scriptCompile.h:59:53: error: ‘ScriptWarn’ was not declared in this scope
#define WARNSCRIPT(...) {if (compiling) {ScriptWarn(); Log(STDTRACELOG, __VA_AR
                                    ^
textUtilities.cpp:1864:21: note: in expansion of macro ‘WARNSCRIPT’
    if (compiling) WARNSCRIPT(“UTF8 B4 ’ revised to Ascii %s | %s”,start,buffe
              ^
scriptCompile.h:59:53: error: ‘ScriptWarn’ was not declared in this scope
#define WARNSCRIPT(...) {if (compiling) {ScriptWarn(); Log(STDTRACELOG, __VA_AR
                                    ^
textUtilities.cpp:1872:21: note: in expansion of macro ‘WARNSCRIPT’
    if (compiling) WARNSCRIPT(“UTF8 opening single quote revised to Ascii %s |
              ^
scriptCompile.h:59:53: error: ‘ScriptWarn’ was not declared in this scope
#define WARNSCRIPT(...) {if (compiling) {ScriptWarn(); Log(STDTRACELOG, __VA_AR
                                    ^
textUtilities.cpp:1881:22: note: in expansion of macro ‘WARNSCRIPT’
    if (compiling) WARNSCRIPT(“UTF8 closing single quote revised to Ascii %s
              ^
scriptCompile.h:59:53: error: ‘ScriptWarn’ was not declared in this scope
#define WARNSCRIPT(...) {if (compiling) {ScriptWarn(); Log(STDTRACELOG, __VA_AR
                                    ^
textUtilities.cpp:1906:21: note: in expansion of macro ‘WARNSCRIPT’
    if (compiling) WARNSCRIPT(“UTF8 opening double quote revised to Ascii %s |
              ^
scriptCompile.h:59:53: error: ‘ScriptWarn’ was not declared in this scope
#define WARNSCRIPT(...) {if (compiling) {ScriptWarn(); Log(STDTRACELOG, __VA_AR
                                    ^
textUtilities.cpp:1912:21: note: in expansion of macro ‘WARNSCRIPT’
    if (compiling) WARNSCRIPT(“UTF8 opening curly paren quote revised to Ascii
              ^
scriptCompile.h:59:53: error: ‘ScriptWarn’ was not declared in this scope
#define WARNSCRIPT(...) {if (compiling) {ScriptWarn(); Log(STDTRACELOG, __VA_AR
                                    ^
textUtilities.cpp:1918:21: note: in expansion of macro ‘WARNSCRIPT’
    if (compiling) WARNSCRIPT(“UTF8 closing curly paren quote revised to Ascii
              ^
scriptCompile.h:59:53: error: ‘ScriptWarn’ was not declared in this scope
#define WARNSCRIPT(...) {if (compiling) {ScriptWarn(); Log(STDTRACELOG, __VA_AR
                                    ^
textUtilities.cpp:1924:21: note: in expansion of macro ‘WARNSCRIPT’
    if (compiling) WARNSCRIPT(“UTF8 closing double quote revised to Ascii %s |
              ^
scriptCompile.h:59:53: error: ‘ScriptWarn’ was not declared in this scope
#define WARNSCRIPT(...) {if (compiling) {ScriptWarn(); Log(STDTRACELOG, __VA_AR
                                    ^
textUtilities.cpp:1929:21: note: in expansion of macro ‘WARNSCRIPT’
    if (compiling) WARNSCRIPT(“UTF8 mdash seen %s | %s”, start, buffer);
              ^
scriptCompile.h:59:53: error: ‘ScriptWarn’ was not declared in this scope
#define WARNSCRIPT(...) {if (compiling) {ScriptWarn(); Log(STDTRACELOG, __VA_AR

 

 
  [ # 17 ]

somewhere DISCARDSCRIPTCOMPILER has become defined. Normally it is not, so I never noticed compilation bug in textutilities with it disabled. Either get that disable removed or alter scriptcompiler.h to look like this:

bool StartScriptCompiler();
#define WARNSCRIPT(...) {if (compiling) {ScriptWarn(); Log(STDTRACELOG, __VA_ARGS__); } // readpattern calls from functions should not issue warnings
#else
#define WARNSCRIPT(...) {Log(STDTRACELOG, __VA_ARGS__); } // readpattern calls from functions should not issue warnings
#endif

That is, move WARNSCRIPT up and split into 2 versions, one for when discardscriptcompiler is true and when where it is not

 

 
  [ # 18 ]

I did commenting this line into common.h file : #define DISCARDSCRIPTCOMPILER 1 and problem solved, but again a new error:

collect2: error: ld returned 1 exit status
Makefile:107: recipe for target ‘binary’ failed
make: *** [binary] Error 1

 

 
  [ # 19 ]

There is a configure file in evserver folder, but I can not run it by ” ./configure ” command. I think it should be a configure file that I can execute it before make file.

 

 
  [ # 20 ]

I’ve never had to do anything with evserver to get it to compile on linux.  I run on amazon EC2 instances with AMI linux

 

 
  [ # 21 ]

Hi Mr.Wilcox,

May you explain this step more simple and more exact? what do should we do, step by step?What do you mean by adding a list of CS files to our build list? how can we do it?

### Embedding Step #1
First, you will need to modify common.h and compile the system. You need to add all the CS .cpp files
to your build list.

Find the // #define NOMAIN 1 and uncomment it.
This will allow you to compile your program as the main program and ChatScript
merely as a collection of routines to accompany it.

 

 
  [ # 22 ]
Bruce Wilcox - Oct 8, 2017:

I’ve never had to do anything with evserver to get it to compile on linux.  I run on amazon EC2 instances with AMI linux

Hello!
Sorry, may you answer to my last question?

Also when I asked the problem from a Linux expert he said: 
Well, sort of, right, but _start isn’t a kind of function a programmer would write. It is generated by assembler from a template. This is a function that the runtime calls in order to start executing the program. _start will later transfer control to your main function. However, the linker isn’t able to find an archive where you must’ve compiled your code containing main function - this is why it gives this error.

Also, looking more closely, it seems like this recipe was intended for compiling a shared library, so it shouldn’t have a main function. You should really ask the developers of the project about its compilation. It doesn’t seem to be thoroughly tested or explained for general use.

 

 
  [ # 23 ]

Reza Electronics.

Your problems stem from your lack of experience and knowledge of compiling C on linux.  This is not a forum for learning that.  Many people have taken the very good instructions in the chatscript documentation and compiled chatscript embedded on windows, mac os, iOS, android, etc.  It’s not hard for an experienced and knowledgeable person. 

You should take a deep breath and start learning how to compile C libraries and including them in your C program on linux.  The instructions are adequate for the target audience, ie someone who knows how to compile and include libraries - a basic programming skill.

If you then find the documentation to be incomplete and poor you are invited to submit a pull request with better documentation.  Many of us have contributed to areas where we feel the documentation was lacking - it’s the positive spirit of contributing back to a framework you are using. 

Sorry for my direct tone, I don’t mean to insult you or belittle you.  I just felt it needed saying.

 

 
  [ # 24 ]
Todd Kuebler - Oct 16, 2017:

Reza Electronics.

Your problems stem from your lack of experience and knowledge of compiling C on linux.  This is not a forum for learning that.  Many people have taken the very good instructions in the chatscript documentation and compiled chatscript embedded on windows, mac os, iOS, android, etc.  It’s not hard for an experienced and knowledgeable person. 

You should take a deep breath and start learning how to compile C libraries and including them in your C program on linux.  The instructions are adequate for the target audience, ie someone who knows how to compile and include libraries - a basic programming skill.

If you then find the documentation to be incomplete and poor you are invited to submit a pull request with better documentation.  Many of us have contributed to areas where we feel the documentation was lacking - it’s the positive spirit of contributing back to a framework you are using. 

Sorry for my direct tone, I don’t mean to insult you or belittle you.  I just felt it needed saying.

https://unix.stackexchange.com/questions/396726/collect2-error-ld-returned-1-exit-status-makefile107-recipe-for-target-bina

https://askubuntu.com/questions/962983/collect2-error-ld-returned-1-exit-status-makefile107-recipe-for-target-bina

https://stackoverflow.com/questions/46661872/usr-lib-gcc-x86-64-linux-gnu-5-x86-64-linux-gnu-crt1-o-in-function

https://stackoverflow.com/questions/46559870/how-can-i-use-chatscript-library-with-function-in-my-own-program

I don’t know why I can not run a simple command “make server” and get compiled chatscript!

Ok I don’t know any thing about computer… I will be very happy if you help me to compile chatscript.

 

 < 1 2
2 of 2
 
  login or register to react