4 same unhelpful errors for every error I receive in c++ - c++

I am using spdlog, opengl, glad, and glfw in my project. No matter what error I am receiving, it is ALWAYS preceded by the 4 same errors. For example, let's say I have the following code:
std::cout << "sup";
then it will run perfectly. Okay now, let's say I have a typo and I do this:
std:cout<< "sup";
I get the following errors:
Here are the first 2 errors.. they redirect to FMT core.h file
and then the last two redirect to FMT format.h
Does anyone know why this could be happening? it is not made or break, whenever I have an error and I fix it these go away but it's just annoying and I would like to understand why.

It looks as though this PR will fix your issue?
https://github.com/fmtlib/fmt/pull/1279
Maybe just update fmt to the latest version?

Related

Eclipse debugger C++ 'No source available for "std::ostream::operator<<()"'; 'std::endl' issue

I am debugging a program that I have built. The program compiles and runs without error.
When using the debugger gcc4.9.3 (rtools_34) I get a message:
'No source available for "std::ostream::operator<<()"'
When stepping over any lines that contain std::cout << "Text" << std::endl;
This causes the debugging to crash. However if I set a breakpoint past the rogue code I can skip it without problem.
The code includes: iostream, ostream and string.
This code has also been debugged with other compilers without this issue. It is a new import into Eclipse for a newer compiler so I am assuming that I have set things up wrong.
The problem appears to be with std::endl as using '\n' instead works.
Any hints on interpretation of the error message or how to resolve the problem greatly appreciated.
Have you remembered to
#include <string>?
Sorry if that was obvious and has been checked, it just wasn't clear that that was definitely the case from your question!

libsndfile - sf_open(): Undefined references in time.h

I am using libsndfile and portaudio to play audio from a .wav file and I am getting some weird undefined reference (in time.h...?) errors upon use of sf_open(const char*, int, SF_INFO*) Before showing the errors, here is some basic info: I'm using MinGW 3.21 (cannot upgrade due to IDE constraints) on Windows 10, with CMake as my build system. I have verified that the const char* passed to sf_open is a valid file name and I have checked that no other lines of code are causing this compilation error. Without further ado, have some lovely errors:
libsndfile/lib/libsndfile.a(aiff.o): In function time':
c:/dwimperl/c/bin/../lib/gcc/i686-w64-mingw32
/4.4.7/../../../../i686-w64-mingw32/include/time.h:242:
undefined reference to _time32'
This is printed several times, probably because the function time is used a lot in sf_open although I haven't a clue as to why. This happens as well:
In function `gmtime':
c:/dwimperl/c/bin/../lib/gcc/i686-w64-
mingw32/4.4.7/../../../../i686-w64-mingw32/include/time.h:240:
undefined reference to `_gmtime32'
These errors imply no correlation between sf_open and time.h, but I even tried the following,
#include<sndfile.h>
int main {
sf_open(nullptr, 0, nullptr);
return 0;
}
and gotten the same result. I have libsndfile-1.dll in the same directory as my compiled binaries, and am linking to both libsndfile.a and libsndfile.dll.a. I have tried only linking to libsndfile.a with the same result. However, I tried linking only to libsndfile.dll.a and the program compiled but then crashed, saying:
An error occured while using the portaudio stream
Error number: -9984
Error message: Incompatible host API specific stream info
I'm not sure whether or not that is something for another question, but I thought I'd mention it, seeing that sf_open, the faulty function, seems to do something with stream info. Anyways, this is as far as I've gotten. Help is appreciated!
Look at me being such a genius, answering the question by asking it and then not noticing. Sometimes I wonder how I'm still alive. Anyways, it was simple. Don't link libsndfile.a, just libsndfile.dll.a. That's all. The PortAudio error was something entirely unrelated. Sorry for the idiocy, hope this helps at least one person...?

Pyter not working when written as a Python Program

I am using pyter API for finding translational error rate(TER) between two words. Pyter normally works in terminal, but when I am using it in Python code, it isn’t working. Normally, it works by writing pyter.ter(w1,w2), but now it is saying that pyter module has no attribute "ter".
actually it got solved. BY mistake I was saving the program named as pyter.py. So, whenever I was importing pyter, the error message of the actual program was being shown. I renamed the script as pyter_xyz.py, and its running fine.
Thanks for the concern #Kamiccolo

Timed Indexed Color sets in CPN Tools that results in Unhandled Exception Error

I am using CPN Tools to model a distributed system. CPN Tools uses CPN ML an extension of SML. The project homepage is: cpntools.org
I started with a simple model and when I try to make a particular indexed color set timed, I get an "Internal error". There is another indexed colorset within my Petri-net model that is timed and works correctly. I am not sure how I can troubleshoot since I don't understand the error message. Could you help me interpret the error message or give me some hints on what I could be doing wrong?
The model is:
http://imgur.com/JUjPRHK
The declarations of the model are:
http://imgur.com/DvvpyvH
The error message is:
Internal error: Compile error when generating code. Caught error.../compiler/TopLevel/interact/evalloop.sml:296.17-296.20../compiler/TopLevel/interact/evalloop.sml:44.55../compiler/TopLevel/interact/evalloop.sml:66.19-66.27
structure CPN`TransitionID1413873858 = struct ... end (* see simulator debug info for full code *)
simglue.sml:884.12-884.43
"
Thank you~
I know this is an old question, but I run in the same problem and wasted too much time on this, so maybe it will help someone else in the future.
I didn't understand exactly the reason for this, but it seems the problem appears when you play with time values on an arch that ends to a transition (I was updating an integer value to the current time, using IntInf.toInt(time())). Now, if I move the code on the outgoing arch of that transition (that is: the one that ends in a place) there is no error.

opencv error : bad argument (bad image header) in cvCloneImage file build/buildd/opencv-2.1.0/src/cxcore/cxarray.cpp, line 3122

sorry for my english..
i'm new to opencv, and i want to try samples square.cpp,i used codeblocks on ubuntu.
but i got error when i compiled and run it, it said that (on Xterm):
opencv error : bad argument (bad image header) in cvCloneImage file build/buildd/opencv-2.1.0/src/cxcore/cxarray.cpp, line 3122
so, my question is, how to fix it?
thanks.
It may contain some code which is using some input images. The important thing is that those input images might not be null.
This error comes in cxarray.cpp where we have the code like if (!CV_IS_IMAGE_HDR(src)). Now if you check for the definition of this
#define CV_IS_IMAGE_HDR
You will get it as:
((img) != NULL && ((const IplImage*)(img))->nSize == sizeof(IplImage))
The first thing it checks is for null image. So in your case you might not have the input image with you.
Select a input image you have and then try again. It will work, as it have worked for me.