linker-errors

Linker error when using a template class? [duplicate]

你离开我真会死。 提交于 2020-02-15 07:39:46
问题 This question already has answers here : Why can templates only be implemented in the header file? (16 answers) Closed 2 years ago . I'm getting an "unresolved external symbol "public:__thiscall hijo<int>::hijo<int>(void)" referenced in function_main I started a new project cause I was having this same error on another larger project. The error occur when I try to allocate space using the new keyword. If this error is silly please forgive me cause I haven't programmed anything in the last

How to resolve the linker error in C++ compiler

谁说我不能喝 提交于 2020-01-30 10:41:07
问题 I have to compile PJSIP in CPP compiler. Because I am integrating an API with PJSIP . It is in CPP . So I have to use g++ instead of gcc . But now I didn't integrate any other API. But I am getting linker error in CPP compiler. If it is C compiler, it is working fine. Error: Undefined symbols for architecture arm: "_crypto_alloc", referenced from: srtp_stream_clone(srtp_stream_ctx_t const*, unsigned int, srtp_stream_ctx_t**)in libsrtp-arm-apple-darwin9.a(srtp.o) srtp_stream_alloc(srtp_stream

How to resolve the linker error in C++ compiler

爷,独闯天下 提交于 2020-01-30 10:40:39
问题 I have to compile PJSIP in CPP compiler. Because I am integrating an API with PJSIP . It is in CPP . So I have to use g++ instead of gcc . But now I didn't integrate any other API. But I am getting linker error in CPP compiler. If it is C compiler, it is working fine. Error: Undefined symbols for architecture arm: "_crypto_alloc", referenced from: srtp_stream_clone(srtp_stream_ctx_t const*, unsigned int, srtp_stream_ctx_t**)in libsrtp-arm-apple-darwin9.a(srtp.o) srtp_stream_alloc(srtp_stream

How to resolve the linker error in C++ compiler

此生再无相见时 提交于 2020-01-30 10:39:31
问题 I have to compile PJSIP in CPP compiler. Because I am integrating an API with PJSIP . It is in CPP . So I have to use g++ instead of gcc . But now I didn't integrate any other API. But I am getting linker error in CPP compiler. If it is C compiler, it is working fine. Error: Undefined symbols for architecture arm: "_crypto_alloc", referenced from: srtp_stream_clone(srtp_stream_ctx_t const*, unsigned int, srtp_stream_ctx_t**)in libsrtp-arm-apple-darwin9.a(srtp.o) srtp_stream_alloc(srtp_stream

C++ unitTest with LinkTime substitution

别说谁变了你拦得住时间么 提交于 2020-01-25 07:22:17
问题 I'm reading "Test-Driven Development for Embedded C," by James W. Grenning. I'd like to reproduce case with "Link-Time Substitution" using Visual Studio Community 2019 and gTest. I have the following code: production_code staticly linked library foo.cpp #include "foo.h" int foo(int x) { return x + 1; } foo.h #ifndef _foo_ #define _foo_ int foo(int x); #endif //_foo_ In gtest project production_code library is included via reference test.cpp #include "gtest\gtest.h" #include "gmock\gmock.h"

nvcc is picking wrong libcudart library

杀马特。学长 韩版系。学妹 提交于 2020-01-24 21:37:14
问题 This problem comes when, I try to import theano with gpu mode. While importing the theano, it tries to compile some code, make a shared library of it and tries to load it. Here is the command to make the so file. nvcc -shared -O3 -m64 -Xcompiler -DCUDA_NDARRAY_CUH=mc72d035fdf91890f3b36710688069b2e,\ -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION,-fPIC,-fvisibility=hidden -Xlinker \ -rpath,/home/jay/.theano/compiledir_Linux-4.8--ARCH-x86_64-with-arch-Arch-Linux--3.6.0-64/cuda_ndarray \ -I/usr/lib

nvcc is picking wrong libcudart library

偶尔善良 提交于 2020-01-24 21:37:07
问题 This problem comes when, I try to import theano with gpu mode. While importing the theano, it tries to compile some code, make a shared library of it and tries to load it. Here is the command to make the so file. nvcc -shared -O3 -m64 -Xcompiler -DCUDA_NDARRAY_CUH=mc72d035fdf91890f3b36710688069b2e,\ -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION,-fPIC,-fvisibility=hidden -Xlinker \ -rpath,/home/jay/.theano/compiledir_Linux-4.8--ARCH-x86_64-with-arch-Arch-Linux--3.6.0-64/cuda_ndarray \ -I/usr/lib

xcode 5 ld: 11 duplicate symbols for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)

半腔热情 提交于 2020-01-24 18:03:07
问题 When trying to build my project, I constantly get this error saying ld: 11 duplicate symbols for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation) I recently tried to implement GPUImage to my project, would that have anything to do with it? Also I read similar problems but none had my solution. 回答1: Wild guess, have you maybe imported a .m file instead of the .h anywhere? 回答2: It turns out I had implemented my .m file from another view

iOS - 3 duplicate symbols for architecture i386

半腔热情 提交于 2020-01-24 17:18:28
问题 I am having an issue understanding a linker command error. I am receiving the following: duplicate symbol _OBJC_IVAR_$_XYZAddToDoItemViewController._toDoItem in: /Users/*/Library/Developer/Xcode/DerivedData/ToDoToday-fjyijxlbvauebmeuhtgdvdrjtfez/Build/Intermediates/ToDoToday.build/Debug-iphonesimulator/ToDoToday.build/Objects-normal/i386/XYZToDoListViewController.o /Users/*/Library/Developer/Xcode/DerivedData/ToDoToday-fjyijxlbvauebmeuhtgdvdrjtfez/Build/Intermediates/ToDoToday.build/Debug

Using mingw32 glfw3 and glew32s binaries in cygwin32 without mixing cygwin X11 GLX with WGL

ⅰ亾dé卋堺 提交于 2020-01-24 15:40:32
问题 I want to use the cygwin32 compiler instead of mingw32. According to http://web.eecs.umich.edu/~sugih/courses/eecs487/glut-howto/glfw/ , the GLX programs of gl on cygwin don't work with glfw. So I tried to use mingw32 binaries of glfw3 in cygwin32, which gave errors like 'GL_ARRAY_BUFFER' was not declared in this scope. I solved that by linking with mingw32 binaries of glew32, which gave /usr/include/w32api/GL/glu.h:68:79: error: expected ')' before '*' token which I solved two different ways