graphics.h - installed it, why still error? [closed] - c++

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
So i followed instructions from an another question answer in this page about how to install graphics.h And it resulted correctly. But when i included it, it showed me this error message:
C:\Program Files\CodeBlocks\MinGW\include\graphics.h|302|error: redefinition of 'int right'|
C:\Program Files\CodeBlocks\MinGW\include\graphics.h|302|note: 'int right' previously declared here|
Why did this happend? Can you please help me fix this problem?
This is where i got the information from:
How to use graphics.h in codeblocks?

Did you followed the last resolution provided in the link you have specified?
Open the file graphics.h using either of Sublime Text Editor or Notepad++,from the include folder where you have installed Codeblocks.
Goto line no 302
Delete the line and paste int left=0, int top=0, int right=INT_MAX, int bottom=INT_MAX, in that line.
Save the file and start Coding.

Related

C++ code compiles with Rcpp on Mac but not Windows [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed yesterday.
This post was edited and submitted for review 15 hours ago.
Improve this question
I'm working on an R software package involving C++ code written by someone else, and on my Mac everything loads and works properly. However, when I migrate the same code to Windows, everything breaks during compilation. I have received two suggestions on how to fix the problem:
In the C++ package it says that I need to add certain CFLAGS to their Makefile to run on Windows, however I don't have a Makefile in my src folder and everything still works on Mac.. is there a proper way to add CFLAGS for Rcpp to run on Windows? Do I need to add a Makefile.win?
The C++ package calls another C++ package (in its external directory) which has compiled Windows binaries in a .vcproj file (besides their actual C++ code). Should this file be included in my src directory for Rcpp to use on Windows?
Thanks!!
Edit: The types of error messages I'm getting on Windows are in two main flavours:
undefined reference to varname (some examples of varname were Rf_xlength, std::basic_streambuf<char, std::char_traits<char> >::seekpos(std::fpos<int>, std::_Ios_Openmode), __imp_R_NilValue, REprintf and __imp__Z11annAllocPtsii.
statements like int figtreeEvaluateDirectTree(int, int, int, double*, double, double*, double*, double, double*) declared without dllimport attribute after being referenced with dll linkage.

Linking fails: [ilink32 Error] Fatal: Unable to open file 'DATA.OBJ' [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 days ago.
Improve this question
I'm trying to recompile a Windows C++ app inside a new compiler (RAD Studio 11). I'm an absolute beginner and running into a problem.
There is a .cbproj, DatabaseCppUtilities (32-bit), which threw an error. For it to compile and link successfully, I included dbrtl.lib so it could find Data::DB::TDataSet::GetRecord.
Now I'm compiling a different .cbproj of the app, which is using DatabaseCppUtilities, and it gives me this error:
[ilink32 Error] Fatal: Unable to open file 'DATA.OBJ'
I have the feeling it's related to the dbrtl.lib.
As I already said, I'm an absolute beginner, and maybe I'm missing something really simple, but for now I can't see what to do next.
I tried searching for the .obj file in the intermediate output directories, but can't seem to find any file named Data.obj.
I tried adding the dbrtl.lib to the different .cbproj using #pragma link "dbrtl.lib" and putting its path in the Shared Options > Library path.

two errors while compiling meshlab and vcglib [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
I got one problem during compiling the Meshlab_mini (2020.12 version) with Vcglib (2020.12 version) with visual studio 2019 and qt 5.15.2.
The problem is below
Severity Code Description Project File Line Suppression State Error
(active) E0135 class "vcg::tri::Append<vcgTriMesh, vcgTriMesh>" has no
member
"MeshAppendConst" meshlab-common E:\meshlab-master\src\common\ml_document\cmesh.cpp 38
Error (active) E0135 class "vcg::tri::Append<vcgTriMesh, vcgTriMesh>"
has no member
"MeshCopyConst" meshlab-common E:\LaSys\HumanFace\meshlab-master\src\common\ml_document\cmesh.cpp 59
Sure, there are no member functions named red above in the file of cmesh.cpp.
Could you help out of here? Many thanks.
[SOLVED] I got the sourcecode by the Code -> Download ZIP method, and then compiled the project with the error above. By the great help from Alessandro Muntonialessandro.muntoni#isti.cnr.it, i.e., the 'git clone --recursive github.com/cnr-isti-vclab/meshlab' method, then the compilation of the source code of the Meshlab and the Vcglib is perfectly solved. Many thanks to Alessandro Muntonialessandro.muntoni#isti.cnr.it.

What is wrong with the g++ command synatx? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 4 years ago.
Improve this question
I want to use Tensorflow shared object in my other C++ code, named as Temp_TF.cc
I am using the following command to create an executable.
g++ ../../../bazel-bin/tensorflow/cc/example/Temp_TF.so -ltensorflow_cc Temp_TF.cc -o Temp_TF
What is wrong with the following command?
I am getting the following error:
Temp_TF.cc:3:49: fatal error: tensorflow/cc/client/client_session.h: No such file or directory
compilation terminated.
I can see you're new to Stack Overflow.
Technically your question does not have enough data for us to provide an answer for sure.
However it looks to me as though you're missing a -I (capital i) directive and the compiler does not know where to find the tensorflow/cc/client/client_session.h path.
From the look of it, you could try:
g++ -I ../../../bazel-bin ../../../bazel-bin/tensorflow/cc/example/Temp_TF.so -ltensorflow_cc Temp_TF.cc -o Temp_TF
(note the -I)

Internal Error in codeblocks [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
My code was compiling just fine until recently i started using a pair for stl maps and then their was some issue.
Every time i compile any file which was compiling just fine before hand i get the error
The same error comes for every file regardless of its function. Its some internal error.
Ever time i try to compile a code this file stl_functions.h automatically opens.
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\include\c++\bits\stl_function.h|143|error: declaration of 'class _Tp'|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\include\c++\bits\stl_function.h|134|error: shadows template parm 'class _Tp'|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build finished: 50 errors, 0 warnings ===|
I got around 50 repetitive errors but i have shown only a few.
I have searched everywhere for this kind of error but i can't seem to find a solution.
Any help will be appreciated.
Did you by chance try to edit a standard header ? Reinstall MinGW/Code::Blocks and it should work again.