I'm very new to OMNeT++ and I'd like to use the serialization-library contained in the boost framework. However, when trying to use it, I get quite many errors such as:
Description Resource Path Location Type
undefined reference to `boost::archive::archive_exception::~archive_exception()'
OmCCN line 36, external location: /home/alexander/UniBE/BT/simulator/boost-compiledLibs
/include/boost/serialization/throw_exception.hpp C/C++ Problem
. I guess the problem is that I didn't yet link the compiled library in OMNeT. I've had a look at the makefile but any changes there are worthless since it is generated automatically by makemake. Furthermore, trying to access the menu item 'makemake' in project > properties > OMNeT++ IDE throws an error (The currently displayed page contains invalid values).
Can anyone give me a hint concerning what the error could cause or how to link the compiled library correctly?
Any hints are very appreciated!
cheers
alex
First you should get the library files.
For example in Ubuntu you should install these two packages: libboost1.46-dev, and libboost-serialization1.46-dev. Header files will be installed in usr/include/boost and library files will be installed in usr/lib.
To link the serialization library to your program:
Right click on your project and click properties. Then go to OMNET++ > Makemake.
find the Link tab, and in the "Additional objects to link with: (wildcards, ..." section, specify the path to your serialization library (say /usr/lib/libboost_serialization-mt.a).
Related
I've post this issue 3weeks ago,
And I now post it again.
I use 3rd party library in my project.
Boost C++ Library.
only circular_buffer.hpp header file make trouble.
I don't know what means error message.
so, I post error logs today.
===================environment
My mac os 10.11 version
Xcode version 7.1.1(7B1005)
C++ Language Dialect : c++11[-std=c++11]
C++ Standard Library : libc++(LLVM C++ standard library with C++11 support)
====================error logs
/Users/genosyde/Downloads/Coding/ofFrameWork/of_v0.9.4_osx_release/addons/ofxOSXBoost-master/libs/boost/include/boost/circular_buffer.hpp:39:27: No member named 'remove_pointer' in namespace 'boost::move_detail'
/Users/genosyde/Downloads/Coding/ofFrameWork/of_v0.9.4_osx_release/addons/ofxOSXBoost-master/libs/boost/include/boost/circular_buffer.hpp:40:27: No member named 'add_pointer' in namespace 'boost::move_detail'
/Users/genosyde/Downloads/Coding/ofFrameWork/of_v0.9.4_osx_release/addons/ofxOSXBoost-master/libs/boost/include/boost/circular_buffer.hpp:45:7: No member named 'disable_if_c' in namespace 'boost::move_detail'; did you mean '::boost::disable_if_c'?
/Users/genosyde/Downloads/Coding/ofFrameWork/of_v0.9.4_osx_release/addons/ofxOSXBoost-master/libs/boost/include/boost/circular_buffer.hpp:50:27: No member named 'is_const' in namespace 'boost::move_detail'
there are hundred of errors below.
thanks for reading and have a good day!!!
Thank you for your interest.
I'm sorry
But, I don't understand your request.
circular_buffer.hpp is 3rt_party library from boost.org.
Any time, you can download it for individual OS.
And I send you a link, that is my test project file link in google drive.
If you download it, you might just run it.
https://drive.google.com/open?id=0B4J46iW2HRnoYmNhcVB2OXhkX1U
my test of xcode porject's location:
of_v0.9.4_osx_release/addons/ofDelayLine/BoostTest/boostTest.xcodeproj
If you got Xcode, just double click it on finder.
I just add circular_buffer.hpp on ofApp.h to use it.
I want to set up a Projection mapper in Processing 1.5. I am following this tutorial.
I installed every library and followed step by step but I'm seeing this error:
The type processing.xml.XMLElement cannot be resolved.It is indirectly referenced from required .class files.
Am I missing something? What am I doing wrong?
It's not enough to just install the library. All that does is make the library available to be added to sketches; it doesn't actually add the library to your sketch.
To add the library to your sketch, go to the menu bar Sketch -> Import Library, and then select your library.
For more info, check out the reference on installing a contributed library.
I am trying to build Quantlib using Boost Libraries.
I followed the instructions here: and also on the Quantlib website.
I downloaded and unzipped boost_1_57_0 into C:\program files
I then used the Visual Studio 2013 x64 Native prompt to go to the boost directory and ran
bootstrap.bat
and then
b2 --toolset=msvc --build-type=complete architecture=x86 address-model=64 stage
Then I opened Quantlib_vc12.sln in Visual Studio 2013.
Picked "Release" and "x64", opened "Quantlib" in Property Manager and set the VC++ Directories.
In the include directories I added C:\Programm Files\boost_1_57_0
In the Library Directories I added C:\Program Files\boost_1_57_0\stage\lib
Then I went to the Solution Explorer and right clicked and chose build.
I got one LNK1104 error.
LNK1104: cannot open file 'libboost_unit_test_framework-vc120-mt-1_57.lib
Please see attached screenshot:
I have no idea how to fix this and I would really appreciate some help. I had successfully installed this at work using an admin account but was not able to access Quantlib using my user account. I have since deleted and attempted installations atleast 15 times but it's not working. I am worried that all these attempts at installing may have messed something else up, like some registry (I have no idea how that works but I only know to be afraid). Please help! Thanks.
UPDATE: Still get the same error after adding BOOST_AUTO_LINK_NOMANGLE define to project.
UPDATE2: I am getting these messages on the screen while running b2 to build boost. Is this an error I need to fix?
This is exactly what I warned you about in another related question/answer. What's happening here is that the boost headers you are including in this quantlib are (through macros) detecting that you're using MSVC, detecting the version, then automatically linking the required DLL files to build quantlib using #pragma comment(lib....). So even though under Project Settings -> C/C++ -> Linker there are no external DLL's or Lib's specified, they're still being linked by these pragma statements.
So when these macros are detecting your compiler and so on, they're dynamically building a string name of what they think the required libraries would be named on your system. Remember when you built boost, you specified the -layout option. This the naming layout of your boost libraries. Well by default, that layout is something like this:
LIB_LIBRARY_NAME_COMPILER_VERSION_SingleOrMultiThreaded_BOOST_VERSION.LIB
Which in practice looks like this:
libboost_unit_test_framework-vc120-mt-1_57.lib
This is boost "mangling" the name of your library to be as descriptive as possible about how the libraries were build so that, just by glancing at the file name, you know. What we do with -layout=system is tell the boost build system NOT to mangle the names, but to name them according to what option we gave to "layout". Since we chose layout=system, boost is going to name our libraries like this:
LIB_LIBRARY_NAME.LIB
Which in practice will produce:
libboost_unit_test_framework.lib
So when we start using boost after doing this (with MSVC only does this happen), these dynamically generated linker statements don't give a rip about or know about what -layout option you built boost with. They will attempt to link in required libraries using the fully mangled naming format, which is why you get the error:
cannot open file 'libboost_unit_test_framework-vc120-mt-1_57.lib
.. because you don't have a file named that! That's the mangled name! You have a file named libboost_unit_test_framework.lib. See the difference! So, you need to tell these stupid macros to stop mangling the library names when auto-linking required libraries. You do that by adding the following preprocessor definition to your Quantlib project:
BOOST_AUTO_LINK_NOMANGLE
You add that in Project Settings -> C/C++ -> Preprocessor -> Preprocessor definitions.
If you'd rather avoid this headache and don't care about the long and (imo ugly) mangling that boost does to library names, you can build boost omitting the -layout option and it will default to this mangled naming convention, where you shouldn't get stuck on this error at all anymore. I personally put out the effort to keep nice short/clean library names but it's all about preference.
Edit
Since you have the same error after fixing the NO_MANGLE problem, then the only possible reason that you're getting this particular link error is that you do not have whatever file the linker is complaining about missing stored in any of the directories supplied to the linker.
Verify the folders/paths you provide to the linker and verify that the file the linker is looking for is in one of the directories that you're providing to the linker. You have to provide directories to the linker because you're telling the linker "you can look in all of these places for the libraries my project needs". If you specify none, it's got nowhere to look. :(
Example:
I am trying to compile a C++ project that uses OpenCV in Xcode 6.2. I have downloaded OpenCV and the header and library files and setting as follow:
Header Search Path: /usr/local/include/opencv2**
Library Search Path:/usr/local/lib
and opencv is truly in this Path,but I get error:
Lexical or Preprocessor Issue
/Users/radio_lee/Desktop/project/OpenCV/OpenCV/main.cpp:1:10: 'cv.h' file not found
when I change the Header Search Path and Library Search Path like that:
Header Search Path:
/usr/local/include/opencv2** and /usr/local/include/opencv
Library Search Path:/usr/local/lib
another error:
Lexical or Preprocessor Issue /usr/local/include/opencv/cv.h:63:10: 'opencv2/core/core_c.h' file not found
/Users/radio_lee/Desktop/project/OpenCV/OpenCV/main.cpp:1:10: In file included from /Users/radio_lee/Desktop/project/OpenCV/OpenCV/main.cpp:1:
OpenCV is a Private Framework,Since it is a Private Framework, it must be copied to the Frameworks/ directory of an Application Bundle, which means, it is useless for plain unix console applications.
We can see the detail in this web site :http://docs.opencv.org/doc/tutorials/introduction/table_of_content_introduction/table_of_content_introduction.html#table-of-content-introduction
This folder contains toolchains and additional files that are needed for cross compilation.
For more information see introduction tutorials for target platform in documentation.
And at first, sorry for my bad English. It is my first project in D. And my first project with SFML (DSFML of course).
I use dub for making Visual Studio project (I use VS2010). Then
open it and set up project settings:
general
compiler
linker
Autocomplete works correctly:
When I try build project, here is error:
Error 42: Symbol Undefined _D5dsfml8graphics12__ModuleInfoZ
How I can resolve it?
This particular error is saying that it can't find the actual D code for the library. It could mean that dub isn't grabbing/linking the source somewhere, but I've never used dub with an IDE so I can't be sure.
My suggestion to help you figure out what is going wrong and to fix this issue is to bug the maintainer (who is me, actually) on github by opening an issue about a lack of tutorials for the IDE's that are available to D right now.
If you want to get started with DSFML right now, however, you can sort of follow along with the command line tutorial and use that as a basis of figuring out what libraries need to be linked in, set up import search paths, etc.
Create project by dub init dsfml_test (where dsfml_test is our project name)
Add libs dependencies to dub.json
Generate Visual Studio project
Open project in Visual Studio
Open project properties
Enter path to directory where is placed dsfml lib files
Thats all. Now can add import dsfml.graphics, dsfml.window, dsfml.system; ...etc and build project.