Linking Codeblock glut project with assimp library - c++

Hello I am new with assimp and have a problem.
When I try to include the:
#include <assimp/cimport.h>
#include <assimp/scene.h>
#include <assimp/postprocess.h>
in a c++ glut project it says No such file or directory, so I obviously need to link some libraries to the project. The question is where can I find that library.
I downloaded assimp view 3.0 and opened the object i need to inport in c++ with it and so far it look ok.
http://assimp.sourceforge.net/lib_html/usage.html .. Is the link to how to use assimp with c++ but no info how to link it

You should have read up on the very site you linked.
http://assimp.sourceforge.net/lib_html/install.html
These are installation directions. The very top looks like it talks about using prebuilt libraries and telling you what to link into your visual studio project.
One last note: you are using the c interface according to your question. After reading the documentation I see that they have a C++ specific importer header you may want to use instead.
#include <assimp/Importer.hpp>
EDIT: This answer assumes you are using visual studio of course. However, that link also provides building from scratch instructions as well as other ways of building and installing the library. So if you are a linux/unix user I imagine you can make do with these instructions.

Related

Can't Import Headers for Libpqxx on Windows

I am having some difficulties understanding how to link the header files of libpqxx. I have generated the output using CMake and then built the Release x64 version of it using Visual Studio. When I go to #include the headers, I can't #include them. According to the documentation, there should be as the header, but when I try and enter that, it gives me an error. I have tried to go into the project settings and set the include folder of the built version of libpqxx as an additional include dependency.
Does anyone happen to have any experience with this?
Thanks!!

Link C++ Library in Xcode [Mac]

First of all, I am completely new to C++. What I have:
Mac
Installed Xcode
Thats it. No prior knowledge about anything Xcode/C++ related.
I need to use a few functions from GSL library, to run a code for my project. What I did:
From GSL library site I downloaded a file called "gsl-latest.tar.gz".
Moved it to my C++ folder on desktop and unpacked it.(attached screenshoot of unpacked folder and what it includes)
Created an Xcode project by: Xcode -> create a new project -> command line.
Opened a file for this project which contains functions from mentioned library.
I know that in order to use functions I have to include them, i.e:
#include <gsl/gsl_randist.h>
#include <gsl/gsl_rng.h>
#include <gsl/gsl_sf_gamma.h>
But before "including" functions, I need to link gsl library to my project. How to do it?
Help.

Linking SDL 2 VS Code project with Easy C++ Project

I created a fresh project in Visual Studio Code with Easy C++ Project.
I tried to link in SDL2 (downloaded the source from their website), but it feels like I'm missing a step?
IE SDL_Main.h is not found? So I guess it either badly linked or I need to build it? I'm really not familiar with build/make/project setup usually work in V Studio in a already setup project...
Can someone guide me?
after installing the library and setting up the path in properties.json, use
#include
instead of what you used.

Including Armadillo C++ library in a C++ project in Microsoft Visual Studio 2015

I'm trying to include the Armadillo C++ library, a linear algebra library, in a C++ project I'm working on, and I'm having a difficult time figuring out how to do so. I'm unfamiliar with how to add libraries to a project in general, so I've been searching for a resource that has step by step instructions, and the best one I could find didn't work for me (http://codeyarns.com/2013/11/15/how-to-use-armadillo-on-windows/). I followed all the instructions on the web page, and Visual Studio still complains when I put #include <armadillo> and using namespace arma in my code. Does anyone have any idea what I'm doing wrong?
I have put all the .lib and .dll files in a directory which is added to the PATH system environment variable
and then you just have to add the correct include and library directories in VS2015
and add the lib dependencies you have

How do I install Crypto++ in Visual Studio 2010?

I downloaded http://www.cryptopp.com/#download 5.6.1 and have no clue that to do at this point. I am a total noob and need good instructions. thanks.
Directly from the readme (Which can be found here Crypto++ Svn Trunk):
* MSVC-Specific Information *
On Windows, Crypto++ can be compiled into 3 forms: a static library including all algorithms, a DLL with only FIPS Approved algorithms, and a static library with only algorithms not in the DLL. (FIPS Approved means Approved according to the FIPS 140-2 standard.) The DLL may be used by itself, or it may be used together with the second form of the static library. MSVC project files are included to build all three forms, and sample applications using each of the three forms are also included.
To compile Crypto++ with MSVC, open the "cryptest.dsw" (for MSVC 6 and MSVC .NET 2003) or "cryptest.sln" (for MSVC 2005 - 2010) workspace file and build one or more of the following projects:
cryptopp - This builds the DLL. Please note that if you wish to use Crypto++ as a FIPS validated module, you must use a pre-built DLL that has undergone the FIPS validation process instead of building your own.
dlltest - This builds a sample application that only uses the DLL.
cryptest Non-DLL-Import Configuration - This builds the full static library along with a full test driver.
cryptest DLL-Import Configuration - This builds a static library containing only algorithms not in the DLL, along with a full test driver that uses both the DLL and the static library.
To use the Crypto++ DLL in your application, #include "dll.h" before including any other Crypto++ header files, and place the DLL in the same directory as your .exe file. dll.h includes the line #pragma comment(lib, "cryptopp") so you don't have to explicitly list the import library in your project settings.
To use a static library form of Crypto++, make the "cryptlib" project a dependency of your application project, or specify it as an additional library to link with in your project settings. In either case you should check the compiler options to make sure that the library and your application are using the same C++
run-time libraries and calling conventions.
If you have any questions feel free to ask and i'll update the anwser with my responses.
I downloaded http://www.cryptopp.com/#download 5.6.1 and have no clue what to do at this point...
This is a very late answer, but the project has released some new files to help folks use Visual Studio 2010 and above.
The project had to release the updated files because VCUpgrade (provided with Visual Studio 2010) does a fairly poor job with this particular project. It has been a source of problems for a few years, and even visually impaired users were commenting about it. The problems were not fixed in VS2012, VS2013 and VS2015, so we don't believe Microsoft has any intentions of fixing the problems.
To use the updated files, download the latest Crypto++ release from the website. Then, visit the Crypto++ wiki and fetch vs2010.zip from the page Visual Studio. Unzip vs2010.zip over the Crypto++ files. Finally double-click the file called cryptest.sln to have Visual Studio open the solution file.
The Crypto++ wiki page also offers project files that provide dynamic runtime linking for both VS2005 and VS2010.
If you convert cryptest.sln from VS2005 to VS2010, you will meet a problem. When you compile source code, the compiler will show an error:
c1xx : fatal error C1027: Inconsistent values for /Ym between creation and use of precompiled header
You can resolve this problem by:
Going to Project Properties --> Configuration Properties --> C/C++ --> Precompiled Headers
Changing it to "Not Using Precompiled Headers"
You'll need to compile the library before using it with anything. You can't just install it. Here is a page from their wiki about compiling the library: http://www.cryptopp.com/wiki/Compiling