linker-errors

Building a wxWidgets program in Code::Blocks

我是研究僧i 提交于 2019-12-07 11:27:53
问题 I'm trying to build this wxWidgets sample program using Code::Blocks 12.11 but the build fails no matter what I try. For example, the build log shows the following (the project is under X:\programming\c++\HelloWxWidgets): mingw32-g++.exe -Wall -fexceptions -g -D_ GNUWIN32 _ -D_ WXMSW _ -DwxUSE_UNICODE -D_ WXDEBUG _ -IC:\libraries\wxWidgets-2.8.12.01\include -IC:\libraries\wxWidgets-2.8.12.01\contrib\include -IC:\libraries\wxWidgets-2.8.12.01\lib\gcc_lib\mswud -c X:\programming\c++

Why do I get an undefined reference( to `glColor3f' ,for example) when I compile a program in c?

末鹿安然 提交于 2019-12-07 07:05:14
问题 I'm compiling an example program that uses opengl in ubuntu (linux). A short snippet of the code is the following: #include <stdlib.h> #include <GL/glut.h> void createBox( GLfloat centroX, GLfloat centroY, GLfloat corR, GLfloat corG, GLfloat corB ) { /* Cor */ glColor3f( corR, corG, corB ); I've installed all of the packages to develop in opengl (in ubuntu), namely: freeglut3 freeglut3-dev libglew1.5 libglew1.5-dev libglu1-mesa libglu1-mesa-dev libgl1-mesa-glx libgl1-mesa-dev I compile the

Android NDK Cmake Linking .a (Static) Libs

老子叫甜甜 提交于 2019-12-07 04:16:49
问题 I am using Android Studio 2.2.2 with cmake and Android NDK. I have a problem linking .a library (Static lib). Here is my cmake: # Sets the minimum version of CMake required to build the native # library. You should either keep the default value or only pass a # value of 3.4.0 or lower. cmake_minimum_required(VERSION 3.4.1) set(CMAKE_VERBOSE_MAKEFILE on) # Creates and names a library, sets it as either STATIC # or SHARED, and provides the relative paths to its source code. # You can define

LNK2022: metadata operation failed : Inconsistent field declarations in duplicated types

此生再无相见时 提交于 2019-12-07 04:15:34
问题 I have problem with compiling my C++ .NET project. I have read "LNK2022: metadata operation failed" driving me insane -- and this is not my case, because in my case i cannot compile one single project -- it fails at link time. i tried all (two) solutions from that topic and that didn't help me. This errors started to rise up just when i have changed the class to be a template class. i have Vector2Di (for int type) class and now need completely the same for float type, so i renamed it to

Weak symbol link on Mac OS X

北城以北 提交于 2019-12-06 20:42:00
问题 Currently I encountered a weak link issue on Mac OS X 10.6.7 with Xcode 4.0.2. robin@chameleon:/tmp/o$ gcc --version i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3) As the document http://developer.apple.com/library/mac/#technotes/tn2064/_index.html said, we can use gcc attribute ((weak_import)) for weak link symbol. However, the following sample code always throw compile error. As the following: weak.c : #include <stdlib.h> #include <stdio.h> extern int SayHello() _

Boost spirit x3 example calculator (calc8, calc9) linker error

蹲街弑〆低调 提交于 2019-12-06 16:45:38
I'm very new with boost spirit (and with boost). Its very interesting library. I use qtcreator + MinGW 5.3. I simply add every source file from git_hub_calc8 into new project and add some boost library, but i got the following error trying to build (All other examples work fine) C:\Program Files\boost\boost\boost\spirit\home\x3\nonterminal\rule.hpp:113: ошибка: undefined reference to `bool client::parser::parse_rule<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, boost::spirit::x3::context<boost::spirit::x3::error

Static library symbols not being found even with -l

无人久伴 提交于 2019-12-06 16:45:34
I have a static library, liborc-0.4.a with no shared library. I have another library, libschroedinger-1.0.a (no shared) that depends on symbols in liborc-0.4.a. If I run nm on liborc-0.4.a, symbols such as orc_init show up as T (meaning they are defined). I built libschroedinger-1.0.a with the command line flag -lorc-0.4 so it saw the symbols and was ok. However, now I have a small executable that depends on libschroedinger-1.0.a. It compiles fine, but when I run the linker gcc -lschroedinger-1.0 -lorc-0.4 -o output input.o It gives errors such as: /usr/local/lib/libschroedinger-1.0.a

error when trying to compile wrapper for openssl library libcrypto.a

假如想象 提交于 2019-12-06 14:24:44
I'm trying to build a dynamic library for android wrapper around libcrypto.a as described in http://wiki.openssl.org/index.php/FIPS_Library_and_Android#Using_FIPS_OpenSSL_in_a_real_Application I've produced the libcrypto.a as suggested on the page, but when I try to compile my wrapper.c I get a linker error, multiple definition of 'atexit' Here's the command line I'm using to compile: arm-linux-androideabi-gcc wrapper.c -fPIC -shared -I/usr/local/ssl/android-14/include -Wl,-Bstatic -lcrypto -L/usr/local/ssl/android-14/lib -o libwrapper.so --sysroot=/Users/scoleman/android-ndk-r9d/platforms

Linker error - linking two “application” type projects in order to use Google Test

落花浮王杯 提交于 2019-12-06 13:30:35
I am trying to test a function with Google Test. It seems that everything is set up correctly, and it builds and executes fine without gtest... (There is a bit of complexity in the code, so I cannot list all the source files here, but without adding gtest, the files are linking properly, and running as they should). It is an application type project. It has a number of library dependencies... irrelevant. The test project is added as a separate project to the solution. It has the tested project as a dependency. The .h file of the test project only points to the gtest... The .cpp (not main,

Symbol lookup error: _FileName_: undefined symbol: _intel_fast_memmove

主宰稳场 提交于 2019-12-06 11:36:00
So I'm working on linking together a Fortran and a C++ code, and I'm getting the above error when I try and run the executable. I've done some searching for other solutions, and none of the things I've found so far have helped. I'll try and include everything, but I'm not that great with this kind of stuff so if there's anything else that is needed/useful to see let me know and I'll go grab it. Makefile: LDLIBS = -I/share/apps/intel/composer_xe_2011.sp1.10.319/mkl/include \ -L/share/apps/intel/composer_xe_2011_sp1.10.319/mkl/lib/intel64 \ -I/share/apps/intel/composer_xe_2011_sp1.10.319/mkl