The 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.
Contents
- Why Is the collect2: Error: Ld Returned 1 Exit Status Happening?
- How To Fix This Error Inside Your Program
- – Listing All the Possible Methods for Debugging This Error
- – A Common Error in the Gem Native Extension
- – Using the Debugging Library Syntax for the collect2 Error
- – Facing This Error in Dev C++
- FAQs
- – What Is collect2 Exe?
- – What Does Error 1d Returned 1 Exit Status Mean?
- – How To Combine Two Files in C++?
- Final Conclusion and Further Notes
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:
- Create two separate C++ source files on your server.
- Both files should be saved inside the same location on the server.
- Open the Command Prompt tool and run the various commands from your files.
- The tool is going to merge the two separate source files together and comply their functions.
- 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
Web 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: Your Go-To Resource for Learn & Build: CSS,JavaScript,HTML,PHP,C++ and MYSQL.
Содержание
- C компиляция: collect2: ошибка: ld возвращен 1 статус выхода
- ОТВЕТЫ
- Ответ 1
- Ответ 2
- Ответ 3
- Ответ 4
- Ответ 5
- Ответ 6
- Ответ 7
- Gcc collect2 exe error ld returned 1 exit status
- mironyuk
- Вложения
- Эдуард Анисимов
- mironyuk
- 03-05.7z
- Эдуард Анисимов
- mironyuk
- Эдуард Анисимов
- mironyuk
- Эдуард Анисимов
- mironyuk
- Эдуард Анисимов
- OpenSTM32 Community
- The STM32 Systems Resource
- SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs
- System Workbench for STM32
- collect2.exe: error: ld returned 1 exit status
C компиляция: collect2: ошибка: ld возвращен 1 статус выхода
Я попытался найти эту ошибку онлайн, но все сообщения для С++.
test1.o: В функции ReadDictionary’: /home/johnny/Desktop/haggai/test1.c:13: undefined reference to CreateDictionary ‘ collect2: error: ld возвращен 1 статус выхода make: *** [test1] Ошибка 1
супер простой код и не может понять, что проблема
теперь это заголовок dict.h
и если вы хотите проверить hash.h
Может быть, будет легче, если я дам вам файлы здесь?
В любом случае, я буду рад за советы о том, как понять проблему.
ОТВЕТЫ
Ответ 1
Ваша проблема — это опечатка в функции CreateD e ctionary(). Вы должны изменить ее на CreateD i ctionary(). collect2: error: ld return 1 статус выхода — та же проблема как на C, так и на С++, обычно это означает, что у вас есть неразрешенные символы. В вашем случае это опечатка, о которой я упоминал ранее.
Ответ 2
Ответ 3
У меня возникла эта проблема, и я попытался решить многие ее проблемы. Наконец, оказалось, что make clean и make снова решили. Причина в следующем: Я получил исходный код вместе с объектными файлами, скомпилированными ранее со старой версией gcc. Когда моя новая версия gcc хочет связать эти старые файлы объектов, она не может решить какую-либо функцию там. Случается со мной несколько раз, что дистрибуторы исходного кода не очищаются перед упаковкой, поэтому make clean сохранил день.
Ответ 4
иногда эта ошибка возникла, потому что не удалось скомпилировать ни в какой другой сборке. Лучший способ попробовать — сделать чистую и снова сделать весь код.
Ответ 5
При компиляции вашей программы вам необходимо включить dict.c, например:
gcc -o test1 test1.c dict.c
Кроме того, у вас есть опечатка в определении dict.c CreateDictionary , она говорит CreateDectionary ( e вместо i )
Ответ 6
обычно эта проблема возникала, когда мы вызывали функцию, которая не была определена в программном файле, поэтому, чтобы решить эту проблему, проверьте, вызывали ли вы такую функцию, которая не была определена в файле программы.
Ответ 7
Если вы используете Dev C++, то ваш .exe или означает, что ваша программа уже запущена, и вы пытаетесь запустить ее снова.
Источник
Gcc collect2 exe error ld returned 1 exit status
mironyuk
Marlin 2.0.8, COREXY, 3D TOUCH
все работало нормально. Не знаю, что сделал ,но ошибка при компиляции вылезает не зависимо от
-компа
-смены прошивки вплоть до чистой или родной заводской
-перезагрузки компа
-удаления полного VC и установки заново
В общем, мумукаюсь уже два дня, начинаю беситься.
Наверняка кто-то тоже сталкивался с такой проблемой, отзовитесь.
Прошивку прицепил.
Вложения
Эдуард Анисимов
mironyuk
03-05.7z
Эдуард Анисимов
mironyuk
я не программист, от слова Далеко, извините. Что я должен сделать с этим ромом? ну, и с предупреждениями?
Спасибо.
предупреждения и раньше были (это желтым, я понимаю), может не столько, как сейчас, но все работало. Вот начал автоуровень приделывать и кое что подкорректировал в прошиве, может и не туда ткнул где-то.
попробую вот так
Эдуард Анисимов
mironyuk
если под железкой понимается комп, то я делал на другом компе и тоже самое происходит
достал старую прошивку, предупреждений нет, переполнения ром тоже нет, но появилось новое чего то там в файле .ld
Эдуард Анисимов
А обновления PlatformIO перед этим не было?
Я столкнулся с тем, что писал на старом, на компе, где нет интернета. И всё работало.
Дома обновился и всё перестало работать.
А почему не пишете под CubeIDE?
А судя по логу, ему скрипт для F103VC не нравится.
mironyuk
я сносил два раза VC полностью и устанавливал, но вроде не писал мне VC что обновляет Платформио.
А почему не пишете под CubeIDE?\ я даже не знаю, что это, я далек от понимания языка С и пр. Просто обновил плату на 32 бит, за ней потянулся Марлин 2.0, ну и далее вопрос чем компилить, увидел VC и вперед.
А судя по логу, ему скрипт для F103VC не нравится. \ ну это «вдруг» сейчас ему не нравится, а всегда нравился, вроде.
ааааа, со старой прошивой сам баран — перенес ее в новую папку и обозвал кирилицей папку АРХИВ. блин, сам на эти грабли уже наступал. Так вот, когда АРХИВ переименовал в STORAGE, то все скомпилировалось!! Таакс, значит дело не в VC. Надо, наверное, сравнить построчно обе прошивы и найти разницу, в этой разнице и кроется ошибка или опять же русская буква закралась в команду.
Эдуард Анисимов
Вот про эту возможность я всегда забываю. Так как никогда ни пользователя, ни каталог для проекта не создаю кириллицей.
И в логах ошибки ничего не было. Поэтому и забыл.
А сравнивать построчно удобно TotalCommander. Файловый менеджер с кучей фич в максимальной комплектации.
Источник
The STM32 Systems Resource
SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs
With System Workbench for Linux , Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4. You can get more information from the ac6-tools website and download (registration required) various documents highlighting:
|
System Workbench for STM32
collect2.exe: error: ld returned 1 exit status
I met this issue building SMARTMIC project for Bluecoin in Eclipse Oxygen with SW4STM32 plugin. I was able to build this project in the same configuration and environment, but after a few days this issue appeared. Installed Eclipse Photon and SW4STM32 plugin, issue disappeared, but after a few days reappeared again. There is the same issue with other of the shelf ST projects as well (eg STSW-SPIN3201). Could anyone help please?
Also, there is a warning:
- warning “Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)”
This wasn’t there before. It is strange, because the target MCU has FPU.
There is a build log.
make all
Building file: D:/workspace/STM32CubeFunctionPack_SMARTMIC1_V1.1.1/Middlewares/ST/STM32_AcousticDB_Library/Lib/Acoustic_DB100.c
Invoking: MCU GCC Compiler
D:workspaceSTM32CubeFunctionPack_SMARTMIC1_V1.1.1ProjectsMultiApplicationsFP-AUD-SMARTMIC1SW4STM32STM32F446ME-BlueCoinDebug
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DARM_MATH_CM4 -DUSE_HAL_DRIVER -DSTM32_BLUECOIN -DSTM32F446xx -DUSE_COMPOSITE_VCP_AUDIO
Источник
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
Hi,
I had some cpp scripts which used to work! I changed my Ubuntu and therefore I installed the opencv from git. Now when I make the same files I receive this error:
g++ -c -m64 -pipe -O2 -std=c++0x -Wall -W -fPIE -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I. -I/usr/local/include -o main.o main.cpp
g++ -c -m64 -pipe -O2 -std=c++0x -Wall -W -fPIE -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -I. -I/usr/local/include -o dbscan.o dbscan.cpp
g++ -m64 -Wl,-O1 -o opticalFlowVideo main.o dbscan.o pkg-config --libs opencv libavformat libavcodec libswscale libavutil
/usr/bin/ld: cannot find -lippicv
collect2: error: ld returned 1 exit status
make: *** [opticalFlowVideo] Error 1
The same scrit still works on my older system with an older branch of Opencv.
This is my system specifications:
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty
And this is my opencv libs:
pkg-config —libs opencv
-L/usr/local/lib -lopencv_cudabgsegm -lopencv_cudaobjdetect -lopencv_cudastereo -lopencv_stitching -lopencv_cudafeatures2d -lopencv_superres -lopencv_cudacodec -lopencv_videostab -lopencv_cudaoptflow -lopencv_cudalegacy -lopencv_cudawarping -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_dnn -lopencv_dpm -lopencv_fuzzy -lopencv_hdf -lopencv_line_descriptor -lopencv_optflow -lopencv_plot -lopencv_reg -lopencv_saliency -lopencv_stereo -lopencv_structured_light -lopencv_rgbd -lopencv_viz -lopencv_surface_matching -lopencv_tracking -lopencv_datasets -lopencv_text -lopencv_face -lopencv_xfeatures2d -lopencv_shape -lopencv_video -lopencv_ximgproc -lopencv_calib3d -lopencv_features2d -lopencv_flann -lopencv_xobjdetect -lopencv_objdetect -lopencv_ml -lopencv_xphoto -lippicv -lopencv_highgui -lopencv_videoio -lopencv_photo -lopencv_imgcodecs -lopencv_cudaimgproc -lopencv_cudafilters -lopencv_imgproc -lopencv_cudaarithm -lopencv_core -lopencv_cudev
Thanks in advance
0 / 0 / 0
Регистрация: 21.11.2019
Сообщений: 1
1
21.11.2019, 19:56. Показов 8595. Ответов 1
Здравствуйте, только начал изучать Qt. При попытке собрать проект выдает collect2.exe: error: ld returned 1 exit status в консоль. В коде я почти не разбираюсь, поэтому обращаюсь сюда. Прикрепляю проект. На данный момент весь код в shootcalc.cpp, остальные пустые и изменялись.
shoorcalc.cpp
C++ (Qt) | ||
|
shootcalc.h
C++ (Qt) | ||
|
P.S. Заранее хочу принести извинения за свой корявый код, который вам придется читать.
__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь
0
For a full list of steps to install a version from source, skip the following lines and read on with Install from source
To install/remove the GNU R statistical computation and graphics system you need the package r-base
.
Therefore
sudo apt-get install r-base
or
sudo apt-get purge r-base
To install/remove the GNU R collection of recommended packages you need r-recommended
sudo apt-get install r-recommended
or
sudo apt-get install r-recommended
Install from source
The version 3.2.1 is in the Wily Universe repositories.
To install the version 3.2.1 on older Ubuntu versions, you have to compile the packages for yourself
-
Download and extract
cd wget https://cran.r-project.org/src/base/R-3/R-3.2.1.tar.gz sudo apt-get install tcl tcl-dev tk-dev tk tar xf R-3.2.1.tar.gz cd R-3.2.1
-
Create a Makefile with
configure
and enable shared libraries (--enable-R-shlib
) and Tcl/TK-support (--with-tcltk
)./configure --prefix=/usr/local --enable-R-shlib --with-tcltk
or simply with (without
shared libraries
)./configure
-
And start the build process
make
-
After that, install. I prefer the installation with
checkinstall
, to create and install a deb packagesudo apt-get install checkinstall sudo checkinstall
But you could also use the standard way
sudo make install
And now, you have version 3.2.1 installed
% /usr/local/bin/R
R version 3.2.1 (2015-06-18) -- "World-Famous Astronaut"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-unknown-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
>
Install RStudio Desktop
Download the latest version here, e.g.
wget https://download1.rstudio.org/rstudio-0.99.467-amd64.deb
Install via
sudo dpkg -i rstudio-0.99.467-amd64.deb
Check the install output and install missing packages, e.g. in my case
sudo apt install libjpeg62
Start RStudio via Unity Dash or GNOME Activities or via command line
/usr/lib/rstudio/bin/rstudio