I want to check whether a value is equal to 1. Is there any difference in the following lines of code
Evaluated value == 1
1 == evaluated value
in terms of the compiler execution
Hello, when I get a compiler error (in my case gcc) in Emacs (version 23 for information) I use next-error Lisp function to jump to the next error :)
But when I do this the window is split vertically, but I want this to be done horizontally.
Anyone know how to modify this behavior?
Thanks
Hi, if I have a protocal defined, then it always generate a lot of warnings when compile.
like
@property (retain) id <SomeProc> value
then in the code:
[value class]; ...
[value release]
the compiler always complain it "may not have class or release defined".
Is there a way to fix this?
2 Interfaces with same method names and signatures. But implmented by a single class then how the compiler will identify the which method is for which interface.In java.
So here's a snippet of my code:
struct dv_nexthop_cost_pair
{
unsigned short nexthop;
unsigned int cost;
};
map<unsigned short, vector<struct dv_nexthop_cost_pair> > dv;
I'm getting the following compiler error:
error: ISO C++ forbids declaration of `map' with no type
What's the proper way to declare this?
Hi,
I've got quite a large Xcode project that since an Xcode upgrade is giving me loads of
"'weak_import' attribute ignored"
warnings, they are coming from WebKit, and a bit of research suggests it's a compiler bug.
Is there anyway to suppress them, I'm getting thousands, making the 'real' warnings impossible to find.
Cheers
MT
I am writing a special-purpose mini-compiler and I often view disassembled CIL to figure out how to do things. But it's often not obvious how to translate the disassembled code to Reflection.Emit calls. Does a reference manual exist or any other source of information for doing this translation?
i have a program that receives data from a wireless device over bluetooth...i now need to do some operations in the data and then send it to the website (web server!!!) as a .csv file...i also need to authenticate the device itself from it hardware address which is also obtained in the program.i am coding this in gcc linux compiler using C...can anyone tell me how do i go about doing this?
First, my compiler and OS:
Qt Creator 1.3
Qt 4.6 (32 bit)
Windows 7 Ultimate
I want to learn how to create and import a dll in Qt. I've created a *.dll file using Qt Creator, called Shared1.dll which contains nothing but an empty class named Shared1. Now I'd like to use Shared1 class in another Qt project. How can I do that?
Thanks in advance.
For this Java code:
String var;
clazz.doSomething(var);
Why does the compiler report this error:
Variable 'var' might not have been initialized
I thought all variables or references were initialized to null. Why do you need to do:
String var = null;
??
Most of the time, I prefer to write this :
if(isWelcome() == true){}
if(isWelcome() == false){}
instead of this
if(isWelcome()){}
if(!isWelcome()){}
Because I feel that it is easier to read (but I do understand that it doesn't make sense).
I would like to know if there is a common agreement about this practice. What most developer do? And I'm wondering if the compiler is doing the extra comparaison, or if it understand that it is useless.
Is there any way to write to the XCode build transcript? What i want to do, is throw a warning if a device is not attached to the computer instead of an assertion failure in my unit test cases (some cases rely on an attached ipod).
I thought of something like the standard compiler warnings (only with custom message).
Thanks.
This new language called Vala, which is said to be C#-like and supposedly easier than C++ or C, compiles down into C on Linux with the GCC compiler.
Sounds great. Now I want to use it to make a PHP module so that slow PHP code can be made in Vala and imported into PHP as a function.
How do I accomplish this in Vala? Is it even possible?
I have a very simple DLL written in unmanaged C++ that I access from my application. I recently switch to Visual Studio 2010, and the DLL went from 55k down to 35k with no code changes, and now it will no longer load in Windows 2000. I didn't change any code or compiler settings. I have my defines setup for 0x0500, which should include Windows 2000 support. Has anyone else run into this, or have any ideas of what I can do?
I want to create a method sum that I can call on different types, specifically sum(1,2).
def sum[A](a1: A, a2: A) = a1 + a2
This fails because the compiler can't tell if A has a method '+'
I tried to define a structural type:
type Addable = {def +(a: Addable)}
This fails because of an illegal cyclic reference
How can I achieve this in a type safe way without requiring A to extend a specific trait?
I am curious as to why an implicit cast fails in...
int? someValue = SomeCondition ? ResultOfSomeCalc() : null;
and why I have to perform an explicit cast instead
int? someValue = SomeCondition ? ResultofSomeCalc() : (int?)null;
It seems to me that the compiler has all the information it need to make an implicit casting decision, no?
Hello.
Qt library includes advanced meta-programming capabilities using they own preprocessing moc compiler. Does anyone knows, is it possible to create some kind of mix-ins via it? For example, i have a QString and want to add a method to it without sub-classing and changing existing code. Does Qt have such solutions for that?
I use Cmake with GNU Make and would like to see all commands exactly (for example how the compiler is executed, all the flags etc)
GNU make has --debug, but it does not seem to be that helpful are there any other options? Does Cmake provide additional flags in the generated Makefile for debugging purpose?
Hi,
while(((long)(1000*ratio*((long)clock()-(long)t0))%100)/1000)<Data_Read_Rate);
The above line is generating the following error:
"Syntax Error before < token".
Why is this error coming up?
I use MINGW32 for development(GCC compiler).
Thanks...
Type mismatch. Expecting a LexBuffer but given a LexBuffer The type 'char' does not match the type 'byte'
This is the error message that I am getting while using fslex. I have tried manually checking every single occurrence of lexbuf and its type. It's LexBuffer everywhere. But still the compiler is giving me the above error. Can you please tell me why this error occurs and how to go about resolving it.
Thanks,
chandrasekhar
I have gcc installed in c:/programfiles (also set as a path variable), and i have all the necessary files for gtk from http://www.gtk.org/download-windows.html, glib,gtk,pango,atk and cairo. Although I have no clue as to how to compile a c program using gtk with the gcc compiler. How do I set everything up so that it works?. (I don't know where each zip file goes.?) basically I don't really know where start.
Hello,
In which case should you use primitive types(int) or complex types(Integer)?
Ex:
http://stackoverflow.com/questions/2508918/why-java-compiler-does-not-like-integer-as-type-for-values-in-hashmap this example works with Integer type. Should we always use Integer as a complex type?
I have deployed successfully the dotnetopenid dll under IIS7 but on my shared hosting service it says:
Compilation Error Description: An
error occurred during the compilation
of a resource required to service this
request. Please review the following
specific error details and modify your
source code appropriately.
Compiler Error Message: CS0246: The
type or namespace name 'DotNetOpenId'
could not be found (are you missing a
using directive or an assembly
reference?)
Why ?
I accidentally moved my Dynamic Data' folder into myImagesfolder. The project still compiles, but it's just not right. However, when I try to move it back to the root in Visual Studio, I get an error that the destination folder already exists. If I moveDynamic Data` back to the root outside of Visual Studio, the project no longer compiles because the compiler can't find any dynamic data files.
My infancy with git prompted me to ask here before embarking on an unpleasant 2am quest.
hello
I am trying to use oprofile to generate call graph.
Compiler is g++, platform is linux x86-64, linker is gfortran
C++ code is compiled with -fno- omit-frame-pointer.
oprofile is started with --callgraph=25.
report I run with --callgraph.
the call graph is produced but it's only includes self time, which is not much use
what am I missing?