I am using svmlight for using it with HOG descriptor. I downloaded the hog program from here. I am using the latest version of SVMlight.
I am getting the following errors in svmlight.h:
'WORD' : ambiguous symbol
cannot convert from 'svmlight::WORD' to 'WORD'
left of '.wnum' must have class/struct/union
left of '.weight' must have class/struct/union
cannot open source file "svm_common.h"
cannot open source file "svm_learn.h"
"WORD" is ambiguous
I really don't know how to solve this issue as this a library?
I had the similar problem,
What I did is, change WORD in svmlight.h to svmlight::word
and that solved the problem.
but then it gave me some linking errors.
So, then I create a lib file using svmlight header and c files and include it.
(I used visual studio 2010)
Related
I have been trying to calculate number of days between two dates using Visual C++.
I am using visual studio 2005 and boost 1.55.0 for gregorian date_time library but got stuck in this error. #include "boost/date_time/gregorian/gregorian.hpp"
Error 32 fatal error LNK1104: cannot open file 'boost_date_time-vc80-mt-1_55.lib' LicenseMac
After doing some research in Project properties, I added boost library path in both C++ >> General >> Additional Include Directories and Linker >> .
I have two dates generated from System::DateTime.Now and stored in a text file for example
6/30/2016 0:0:0
5/8/2016 0:0:0
Would you please suggest me specific solution depending upon my system environment? Is there any other simple method in visual c++ for visual studio 2005 to calculate duration of days between above two days.
Thanks in advance :)
Where can you find this file boost_date_time-vc80-mt-1_55.lib in your system? Try using the full path of this file. Later find out where this file exists relatively to the Boost library.
If this file doesn't exist, you probably didn't built it, or not downloaded it well.
I am trying to build itk, however when I try to use sample programs I get the following error:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xutility(2761): warning C4996: 'std::_Fill_n': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
2> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xutility(2747) : see declaration of 'std::_Fill_n'
or an error like this:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xutility(2176): warning C4996: 'std::_Copy_impl': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators'
2> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xutility(2157) : see declaration of 'std::_Copy_impl'
2> c:\users\ayelet\downloads\insighttoolkit-4.8.0\modules\core\common\include\itkImportImageContainer.hxx(72) : see reference to function template instantiation '_OutIt std::copy(_InIt,_InIt,_OutIt)' being compiled
basically there seems to be a problem with checked iterators.I lloked up what checked iterators are and eventually got to this link:https://msdn.microsoft.com/en-us/library/hh697468(v=vs.110).aspx.
I tried using define ITERATOR_DEBUG_LEVEL in the actual programs but that didn't help.
I tried compiling the itk libraries with ITERATOR_DEBUG_LEVEL=2 and the sample program. To do this I wrote /D_ITERATOR_DEBUG_LEVEL=2 in cmake_cxx_flags and cmake_c_flags in the cmake-gui. I am still getting the same error.
I thought of trying to stick _ITERATOR_DEBUG_LEVEL somewhere in the itk cmakelists but the whole structure seems so complex so I wouldn't know where to put it.
I'm not sure if my syntax in cmake-gui is correct because I couldn't find a single example of setting an option to a specific value in cmake-gui so I don't know if "=" is the correct syntax.(I could only find setting options - like /DWIN32) Than again there could be something else that I'm doing wrong - I just don't know.
Anyone have an idea of what I can do?
Often this kind of messages come from mixing up Release/Debug libraries and executables and it's not necessary to set the _ITERATOR_DEBUG_LEVEL manually.
I suppose you built ITK both in Debug and Release version (by selecting the drop-down in the Visual Studio menu).
Is it possible that you installed both the version in the same folder? In this case the second one has overwritten the first one (unfortunately the ITK debug libraries don't have the a _d suffix in the name , they have to be in a different folders from the release libraries).
In your sample program, when you run cmake and you are asked for itk directory, put the itk build directory (instead of the install directory).
To be really sure of what is going on, you can temporarily move the folder with the version you don't want to be included.
I am new to F#. I get the following error when I attempt to build my F# project in Monodevelop:
/home/greenrd/git/hello/hello: Error FS0229: Error opening binary file
'/usr/lib/mono/4.0/../../../../../usr/lib/mono/gac/kde-dotnet/4.1.0.0_194a23ba31c08164/kde-dotnet.dll':
Could not find a part of the path
"usr/lib/mono/gac/kde-dotnet/4.1.0.0_194a23ba31c08164/kde-dotnet.dll".
(FS0229) (hello)
I don't think this is due to the 260 character file path limit in .NET, for the simple reason that the file path is only 102 characters. What could be the problem? file says:
/usr/lib/mono/4.0/../../../../../usr/lib/mono/gac/kde-dotnet/4.1.0.0__194a23ba31c08164/kde-dotnet.dll:
PE32 executable (DLL) (console) Intel 80386 Mono/.Net assembly, for MS
Windows
I don't even know where this filename comes from, I didn't enter such a strange filename anywhere. All I did was add the KDE C# bindings as a reference to the project.
This looks like a bug in the compiler when there are more .. than required - it looks like in this case the compiler drops the leading slash.
Changing the reference to
/usr/lib/mono/gac/kde-dotnet/4.1.0.0__194a23ba31c08164/kde-dotnet.dll
works just fine.
I am trying to chase this error up. Hopefully I will have a compiler patch today or tomorrow.
So after chasing a whole stack of functions in the compiler, it turns out this is actually a mono bug. This simplest way to reproduce it is
new FileStream("/../bin/bash",FileMode.Open,FileAccess.Read,FileShare.ReadWrite);;
which should work, but doesn't.
Reported to mono: https://bugzilla.xamarin.com/show_bug.cgi?id=17083
EDIT: This is apparently fixed in the latest mono - https://bugzilla.xamarin.com/show_bug.cgi?id=17083
I've been using Libpng15 in Windows 7, but I've been getting errors in relation to the
Unresolved External _png_set_longjmp_fn error when I compile my code. I followed the directions in the aforementioned link, and while it DID compile without any errors, I wound up with a message saying that I needed libpng12.dll to continue.
So, I did some Googling for libpng12.dll...nothing came up but generic "find x.dll" websites which appeared to be scams.
I've tried reading the INSTALL docs for the libpng source code on their website, and all that I see is instructions on how to do it via Unix based systems. I tried to do this in Cygwin with no luck, so I'm kind of stuck on how to compile this library.
All in all, I'm willing to do either the compilation or just using the .dll, though the problem is that I can't find a working .dll for version 12.
Another thing I tried was downloading binaries from here, which claimed to be "libpng12 for windows". I then copied the files into my VC compiler directory, which overrode libpng15, I think. Still, when I link against it statically and run my program in VC, it says that I require the .DLL file. The libpng12.dll file was in fact a .dll.a file instead. I honestly am not sure to link these (I tried linking it statically by typing "libpng12.dll.a" in the Linker Input setting through VS).
If I can go the .dll route for libpng12, how do I do this? Where is the file? How do I link it in VS?
Any help would be appreciated, as it seems there really isn't a whole lot of information on this. Either that, or I'm just not looking properly.
Look in the "projects" directory of the libpng distribution, and use one of the visual projects.
As mentioned above Look in the "projects" directory of the libpng distribution
Then make the adjustments outlined here
https://stackoverflow.com/a/38547948/293792
Which I note here for simplicities sake
(as stated there) adding two lib values to
Config -> Linker -> Input -> Additional Dependencies
these values are ucrt.lib;vcruntime.lib
Ensuring the build type is /MD
Allowed me to build these older versions, and fix that error on Windows 10 VS2015.
This link seems to have an installer for 1.2 for you:
http://gnuwin32.sourceforge.net/packages/libpng.htm
it's 32 bit. Not sure if that makes a difference for you.
Error 2 error LNK1104: cannot open file 'OgreMain_d.lib' C:\Users\Owner\Documents\Code\C++\Test\ogrevcpp\ogrevcpp\LINK ogrevcpp
This is the error I get when trying to build an Ogre3D application (with steps followed from here).
I've followed everything to the T, yet I still get the error. It honestly shouldn't be happening. I've also followed everything from here.
Edit
What's happening is there are two different files, one is meant for release, the other is meant for debug. I need the one for debug mode to compile properly (which is OgreMain_d.lib).
Update
I figured out what the problem was - I was using the incorrect binaries; there was a few releases which were meant for Visual C++, and one which was meant for MinGW, along with a few other compilers. My apologies.
You need to check your library paths to make sure that the path where OgreMain_d.lib lives is part of the library path.
I guess the library for Debug mode is not present in the lib folder. Try putting two different libraries folder for each Assembly mode in Visual Studio. Go to ProjectProperties -> Configuration Properties -> Linker -> Additional Library Directories on Right hand. Make sure to check the Configuration Dropdown on the top.