i’m working with CLion, and I’m writing a program using the glfw3 lib.(http://www.glfw.org/docs/latest/) I installed and did everything correctly for the lib i have the .a and .h files in: I’m trying to use the library now, but i’m getting the linker error: undefined reference to ‘glViewport’ etc. etc. all the functions i’m using I added the lib path to
Tag: c++11
‘undefined reference to’ Linker errors with latest LLVM from git (3.9.0svn) on Arch Linux
Prior to my Macbook Pro motherboard failure I was working on a programming language of mine with Flex, Bison, and LLVM. I honestly don’t recall the version of LLVM I was linking against at the time (I will try to find this out after I salvage the data from the drive), but I do know that the latest version I’m
Undefined reference to process(std::__cxx11::basic_string … ) when compiling affdex linux sample applications
I encountered the following error when I tried to compile affdex sdk sample applications I’m using GCC 5.2.1 Answer My initial suspicion was that the problem is attempting to compile the apps using a newer GCC or rather GLIBCXX than what the sdk is compiled with (gcc v4.8). The error msg refers to an undefined function that the compiler is
Unable to link openssl libraries to CLion C++ program
I have a CLion project. Here is my CMakeLists.txt: And here is error that I get: Answer Maybe you should try link_libraries(ssl) instead of link_libraries(openssl), if you’re sure of openssl installed on your local machine. See https://wiki.openssl.org/index.php/Libcrypto_API , it says that “OpenSSL provides two primary libraries: libssl and libcrypto.”. To fix your issue just add to your CMakeList.txt:
dynamic linker error with rand() function
I already asked a question about this before but with reference to the following code again Why does compiling this result in the following error Why would this happen? How does the linker know that this is just another rand() function I have declared myself but rather an existing version of rand()? Answer One of your header files (<iostream> in
Why can only async-signal-safe functions be called from signal handlers safely?
I am still a little confused as to why exactly it is unsafe to receive a signal and call a non async safe function from within that signal handler. Could someone explain the reasoning behind this and possibly try and give me some references that I can follow to read up more on this myself? In other words I am
An implicit try {} catch around main
In each of my main functions, I would like to catch certain classes of exceptions and convert them to exit codes. Is there a more elegant solution to this than starting and ending each main function with macros that will paste the implicit try {} catch I want? Can I somehow achieve this with the std::set_terminate functionality? Example: Answer A
How do I find what libraries need to be installed on a client linux machine if I compile a binary with a newer version of gcc?
Say I have a C++ binary that was compiled with a version of gcc say 4.4.x, which is used on a client linux box. If I want to upgrade my compiler to use a newer one, say 4.9.3 (because I want to use C++11): What kind of things would need to be upgraded on the client box to run this
std::u32string conversion to/from std::string and std::u16string
I need to convert between UTF-8, UTF-16 and UTF-32 for different API’s/modules and since I know have the option to use C++11 am looking at the new string types. It looks like I can use string, u16string and u32string for UTF-8, UTF-16 and UTF-32. I also found codecvt_utf8 and codecvt_utf16 which look to be able to do a conversion between
Can’t compile C++ program on Ubuntu
I used OSX to program in C++, but I am new to C++ compiler on Linux. I have a program consisting two .cpp files and one .h file that are compiled and run successfully on my Mac, but get compiling errors on Ubuntu. I did install gcc and g++ compilers and build-essential, and also apt-get update and update, searched online,