Неопределенная ссылка на main collect2 error ld returned 1 exit status

I tried to search for that bug online, but all the posts are for C++. This is the message: test1.o: In function `ReadDictionary': /home/johnny/Desktop/haggai/test1.c:13: undefined reference to `

I tried to search for that bug online, but all the posts are for C++.

This is the message:

test1.o: In function `ReadDictionary':
/home/johnny/Desktop/haggai/test1.c:13: undefined reference to `CreateDictionary'
collect2: error: ld returned 1 exit status
make: *** [test1] Error 1

It is super simple code, and I can’t understand what the problem is:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "dict.h"
#include "hash.h"


pHash ReadDictionary() {
    /* This function reads a dictionary line by line from the standard input. */
    pHash dictionary;
    char entryLine[100] = "";
    char *word, *translation;

    dictionary = CreateDictionary();
    while (scanf("%s", entryLine) == 1) { // Not EOF
        word = strtok(entryLine, "=");
        translation = strtok(NULL, "=");
        AddTranslation(dictionary, word, translation);
    }
    return dictionary;
}

int main() {
    pHash dicti;
...

Now this is the header file dict.h:

#ifndef _DICT_H_
#define _DICT_H_

#include "hash.h"

pHash CreateDictionary();
...

#endif

And here is the dict.c file:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "hash.h"
#include "dict.h"


pHash CreateDectionary()
{
    pHash newDict;
    newDict = HashCreate(650, HashWord, PrintEntry, CompareWords, GetEntryKey, DestroyEntry);
    return newDict;
}

And if you want to check file hash.h:

#ifndef _HASH_H_
#define _HASH_H_

// Type definitions //
typedef enum {FAIL = 0, SUCCESS} Result;
typedef enum {SAME = 0, DIFFERENT} CompResult;

typedef struct _Hash Hash, *pHash;

typedef void* pElement;
typedef void* pKey;

// Function types //
typedef int (*HashFunc) (pKey key, int size);
typedef Result (*PrintFunc) (pElement element);
typedef CompResult (*CompareFunc) (pKey key1, pKey key2);
typedef pKey (*GetKeyFunc) (pElement element);
typedef void (*DestroyFunc)(pElement element);
...

// Interface functions //

#endif

Maybe it will be easier if I give you the files here?

Anyway, I will be happy for tips on how to understand the problem.

I tried to search for that bug online, but all the posts are for C++.

This is the message:

test1.o: In function `ReadDictionary':
/home/johnny/Desktop/haggai/test1.c:13: undefined reference to `CreateDictionary'
collect2: error: ld returned 1 exit status
make: *** [test1] Error 1

It is super simple code, and I can’t understand what the problem is:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "dict.h"
#include "hash.h"


pHash ReadDictionary() {
    /* This function reads a dictionary line by line from the standard input. */
    pHash dictionary;
    char entryLine[100] = "";
    char *word, *translation;

    dictionary = CreateDictionary();
    while (scanf("%s", entryLine) == 1) { // Not EOF
        word = strtok(entryLine, "=");
        translation = strtok(NULL, "=");
        AddTranslation(dictionary, word, translation);
    }
    return dictionary;
}

int main() {
    pHash dicti;
...

Now this is the header file dict.h:

#ifndef _DICT_H_
#define _DICT_H_

#include "hash.h"

pHash CreateDictionary();
...

#endif

And here is the dict.c file:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "hash.h"
#include "dict.h"


pHash CreateDectionary()
{
    pHash newDict;
    newDict = HashCreate(650, HashWord, PrintEntry, CompareWords, GetEntryKey, DestroyEntry);
    return newDict;
}

And if you want to check file hash.h:

#ifndef _HASH_H_
#define _HASH_H_

// Type definitions //
typedef enum {FAIL = 0, SUCCESS} Result;
typedef enum {SAME = 0, DIFFERENT} CompResult;

typedef struct _Hash Hash, *pHash;

typedef void* pElement;
typedef void* pKey;

// Function types //
typedef int (*HashFunc) (pKey key, int size);
typedef Result (*PrintFunc) (pElement element);
typedef CompResult (*CompareFunc) (pKey key1, pKey key2);
typedef pKey (*GetKeyFunc) (pElement element);
typedef void (*DestroyFunc)(pElement element);
...

// Interface functions //

#endif

Maybe it will be easier if I give you the files here?

Anyway, I will be happy for tips on how to understand the problem.

Каталог статей

    • 1. Найдите расположение файла библиотеки в Linux.
    • 2. Как просмотреть функции, содержащиеся в библиотеке
    • 3. Раздражающая неопределенная ссылка на
    • 4. Решение проблемы gcc «неопределенная ссылка на»
    • 5. Ошибка динамической библиотеки линковки gcc в Linux: разница между LIBRARY_PATH и LD_LIBRARY_PATH

1. Найдите расположение файла библиотеки в Linux.

 ldconfig -p | grep libcrypto

2. Как просмотреть функции, содержащиеся в библиотеке

  • Используйте команду nm системы Linux. Это просто. У меня возникла проблема, когда я его использовал:
1) Например, nm lib_a.so。
 Итак, введите следующую команду:
nm -Do lib_a.so
 Вы можете увидеть библиотечные функции внутри.

(2)nm libyolo.so | grep 'compute_box_iou'
  U compute_box_iou
 Примечание: значение U само по себе является неопределенным значением undefined

 Описание:
(1) Вот.Файл so представляет собой файл библиотеки динамической компоновки. Файл эльфийский(Executable and Linkable Format)Тип файла, есть две таблицы символов, ".symtab "и".dynsym”。
(2) Просмотр таблицы динамических символов ".дынсым ", плюс-Вариант D;
(3)“.дынсым "только держать".глобальные символы в "symtab"(global symbols);
(4)nm lib_a.так просмотрено ".таблица символов для "symtab"
  • ldd + исполняемый файл, ldd + so библиотека
1#ldd main
linux-gate.so.1 => (0xb809c000)
libc.so.6 +> /lib/tls/i686/cmov/libc.so,6 (0x7f0c000)2# ldd   /usr/lib/aarch64-linux-gnu/libSM.so
linux-vdso.so.1 =>  (0x0000ffffb1b70000)
libICE.so.6 => /usr/lib/aarch64-linux-gnu/libICE.so.6 (0x0000ffffb1ae0000)
libuuid.so.1 => /lib/aarch64-linux-gnu/libuuid.so.1 (0x0000ffffb1ac0000)
libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000ffffb1970000)
/lib/ld-linux-aarch64.so.1 (0x0000ffffb1b80000)

3. Раздражающая неопределенная ссылка на

  • Обратите внимание на мысли:
Это вызвано неправильным использованием указанного ниже макроса защиты!
#ifndef ZW_STACK_ARRAY
#define ZW_STACK_ARRAY
 Спасибо zwlist.Этот макрос в h был определен, когда вы находитесь в zwlist.c содержит zwlist.Через час
#ifndef ZW_STACK_ARRAY больше не действует, все коды в zwlist.c напрямую игнорируются

4. Решение проблемы gcc «неопределенная ссылка на»

  • (1) Связанный целевой файл (.o) отсутствует при связывании
    Тестовый код выглядит следующим образом:

    Затем скомпилируйте.
gcc -c test.c  
gcc –c main.c 
 Получить два .o файл, один главный.о, один тест.о, то связываем .o Получить исполняемую программу:

gcc -o main main.o 
 В это время вы обнаружите, что сообщается об ошибке:

main.o: In function `main':  
main.c:(.text+0x7): undefined reference to `test'  
collect2: ld returned 1 exit status 
Это наиболее типичная ошибка неопределенной ссылки, поскольку обнаруживается, что файл реализации определенной функции не может быть найден при связывании. В этом случае проверьте.o файл содержит тест()Реализация функции,
 Так что, если вы сделаете ссылку таким образом, все будет хорошо.
gcc -o main main.o test.o 
  • (2) Связанные файлы библиотеки (.a / .so) отсутствуют при компоновке
  Сначала скомпилируйте test.c в статическую библиотеку(.a)файл

gcc -c test.c  
ar -rc test.a test.o 
 На данный момент у нас есть файл test.a. Начинаем компилировать main.c

gcc -c main.c 
 В это время создается файл main.o, а затем мы связываемся с помощью следующей команды, чтобы получить исполняемую программу.

gcc -o main main.o 
 Вы обнаружите, что компилятор сообщил об ошибке:

/tmp/ccCPA13l.o: In function `main':  
main.c:(.text+0x7): undefined reference to `test'  
collect2: ld returned 1 exit status 
 Основная причина в том, что тест не может быть найден()Файл реализации функции, потому что тест()Реализация функции находится в статической библиотеке test.a,
 Следовательно, при компоновке вам необходимо добавить библиотеку test.a после этого и изменить команду компоновки на следующую форму.
 gcc -o main main.o ./test.a // Примечание: ./ - это путь к test.a 
  • (3) Другой файл библиотеки используется в файле связанной библиотеки.
Как видно из рисунка выше, main.c вызывает функцию test.c, а test.c вызывает функцию fun.c.
 Сначала мы компилируем fun.c, test.c и main.c для создания файлов .o.

gcc -c func.c  
gcc -c test.c  
gcc -c main.c 
 Затем test.c и func.c упаковываются в файлы статической библиотеки.

ar –rc func.a func.o  
ar –rc test.a test.o 
 На данный момент мы готовы связать main.o как исполняемую программу, потому что наш main.c содержит тест()Вызов,
 Следовательно, при компоновке в качестве файла нашей библиотеки следует использовать test.a. Команда компоновки выглядит следующим образом.
gcc -o main main.o test.a 
 В это время компилятор по-прежнему сообщает об ошибке следующим образом:
test.a(test.o): In function `test':  
test.c:(.text+0x13): undefined reference to `func'  
collect2: ld returned 1 exit status 

 Другими словами, при компоновке мы обнаружили, что наш test.a называется func()Функция, соответствующей реализации не найдено.
 Из этого мы обнаружили, что нам все еще нужно добавить файл библиотеки, на который ссылается test.a, для успешного связывания, поэтому команда выглядит следующим образом.
gcc -o main main.o test.a func.a 
  • (4) Последовательность связывания нескольких файлов библиотеки
  Такого рода проблемы также очень скрыты, и вы можете почувствовать себя сбитым с толку, если не изучите их внимательно.
   Мы по-прежнему возвращаемся к вопросам, обсуждаемым в разделе 3. В конце, если мы изменим порядок связанных библиотек, посмотрим, что произойдет?

gcc -o main main.o func.a test.a 
   Мы получим следующую ошибку.
test.a(test.o): In function `test':  
test.c:(.text+0x13): undefined reference to `func'  
collect2: ld returned 1 exit status 

 Следовательно, нам нужно обращать внимание на порядок зависимости между библиотеками при предоставлении зависимых библиотек в команде компоновки.
 Библиотеки, которые зависят от других библиотек, должны быть размещены перед зависимыми библиотеками, чтобы действительно избежать ошибок неопределенных ссылок и полной компиляции и компоновки.
 Чем больше вы называете чужую библиотеку более высокого уровня, тем больше вы ставите ее впереди.
  • (5) Связывание библиотеки языка C с кодом C ++.
Если ваш файл библиотеки создается кодом c, вы также столкнетесь с проблемой неопределенной ссылки при компоновке библиотечных функций в коде c ++.
 Ниже приводится пример.
 Сначала напишите файл библиотеки версии языка C: 
 Скомпилировать и упаковать как статическую библиотеку: test.a

gcc -c test.c  
ar -rc test.a test.o 
 На данный момент у нас есть файл test.a. Далее мы начинаем писать файл C ++ main.cpp

Затем скомпилируйте main.cpp для создания исполняемой программы:
g++ -o main main.cpp test.a 
 Вы обнаружите ошибку:
/tmp/ccJjiCoS.o: In function `main': 
main.cpp:(.text+0x7): undefined reference to `test()' 
collect2: ld returned 1 exit status 

 Причина в том, что main.cpp - это код C ++, который вызывает функцию библиотеки языка C, поэтому его нельзя найти при компоновке.
 Решение: в main.cpp включите файл заголовка, связанный с библиотекой языка c test.a, и добавьте extern "C"Заявление может быть.
 Например, модифицированный main.cpp выглядит следующим образом:

g++ -o main main.cpp test.a 
 Повторная компиляция обнаружит, что проблема была успешно решена.

5. Ошибка динамической библиотеки линковки gcc в Linux: разница между LIBRARY_PATH и LD_LIBRARY_PATH

  • При компиляции Linux gcc путь поиска динамической библиотеки Последовательность пути поиска динамической библиотеки следующая(Обратите внимание, что он не будет выполнять рекурсивный поиск в своих подкаталогах):
1. Параметр -L в командах компиляции и компоновки gcc;
 2. LIBRARY_PATH переменных среды gcc (несколько путей разделяются двоеточиями);
 3. Каталог динамических библиотек Gcc по умолчанию: / lib: / usr / lib: usr / lib64: / usr / local / lib.
  • Когда Linux gcc связан, для создания исполняемых двоичных файлов путь поиска динамической библиотеки выглядит следующим образом:
1. Путь поиска динамической библиотеки, указанный при компиляции целевого кода: путь поиска динамической библиотеки, указанный с помощью параметров -Wl, rpath и include, таких как gcc -Wl,
 -rpath, include -L. -ldltest hello.c, путь будет найден при запуске файла`./include`;
 2. Переменная среды LD_LIBRARY_PATH (несколько путей разделяются двоеточиями);
 3. Абсолютный путь к динамической библиотеке, указанный в файле конфигурации в каталоге /etc/ld.so.conf.d/ (действителен через ldconfig, обычно используется для пользователей без полномочий root);
 4. Каталог динамических библиотек Gcc по умолчанию: / lib: / usr / lib: usr / lib64: / usr / local / lib и т. Д.
  • Справка:
gcc "undefined reference to" Метод решения проблемы
https://blog.csdn.net/qq_16542775/article/details/81353841

C++  Использовать библиотеку динамической компоновки xx.Ошибка неопределенной ссылки возникает, когда
https://blog.csdn.net/yaoqi_isee/article/details/69948506

 Раздражающая неопределенная ссылка на... 
https://bbs.csdn.net/topics/330055272

 Найдите расположение файла библиотеки в Linux
https://blog.csdn.net/fanhenghui/article/details/89378785

"undefined reference to"  Метод решения проблемы
https://blog.csdn.net/aiwoziji13/article/details/7330333

 Как просмотреть функции, содержащиеся в библиотеке
https://blog.csdn.net/ostar_liang/article/details/14161799

"undefined reference to"  Краткое описание проблемы и решение
https://segmentfault.com/a/1190000006049907?utm_source=tuicool&utm_medium=referral

 Проблема порядка ссылок библиотеки gcc
https://www.cnblogs.com/ironx/p/4939508.html

 Ошибка динамической библиотеки Linux gcc link: разница между LIBRARY_PATH и LD_LIBRARY_PATH
https://www.cnblogs.com/icxy/p/7943996.html

Why is the collect error ld returned exit status happeningThe collect2: error: ld returned 1 exit status error message is easily fixed by removing an existing executable file inside your document. It is possible to remove the existing file that is running in the background by accessing the thread tools inside your system. The complete process is easy to do and only consists of a couple of steps.

If you want to become an expert at fixing this undefined reference in your program, keep reading this complete guide that contains all the details.

Why Is the collect2: Error: Ld Returned 1 Exit Status Happening?

This specific collect2: error: ld returned 1 exit status error message appears due to previous errors in your document, especially when working with C++. It represents one of the most common errors web developers face but it is also one of the easiest ones to fix. In other words, this error is there to indicate that the linking step in the process of creating faced certain problems.

This is going to create an undefined reference because the exit status is more than the value of zero. You can run multiple steps to create a search thread that is going to eliminate the problem. We are going to list and explain the various methods you can use to fix this error in your document. Continue reading the following section of this article to learn more about the debugging process.

How To Fix This Error Inside Your Program

The easiest and most common method of fixing this error requires you to completely delete the existing executable file that is running in the background of your program. However, as is the case with most other bugs, this solution might not work for everyone and every single time. Lucky for you, programming languages allow users to fix an error in multiple ways, in case any of the previous ones does not work.

This is called a process of debugging, where you are trying to completely remove an error you have encountered in your program. No matter how serious the error may be, the debugging process always starts with an inspection of the problem. After that, locate where the error is coming from and apply all the necessary changes to the code.

Let us now learn something more about the ways of debugging this error.

– Listing All the Possible Methods for Debugging This Error

In this part of the guide, we are going to list the possible methods for debugging and also briefly explain their function. Let us take a deep dive at the following list that shows the most common ways of fixing this error:

  • Deleting the existing executable file inside your program: The file may have failed because it is locked in a different location, such as an antivirus.
  • It is possible to try and rename that specific executable file in your program. Then, you are supposed to restructure the contents, and you are done. Renaming the file helps the program to create an additional executable file.
  • In case none of this works, you should try restarting your computer and redo the first step. This solution shows that debugging does not always have to be complicated.

In theory, this is all it takes to completely remove this error from your syntax. However, it is always best to learn from examples. That is why in the following section of this article, we are going to show you example codes to easily fix this error.

– A Common Error in the Gem Native Extension

Many web developers face certain problems once working with extensions for their browsers. One such bug appears when you are trying to install a gem inside the native extension on your browser.

The reason why we are explaining the native extension is that the collect2 error usually appears during the process of installing a gem. To better understand what this means, you should take a look at the complete syntax.

Take a closer look at the following code that is going to initiate the collect2 error:

Building a proper native extension.  This might take a while…

ERROR:  Error installing json:
ERROR: Failed to generate gem native extension.
/home/foobar/.rvm/ruby-2.4.7/bin/ruby -r ./siteconf134617815-3312439-1i9lahdrj.rb extconf.rb
creating Makefile
make “DESTDIR=” clean
make “DESTDIR=”
compiling generator.c
linking shared-object json/ext/generator.so
/usr/bin/ld: cannot find -lgmp
collect2: error: ld returned 1 exit status
make: *** [generator.so] Error 1
make failed, exit code 2

Gem files will remain installed in /home/foobar/.rvm/gems/ruby-2.4.7/gems/json-1.8.3 for inspection.

Results logged to /home/foobar/.rvm/gems/ruby-2.4.7/extensions/x86_64-linux/2.2.0/json-1.8.3/gem_make.out

As you can see, this is the complete code for the collect2 error inside your program. There is certainly something you can do to the syntax to debug this error and make the program functional again. Indeed, we are going to change some things in the library and this is going to completely remove the error. Take a look at the following section of this article to learn more.

– Using the Debugging Library Syntax for the collect2 Error

As previously explained, you are supposed to change certain things inside the library to fix this error. For this, you are going to need the gmp function to locate the correct files and return the incorrect status. Open the code with the cache search gmp function and include all the additional tools inside.

The following syntax shows how to properly use the gmp function to fix this error:

$ apt-cache search gmp
libgmp-dev – Multiprecision arithmetic library developers tools
libgmp10 – Multiprecision arithmetic library
libgmp10-doc – Multiprecision arithmetic library example code
libgmp3-dev – Multiprecision arithmetic library developers tools
libgmpxx4ldbl – Multiprecision arithmetic library (C++ bindings)
[…]

Be aware that the syntax may be subject to changes. As this example shows, the annoying collect2 error does not have to be complicated to locate and fix. However, pay attention to the exact location of the gmp function because this may sometimes be the difference between a correctly and incorrectly executed code. Let us now learn other things about this common error in your program.

– Facing This Error in Dev C++

As previously explained, the collect2 error may usually appear once working with Dev C++. It refers to a specific reference to a name where the linker cannot define the way it looks based on the object files. This also applies to all the libraries that make up your document.

Lucky for you, fixing the error is done in the same manner as previously taught. All you have to do is to follow the steps discussed in this article and the problem is going to disappear. To learn more about this error, continue reading the FAQ section of this article.

FAQs

Here are the answers to some of your questions regarding this error.

– What Is collect2 Exe?

Collect2 represents a utility that web developers use to arrange certain initialization functions during the start time. In other words, it is used to link the program and the adequate functions, while creating a table inside a temporary file. Then, it is going to create a second link with the program but include a different file.

– What Does Error 1d Returned 1 Exit Status Mean?

The returned 1 status refers to an error in your document that is created due to previous errors. It is used as an indicator to point out that certain linking steps during the building process have bugs. To fix the error, you are supposed to refer to all the previous functions and locate the part of the program that is operating incorrectly.

– How To Combine Two Files in C++?

You can start combining two files in C++ by creating two separate source files on your server. The process of combining two C++ files is important because you can combine two different programs and functions. Since the collect2 error usually appears during this process, it is important to understand how the files are merged together.

There are several steps you are supposed to closely follow, as shown in the following list:

  1. Create two separate C++ source files on your server.
  2. Both files should be saved inside the same location on the server.
  3. Open the Command Prompt tool and run the various commands from your files.
  4. The tool is going to merge the two separate source files together and comply their functions.
  5. Install the C++ Complier Program to run the newly-created file without any bugs.

This is all it takes to create a complex C++ file without facing any collect2 errors in your server. You can use this method for any two C++ files.

This section wraps everything important you were supposed to know about the collect2 error in your document. Let us now summarize the details.

Final Conclusion and Further Notes

This specific exit status error message is easily fixed by removing an existing executable file inside your document. Let us take a deep dive at the following list that contains all the important details from this article:

  • The collect2 error is easily fixed by shutting down a program that is running in the background
  • Web developers usually face this problem once working with Dev C++ and other files
  • The Gem native extension usually displays this error alongside the complete syntax but it can be easily fixed
  • It is important to know the meaning of collect2 to debug the error more efficiently
  • It is possible to merge two C++ source files in five basic steps without caring about this error

How to fix collect error ld returned exit status errorWeb developers are constantly struggling with the collect2 error inside their syntax and are unable to debug it. Lucky for you, now you know all the details to remove this error from your document without affecting the rest of the syntax.

  • Author
  • Recent Posts

Position is Everything

Position Is Everything: Your Go-To Resource for Learn & Build: CSS,JavaScript,HTML,PHP,C++ and MYSQL.

Position is Everything

I am trying to compile ChatScript V7.55 on Ubuntu 16.04 but I got this error message:

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

What is this and how can I fix?

This is the whole result after tried this command: make server

************ LINUX VERSION ************
g++ constructCode.o duktape/duktape.c evserver.o csocket.o cs_ev.c dictionarySystem.o englishTagger.o factSystem.o json.o functionExecute.o english.o infer.o javascript.o jsmn.o markSystem.o mongodb.o os.o outputSystem.o patternSystem.o postgres.o privatesrc.o scriptCompile.o spellcheck.o secure.o systemVariables.o tagger.o testing.o textUtilities.o tokenSystem.o topicSystem.o userCache.o userSystem.o variableSystem.o mainSystem.o -L/usr/lib64 -lrt -lcurl  --verbose -pthread -DLOCKUSERFILE=1  -DEVSERVER=1 -DEVSERVER_FORK=1  -DDISCARDPOSTGRES=1 -DDISCARDMONGO=1 -DDISCARDMYSQL=1  -Ievserver -o ../BINARIES/ChatScript
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.4' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 
COLLECT_GCC_OPTIONS='-L/usr/lib64' '-v' '-pthread' '-D' 'LOCKUSERFILE=1' '-D' 'EVSERVER=1' '-D' 'EVSERVER_FORK=1' '-D' 'DISCARDPOSTGRES=1' '-D' 'DISCARDMONGO=1' '-D' 'DISCARDMYSQL=1' '-I' 'evserver' '-o' '../BINARIES/ChatScript' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/5/cc1plus -quiet -v -I evserver -imultiarch x86_64-linux-gnu -D_GNU_SOURCE -D_REENTRANT -D LOCKUSERFILE=1 -D EVSERVER=1 -D EVSERVER_FORK=1 -D DISCARDPOSTGRES=1 -D DISCARDMONGO=1 -D DISCARDMYSQL=1 duktape/duktape.c -quiet -dumpbase duktape.c -mtune=generic -march=x86-64 -auxbase duktape -version -fstack-protector-strong -Wformat -Wformat-security -o /tmp/ccz9862e.s
GNU C++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) version 5.4.0 20160609 (x86_64-linux-gnu)
    compiled by GNU C version 5.4.0 20160609, GMP version 6.1.0, MPFR version 3.1.4, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/5"
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/5/../../../../x86_64-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 evserver
 /usr/include/c++/5
 /usr/include/x86_64-linux-gnu/c++/5
 /usr/include/c++/5/backward
 /usr/lib/gcc/x86_64-linux-gnu/5/include
 /usr/local/include
 /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
GNU C++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) version 5.4.0 20160609 (x86_64-linux-gnu)
    compiled by GNU C version 5.4.0 20160609, GMP version 6.1.0, MPFR version 3.1.4, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: c3fdb80f2154421ceaf9e22c85325a8d
COLLECT_GCC_OPTIONS='-L/usr/lib64' '-v' '-pthread' '-D' 'LOCKUSERFILE=1' '-D' 'EVSERVER=1' '-D' 'EVSERVER_FORK=1' '-D' 'DISCARDPOSTGRES=1' '-D' 'DISCARDMONGO=1' '-D' 'DISCARDMYSQL=1' '-I' 'evserver' '-o' '../BINARIES/ChatScript' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
 as -v -I evserver --64 -o /tmp/ccm8SVai.o /tmp/ccz9862e.s
GNU assembler version 2.26.1 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.26.1
COLLECT_GCC_OPTIONS='-L/usr/lib64' '-v' '-pthread' '-D' 'LOCKUSERFILE=1' '-D' 'EVSERVER=1' '-D' 'EVSERVER_FORK=1' '-D' 'DISCARDPOSTGRES=1' '-D' 'DISCARDMONGO=1' '-D' 'DISCARDMYSQL=1' '-I' 'evserver' '-o' '../BINARIES/ChatScript' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/5/cc1plus -quiet -v -I evserver -imultiarch x86_64-linux-gnu -D_GNU_SOURCE -D_REENTRANT -D LOCKUSERFILE=1 -D EVSERVER=1 -D EVSERVER_FORK=1 -D DISCARDPOSTGRES=1 -D DISCARDMONGO=1 -D DISCARDMYSQL=1 cs_ev.c -quiet -dumpbase cs_ev.c -mtune=generic -march=x86-64 -auxbase cs_ev -version -fstack-protector-strong -Wformat -Wformat-security -o /tmp/ccz9862e.s
GNU C++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) version 5.4.0 20160609 (x86_64-linux-gnu)
    compiled by GNU C version 5.4.0 20160609, GMP version 6.1.0, MPFR version 3.1.4, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/5"
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/5/../../../../x86_64-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 evserver
 /usr/include/c++/5
 /usr/include/x86_64-linux-gnu/c++/5
 /usr/include/c++/5/backward
 /usr/lib/gcc/x86_64-linux-gnu/5/include
 /usr/local/include
 /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
GNU C++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) version 5.4.0 20160609 (x86_64-linux-gnu)
    compiled by GNU C version 5.4.0 20160609, GMP version 6.1.0, MPFR version 3.1.4, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: c3fdb80f2154421ceaf9e22c85325a8d
In file included from cs_ev.c:5:0:
evserver/ev.c:1254:31: warning: ‘ev_default_loop_ptr’ initialized and declared ‘extern’
   EV_API_DECL struct ev_loop *ev_default_loop_ptr = 0; /* needs to be initialised to make it a definition despite extern */
                               ^
COLLECT_GCC_OPTIONS='-L/usr/lib64' '-v' '-pthread' '-D' 'LOCKUSERFILE=1' '-D' 'EVSERVER=1' '-D' 'EVSERVER_FORK=1' '-D' 'DISCARDPOSTGRES=1' '-D' 'DISCARDMONGO=1' '-D' 'DISCARDMYSQL=1' '-I' 'evserver' '-o' '../BINARIES/ChatScript' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
 as -v -I evserver --64 -o /tmp/ccRZyE1l.o /tmp/ccz9862e.s
GNU assembler version 2.26.1 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.26.1
COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-L/usr/lib64' '-v' '-pthread' '-D' 'LOCKUSERFILE=1' '-D' 'EVSERVER=1' '-D' 'EVSERVER_FORK=1' '-D' 'DISCARDPOSTGRES=1' '-D' 'DISCARDMONGO=1' '-D' 'DISCARDMYSQL=1' '-I' 'evserver' '-o' '../BINARIES/ChatScript' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper -plugin-opt=-fresolution=/tmp/ccIwnEUp.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o ../BINARIES/ChatScript /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o -L/usr/lib64 -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. constructCode.o /tmp/ccm8SVai.o evserver.o csocket.o /tmp/ccRZyE1l.o dictionarySystem.o englishTagger.o factSystem.o json.o functionExecute.o english.o infer.o javascript.o jsmn.o markSystem.o mongodb.o os.o outputSystem.o patternSystem.o postgres.o privatesrc.o scriptCompile.o spellcheck.o secure.o systemVariables.o tagger.o testing.o textUtilities.o tokenSystem.o topicSystem.o userCache.o userSystem.o variableSystem.o mainSystem.o -lrt -lcurl -lstdc++ -lm -lgcc_s -lgcc -lpthread -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/5/crtend.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
evserver.o: In function `evsrv_do_chat(Client_t*)':
evserver.cpp:(.text+0x161a): undefined reference to `LogChat(long, char*, char*, char*, int, char*, char*)'
mainSystem.o: In function `InitSystem(int, char**, char*, char*, char*, USERFILESYSTEM*, void (*)(char*), void (*)(char*))':
mainSystem.cpp:(.text+0x2687): undefined reference to `ReadTopicFiles(char*, unsigned int, int)'
mainSystem.cpp:(.text+0x273d): undefined reference to `ReadTopicFiles(char*, unsigned int, int)'
collect2: error: ld returned 1 exit status
Makefile:107: recipe for target 'binary' failed
make: *** [binary] Error 1

This is the make file contents too: https://github.com/bwilcox-1234/ChatScript/blob/master/SRC/Makefile

I ran ./autogen.sh inside the ../SRC/evserver and this is the results:

libtoolize: putting auxiliary files in '.'.
libtoolize: linking file './ltmain.sh'
libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac,
libtoolize: and rerunning libtoolize and aclocal.
libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
configure.ac:6: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated.  For more info, see:
configure.ac:6: http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation
configure.ac:10: installing './compile'
configure.ac:6: installing './missing'
Makefile.am: installing './depcomp'

After that ran ./configure inside ../SRC/evserver and this is the result:

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
configure: WARNING: Libtool does not cope well with whitespace in `pwd`
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %sn
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking sys/inotify.h usability... yes
checking sys/inotify.h presence... yes
checking for sys/inotify.h... yes
checking sys/epoll.h usability... yes
checking sys/epoll.h presence... yes
checking for sys/epoll.h... yes
checking sys/event.h usability... no
checking sys/event.h presence... no
checking for sys/event.h... no
checking port.h usability... no
checking port.h presence... no
checking for port.h... no
checking poll.h usability... yes
checking poll.h presence... yes
checking for poll.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/eventfd.h usability... yes
checking sys/eventfd.h presence... yes
checking for sys/eventfd.h... yes
checking sys/signalfd.h usability... yes
checking sys/signalfd.h presence... yes
checking for sys/signalfd.h... yes
checking for inotify_init... yes
checking for epoll_ctl... yes
checking for kqueue... no
checking for port_create... no
checking for poll... yes
checking for select... yes
checking for eventfd... yes
checking for signalfd... yes
checking for clock_gettime... yes
checking for nanosleep... yes
checking for library containing floor... -lm
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands

This is make server result after them:

************ LINUX VERSION ************
g++ constructCode.o duktape/duktape.c evserver.o csocket.o cs_ev.c dictionarySystem.o englishTagger.o factSystem.o json.o functionExecute.o english.o infer.o javascript.o jsmn.o markSystem.o mongodb.o os.o outputSystem.o patternSystem.o postgres.o privatesrc.o scriptCompile.o spellcheck.o secure.o systemVariables.o tagger.o testing.o textUtilities.o tokenSystem.o topicSystem.o userCache.o userSystem.o variableSystem.o mainSystem.o -L/usr/lib64 -lrt -lcurl  --verbose -pthread -DLOCKUSERFILE=1  -DEVSERVER=1 -DEVSERVER_FORK=1  -DDISCARDPOSTGRES=1 -DDISCARDMONGO=1 -DDISCARDMYSQL=1  -Ievserver -o ../BINARIES/ChatScript
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.4' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 
COLLECT_GCC_OPTIONS='-L/usr/lib64' '-v' '-pthread' '-D' 'LOCKUSERFILE=1' '-D' 'EVSERVER=1' '-D' 'EVSERVER_FORK=1' '-D' 'DISCARDPOSTGRES=1' '-D' 'DISCARDMONGO=1' '-D' 'DISCARDMYSQL=1' '-I' 'evserver' '-o' '../BINARIES/ChatScript' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/5/cc1plus -quiet -v -I evserver -imultiarch x86_64-linux-gnu -D_GNU_SOURCE -D_REENTRANT -D LOCKUSERFILE=1 -D EVSERVER=1 -D EVSERVER_FORK=1 -D DISCARDPOSTGRES=1 -D DISCARDMONGO=1 -D DISCARDMYSQL=1 duktape/duktape.c -quiet -dumpbase duktape.c -mtune=generic -march=x86-64 -auxbase duktape -version -fstack-protector-strong -Wformat -Wformat-security -o /tmp/ccY9JQBg.s
GNU C++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) version 5.4.0 20160609 (x86_64-linux-gnu)
    compiled by GNU C version 5.4.0 20160609, GMP version 6.1.0, MPFR version 3.1.4, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/5"
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/5/../../../../x86_64-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 evserver
 /usr/include/c++/5
 /usr/include/x86_64-linux-gnu/c++/5
 /usr/include/c++/5/backward
 /usr/lib/gcc/x86_64-linux-gnu/5/include
 /usr/local/include
 /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
GNU C++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) version 5.4.0 20160609 (x86_64-linux-gnu)
    compiled by GNU C version 5.4.0 20160609, GMP version 6.1.0, MPFR version 3.1.4, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: c3fdb80f2154421ceaf9e22c85325a8d
COLLECT_GCC_OPTIONS='-L/usr/lib64' '-v' '-pthread' '-D' 'LOCKUSERFILE=1' '-D' 'EVSERVER=1' '-D' 'EVSERVER_FORK=1' '-D' 'DISCARDPOSTGRES=1' '-D' 'DISCARDMONGO=1' '-D' 'DISCARDMYSQL=1' '-I' 'evserver' '-o' '../BINARIES/ChatScript' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
 as -v -I evserver --64 -o /tmp/ccBVYgwH.o /tmp/ccY9JQBg.s
GNU assembler version 2.26.1 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.26.1
COLLECT_GCC_OPTIONS='-L/usr/lib64' '-v' '-pthread' '-D' 'LOCKUSERFILE=1' '-D' 'EVSERVER=1' '-D' 'EVSERVER_FORK=1' '-D' 'DISCARDPOSTGRES=1' '-D' 'DISCARDMONGO=1' '-D' 'DISCARDMYSQL=1' '-I' 'evserver' '-o' '../BINARIES/ChatScript' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/5/cc1plus -quiet -v -I evserver -imultiarch x86_64-linux-gnu -D_GNU_SOURCE -D_REENTRANT -D LOCKUSERFILE=1 -D EVSERVER=1 -D EVSERVER_FORK=1 -D DISCARDPOSTGRES=1 -D DISCARDMONGO=1 -D DISCARDMYSQL=1 cs_ev.c -quiet -dumpbase cs_ev.c -mtune=generic -march=x86-64 -auxbase cs_ev -version -fstack-protector-strong -Wformat -Wformat-security -o /tmp/ccY9JQBg.s
GNU C++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) version 5.4.0 20160609 (x86_64-linux-gnu)
    compiled by GNU C version 5.4.0 20160609, GMP version 6.1.0, MPFR version 3.1.4, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/5"
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/5/../../../../x86_64-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 evserver
 /usr/include/c++/5
 /usr/include/x86_64-linux-gnu/c++/5
 /usr/include/c++/5/backward
 /usr/lib/gcc/x86_64-linux-gnu/5/include
 /usr/local/include
 /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
GNU C++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) version 5.4.0 20160609 (x86_64-linux-gnu)
    compiled by GNU C version 5.4.0 20160609, GMP version 6.1.0, MPFR version 3.1.4, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: c3fdb80f2154421ceaf9e22c85325a8d
In file included from cs_ev.c:5:0:
evserver/ev.c:1254:31: warning: ‘ev_default_loop_ptr’ initialized and declared ‘extern’
   EV_API_DECL struct ev_loop *ev_default_loop_ptr = 0; /* needs to be initialis
                               ^
COLLECT_GCC_OPTIONS='-L/usr/lib64' '-v' '-pthread' '-D' 'LOCKUSERFILE=1' '-D' 'EVSERVER=1' '-D' 'EVSERVER_FORK=1' '-D' 'DISCARDPOSTGRES=1' '-D' 'DISCARDMONGO=1' '-D' 'DISCARDMYSQL=1' '-I' 'evserver' '-o' '../BINARIES/ChatScript' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
 as -v -I evserver --64 -o /tmp/ccWFo098.o /tmp/ccY9JQBg.s
GNU assembler version 2.26.1 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.26.1
COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-L/usr/lib64' '-v' '-pthread' '-D' 'LOCKUSERFILE=1' '-D' 'EVSERVER=1' '-D' 'EVSERVER_FORK=1' '-D' 'DISCARDPOSTGRES=1' '-D' 'DISCARDMONGO=1' '-D' 'DISCARDMYSQL=1' '-I' 'evserver' '-o' '../BINARIES/ChatScript' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper -plugin-opt=-fresolution=/tmp/cc9oL8PA.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lpthread -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o ../BINARIES/ChatScript /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o -L/usr/lib64 -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. constructCode.o /tmp/ccBVYgwH.o evserver.o csocket.o /tmp/ccWFo098.o dictionarySystem.o englishTagger.o factSystem.o json.o functionExecute.o english.o infer.o javascript.o jsmn.o markSystem.o mongodb.o os.o outputSystem.o patternSystem.o postgres.o privatesrc.o scriptCompile.o spellcheck.o secure.o systemVariables.o tagger.o testing.o textUtilities.o tokenSystem.o topicSystem.o userCache.o userSystem.o variableSystem.o mainSystem.o -lrt -lcurl -lstdc++ -lm -lgcc_s -lgcc -lpthread -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/5/crtend.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
Makefile:107: recipe for target 'binary' failed
make: *** [binary] Error 1

When I am trying to compile the host code using make command. It gave me this error:

`/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
make: *** [bin/host] Error 1
`

my main.cpp

#include<assert.h>
#include<math.h>
#include<cstring>


#include<CL/cl.h>
#include<time.h>

#include<CL/cl_ext.h>
#include<algorithm>
#include<iomanip>
#include<iostream>
#include <fstream>
#include <stdio.h>
#include <stdlib.h>
#include <array> 
#include <string.h>
#include <CL/opencl.h>

using namespace std;
using namespace aocl_utils;
void cleanup() {}

bool read_data_set(string filename, array<array<int, 20>, 5430>& array_X_dataset, array<int, 5430>& array_Y_dataset) {
    int field0, field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11,
        field12, field13, field14, field15, field16, field17, field18, field19, field20, field21;
    char comma;
    int line = 0;

    ifstream myfile(filename);

    if (myfile.is_open())
    {
        while (myfile
            >> field0 >> comma
            >> field1 >> comma
            >> field2 >> comma
            >> field3 >> comma
            >> field4 >> comma
            >> field5 >> comma
            >> field6 >> comma
            >> field7 >> comma
            >> field8 >> comma
            >> field9 >> comma
            >> field10 >> comma
            >> field11 >> comma
            >> field12 >> comma
            >> field13 >> comma
            >> field14 >> comma
            >> field15 >> comma
            >> field16 >> comma
            >> field17 >> comma
            >> field18 >> comma
            >> field19 >> comma
            >> field20 >> comma
            >> field21)
        {


            array<int, 20> inner_array{ field1, field2, field3, field4, field5, field6, field7, field8, field9, field10, field11,
            field12, field13, field14, field15, field16, field17, field18, field19, field20 };
            array_X_dataset[line] = inner_array;
            array_Y_dataset[line] = field21;
            line++;

        }

        myfile.close();

    }
    else {
        cout << "Unable to open file";
        return true;
    }
    return false;
}


void mix_dataset(array<array<int, 20>, 5430>& array_X_dataset, array<int, 5430>& array_Y_dataset) {
    size_t len = array_X_dataset.size();
    for (size_t i = 0; i < len; ++i) {
        size_t swap_index = rand() % len;  
        if (i == swap_index)
            continue;

        array<int, 20> data_point{  };
        data_point = array_X_dataset[i];
        array_X_dataset[i] = array_X_dataset[swap_index];
        array_X_dataset[swap_index] = data_point;
        int Y = array_Y_dataset[i];
        array_Y_dataset[i] = array_Y_dataset[swap_index];
        array_Y_dataset[swap_index] = Y;
    }
}




void split_dataset(int fold, int **array_X_set, int *array_Y_set,int **X_train, int *Y_train,
    int **X_test, int *Y_test) {
   int rows = 5430;
    int cols = 20;
    int division = 1086;
    switch (fold) {
    case 1:
              
        for (int i = 0; i < rows; ++i) {
            for (int j = 0; j < cols; ++j) {
                if (i < division) {
                    X_test[i][j] = array_X_set[i][j];
                    Y_test[i] = array_Y_set[i];
                }

                else {
                    X_train[i - division][j] = array_X_set[i][j];
                    Y_train[i - division] = array_Y_set[i];
                }
            }
        }
        break;

    case 2:
        
        for (int i = 0; i < rows; ++i) {
            for (int j = 0; j < cols; ++j) {
                if (i >= 1086 && i <= 2171) {
                    X_test[i - 1086][j] = array_X_set[i][j];
                    Y_test[i - 1086] = array_Y_set[i];
                }
                else {
                    if (i < 1086) {
                        X_train[i][j] = array_X_set[i][j];
                        Y_train[i] = array_Y_set[i];
                    }
                    else {
                        X_train[i - (2171 - 1086 + 1)][j] = array_X_set[i][j];
                        Y_train[i - (2171 - 1086 + 1)] = array_Y_set[i];
                    }
                }
            }
        }
        break;

    case 3:
        
        for (int i = 0; i < rows; ++i) {
            for (int j = 0; j < cols; ++j) {
                if (i >= 2172 && i <= 3257) {
                    X_test[i - 2172][j] = array_X_set[i][j];
                    Y_test[i - 2172] = array_Y_set[i];
                }

                else {
                    if (i < 2172) {
                        X_train[i][j] = array_X_set[i][j];
                        Y_train[i] = array_Y_set[i];
                    }
                    else
                    {
                        X_train[i - (3257 - 2172 + 1)][j] = array_X_set[i][j];
                        Y_train[i - (3257 - 2172 + 1)] = array_Y_set[i];

                    }
                }
            }
        }
        break;

    case 4:
        
        for (int i = 0; i < rows; ++i) {
            for (int j = 0; j < cols; ++j) {
                if (i >= 3258 && i <= 4343) {
                    X_test[i - 3258][j] = array_X_set[i][j];
                    Y_test[i - 3258] = array_Y_set[i];
                }

                else {
                    if (i < 3258) {
                        X_train[i][j] = array_X_set[i][j];
                        Y_train[i] = array_Y_set[i];
                    }
                    else
                    {
                        X_train[i - (4343 - 3258 + 1)][j] = array_X_set[i][j];
                        Y_train[i - (4343 - 3258 + 1)] = array_Y_set[i];

                    }
                }
            }
        }
        break;
    case 5:
        
        for (int i = 0; i < rows; ++i) {
            for (int j = 0; j < cols; ++j) {
                if (i >= 4344 && i <= 5429) {
                    X_test[i - 4344][j] = array_X_set[i][j];
                    Y_test[i - 4344] = array_Y_set[i];
                }

                else {
                    if (i < 4344) {
                        X_train[i][j] = array_X_set[i][j];
                        Y_train[i] = array_Y_set[i];
                    }
                    else
                    {
                        X_train[i - (5429 - 4344 + 1)][j] = array_X_set[i][j];
                        Y_train[i - (5429 - 4344 + 1)] = array_Y_set[i];

                    }
                }
            }
        }
        break;
    }

}



int main()
{
    
    string filename = ".//dataset.csv";
    static array<array<int, 20>, 5430> array_X_dataset{};
    static array<int, 5430> array_Y_dataset{};
   
    bool error = read_data_set(filename, array_X_dataset, array_Y_dataset);
    if (error) {
        cout << "Exiting with error while reading dataset file " << filename << endl;
        exit(-1);
    }
    
    


    
    
    srand(3);
    mix_dataset(array_X_dataset, array_Y_dataset);

    
   
     
    int* array_Y_set = new int[5430];
    int** array_X_set = new int* [5430];
    for (int i = 0; i < 5430; i++) {
        array_X_set[i] = new int[20];
    }
    
    for (int i = 0; i < 5430; i++) {
        for (int j = 0; j < 20; j++)
            array_X_set[i][j] = array_X_dataset[i][j];
        array_Y_set[i] = array_Y_dataset[i];
    }
  

    
    int* Y_train = new int[4344];
    int* Y_test = new int[1086];

    int** X_train = new int* [4344];
    for (int i = 0; i < 4344; i++) {
        X_train[i] = new int[20];
    }
    int** X_test = new int* [1086];
    for (int i = 0; i < 1086; i++) {
        X_test[i] = new int[20];
    }
    
    int fold = 1;    
   
     
    split_dataset(fold, array_X_set, array_Y_set, X_train, Y_train, X_test, Y_test);
   
   
    
   
    
   

    
    
    

    
    cl_platform_id fpga_paltform = NULL;
    if (clGetPlatformIDs(1, &fpga_paltform, NULL) != CL_SUCCESS) {
        printf("Unable to get platform_idn");
        return 1;
    }

    
    cl_device_id fpga_device = NULL;
    if (clGetDeviceIDs(fpga_paltform, CL_DEVICE_TYPE_ALL, 1, &fpga_device, NULL) != CL_SUCCESS) {
        printf("Unable to get device_idn");
        return 1;
    }

    
    cl_context context = clCreateContext(NULL, 1, &fpga_device, NULL, NULL, NULL);

    
    cl_command_queue queue = clCreateCommandQueue(context, fpga_device, 0, NULL);

    
    size_t length = 0x10000000;
    unsigned char* binary = (unsigned char*)malloc(length);
    FILE* fp = fopen("kernel.aocx", "rb");
    fread(binary, length, 1, fp);
    fclose(fp);

    
    cl_program program = clCreateProgramWithBinary(context, 1, &fpga_device, &length, (const unsigned char**)&binary, NULL, NULL);

    
    cl_kernel kernel = clCreateKernel(program, "KNN_classifier", NULL); 


    
    
    

    int host_output[4344];
    int k = 3;  
    int data_point[20] = {};
    for (int i = 0; i < 4344; ++i) {
        for (int j = 0; j < 20; ++j) {
            data_point[j] = array_X_set[i][j];
        }
    }

    cl_mem dev_X_train = clCreateBuffer(context, CL_MEM_READ_ONLY, sizeof(int) * 4344 * 20, X_train, NULL);
    cl_mem dev_Y_train = clCreateBuffer(context, CL_MEM_READ_ONLY, sizeof(int) * 4344, Y_train, NULL);
    cl_mem dev_data_point = clCreateBuffer(context, CL_MEM_READ_ONLY, sizeof(int) * 20, data_point, NULL);
    cl_mem dev_output = clCreateBuffer(context, CL_MEM_WRITE_ONLY, sizeof(int) * 4344, host_output, NULL);

    
    clEnqueueWriteBuffer(queue, dev_X_train, CL_TRUE, 0, sizeof(int) * 4344 * 20, X_train, 0, NULL, NULL);
    clEnqueueWriteBuffer(queue, dev_Y_train, CL_TRUE, 0, sizeof(int) * 4344, Y_train, 0, NULL, NULL);
    clEnqueueWriteBuffer(queue, dev_data_point, CL_TRUE, 0, sizeof(int) * 20, data_point, 0, NULL, NULL);

    
    clSetKernelArg(kernel, 0, sizeof(cl_mem), &dev_X_train);
    clSetKernelArg(kernel, 1, sizeof(cl_mem), &dev_Y_train);
    clSetKernelArg(kernel, 2, sizeof(cl_mem), &dev_data_point);
    clSetKernelArg(kernel, 3, sizeof(int), &k);
    clSetKernelArg(kernel, 4, sizeof(cl_mem), &dev_output);


    
    cl_event kernel_event;
    clEnqueueTask(queue, kernel, 0, NULL, &kernel_event);
    clWaitForEvents(1, &kernel_event);
    clReleaseEvent(kernel_event);

    
    clEnqueueReadBuffer(queue, dev_output, CL_TRUE, 0, sizeof(int) * 4344, host_output, 0, NULL, NULL);

    
    for (int i = 0; i < 4344; i++)
        printf("class_label[%d] = %dn", i, host_output[i]);


    clFlush(queue);
    clFinish(queue);
    
    clReleaseMemObject(dev_X_train);
    clReleaseMemObject(dev_Y_train);
    clReleaseMemObject(dev_data_point);
    clReleaseMemObject(dev_output);
    clReleaseKernel(kernel);
    clReleaseProgram(program);
    clReleaseCommandQueue(queue);
    clReleaseContext(context);

   
    
    
    
    for (int i = 0; i < 5430; i++) {
        delete[] array_X_set[i];
    }
    delete[] array_X_set;
    for (int i = 0; i < 4344; i++) {
        delete[] X_train[i];
    }
    delete[] X_test;
    for (int i = 0; i < 1086; i++) {
        delete[] X_test[i];
    }
    delete[] X_train;

    delete[] array_Y_set;
    delete[] Y_train;
    delete[] Y_test;
    free(data_point);
    free(host_output);

    return 0;
    
 }

What I have tried:

I am not sur why the compiler does not see my main function

  1. 09-22-2016


    #1

    jonasjonas is offline


    Registered User


    Undefined reference to main — collect2: ld returned 1 exit status

    I’m doing an assignment at school in C, but the program won’t run.

    I get the error: «/tmp/ccW7r5po.o:functions3.c.text+0x1b9): undefined reference to `myLog2’collect2: error: ld returned 1 exit status»

    Help anyone?

    Code:

    #include <stdio.h>
    
    void myTriangles (int numlines);
    int myPrimeFactor (int number, int primeFactor);
    void myNumbers (int startnum, int endnum);
    int myLog2(unsigned int n);
    
    
    
    
    int main ()
    {
        int numlines, number, primeFactor, startnum, endnum, result, operasjon, f;
        printf("Choose function.n");
        printf("1. myTriangles.n");
        printf("2. myPrimeFactor. n");
        printf("3. myNumbers. n");
        printf("4. myLog2. n");
        printf("5. reverseString. n");
        scanf ("%d",&operasjon);
        switch (operasjon)
        {
            
            case 1:
            {
            printf("Enter number of rows!n");
            scanf("%d",&numlines);
            myTriangles(numlines);
            }
            break;
            case 2:
            {
            printf("Enter a value.    ");
            scanf("%d",&number);
            printf("Enter a prime factor. n");
            scanf("%d",&primeFactor);
            f =    myPrimeFactor (number, primeFactor);
            printf("%d", f);
            }
            break;
            case 3:
            {
            printf("Enter a start number.n");
            scanf("%d", &startnum);
            printf("Enter an ending number.n");
            scanf("%d", &endnum);
            myNumbers(startnum, endnum);
            }
            break;
            case 4:
            {
            unsigned int n;
     
                printf("Pick a positive number: ");
                scanf("%d", &n);
     
                int result = myLog2(n);
                printf("The position of the most significant bit is %dnn", result);
            }
        }
    }
    
    
    // OPPGAVE 1
    void myTriangles (int numlines)
    {
        int i, j;
        
        for (i=1;i<=numlines;i++) 
        {
        for (j=1;j<=i;j++)
        {
            printf("*");
        }
            printf("n");
        }
    }
    // OPPGAVE 2    
    int myPrimeFactor (int number, int primeFactor)
    {
        int result = number % primeFactor;
    
    
        if(result == 0){
        return 1;
        }
        else
        {
        return 0;
        }
    }
    // OPPGAVE 3
    void myNumbers (int startnum, int endnum)
    {
        
            while (startnum <= endnum)
        {
            int result = myPrimeFactor(startnum, 5);
            
            if (startnum % 2 == 0 && result == 1) {
                printf("%d is even and 5 is a prime factorn",startnum);
            }
            else if (startnum % 2 == 1 && result == 1) {
                printf("%d is odd and 5 is a prime factorn",startnum);
            }    
            else if (startnum % 2 == 1 && result == 0) {
                printf("%d is odd and 5 is not a prime factorn",startnum);
            }
            else if (startnum % 2 == 0 && result == 0) {
                printf("%d is even and 5 is not a prime factorn",startnum);
            }
        startnum ++;
        }
        
    // OPPGAVE 4
    int myLog2(unsigned int n)
    {
        int result = 0;
       
        while (n > 1)
        {
            n = n >> 1;
            result++;
        }
        return result;
    }


  2. 09-22-2016


    #2

    jimblumberg is offline


    Registered User


    Check your spelling, remember that C is case sensitive.

    Jim


  3. 09-22-2016


    #3

    jonasjonas is offline


    Registered User


    Quote Originally Posted by jimblumberg
    View Post

    Check your spelling, remember that C is case sensitive.

    Jim

    Thanks for the reply.
    I have checked my spelling, but I can’t seem to find any problems at all when it comes to spelling..


  4. 09-22-2016


    #4

    laserlight is offline


    C++ Witch

    laserlight's Avatar


    When I compiled your code, my compiler gave three warnings and an error message:

    Code:

    test.c: In function ‘main’:
    test.c:55:19: warning: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘unsigned int *’ [-Wformat=]
                 scanf("%d", &n);
                       ^
    test.c:13:58: warning: unused variable ‘result’ [-Wunused-variable]
         int numlines, number, primeFactor, startnum, endnum, result, operasjon, f;
                                                              ^
    test.c: In function ‘myNumbers’:
    test.c:116:1: warning: ISO C forbids nested functions [-Wpedantic]
     int myLog2(unsigned int n)
     ^
    test.c:126:1: error: expected declaration or statement at end of input
     }
     ^

    The error is because you forgot the closing brace for your myNumbers function. Once I added that in, your program compiled with two warnings:

    Code:

    test.c: In function ‘main’:
    test.c:55:19: warning: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘unsigned int *’ [-Wformat=]
                 scanf("%d", &n);
                       ^
    test.c:13:58: warning: unused variable ‘result’ [-Wunused-variable]
         int numlines, number, primeFactor, startnum, endnum, result, operasjon, f;

    But I did not encounter the link error that you observed.

    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)

    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. «Finding the smallest program that demonstrates the error» is a powerful debugging tool.

    Look up a C++ Reference and learn How To Ask Questions The Smart Way


  5. 09-22-2016


    #5

    rstanley is offline


    Registered User

    rstanley's Avatar


    The problem is not with spelling.

    First of all, turn on and turn up your warning level to the highest level.

    Code:

    mylog.c:126:1: error: expected declaration or statement at end of input
     }
     ^

    One of the other problems that could have occurred is mismatched curly braces, square brackets, and parentheses. Start on the line in the error message I have shown you, and check each function, counting delimiters to see if this might be your problem. HINT! HINT!

    Use a programmers editor or IDE that will highlight matching braces, etc…, or look in the documentation how to turn it on. This will save you a lot of time and frustration.


  6. 09-23-2016


    #6

    swgh is offline


    Its hard… But im here

    swgh's Avatar


    The missing brace at the end of the function (as laserlight stated)
    may have produced the linker warning. It may come down to the compiler
    used and it’s config settings etc.

    I ran the code (as it stands shown) using the LCC compiler and I also got
    the linker error, and the two warnings. Strange.


Понравилась статья? Поделить с друзьями:
  • Неправильное имя пользователя или пароль windows 11 как исправить
  • Неопределенная сетевая ошибка 0x8009001 герои 6
  • Неоправданные повторы слов относятся к ошибкам
  • Неправильное извлечение флешки как исправить ошибку
  • Неопределенная ошибка 0 на айфоне