Search Results

Search found 5015 results on 201 pages for 'compiler construction'.

Page 22/201 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • ICC vs GCC - Optimization and CPU architecture

    - by Rayne
    Hi all, I'm interested in knowing how GCC differs from Intel's ICC in terms of the optimization levels and catering to specific processor architecture. I'm using GCC 4.1.2 20070626 and ICC v11.1 for Linux. How does ICC's optimization levels (O1 to O3) differ from GCC, if they differ at all? The ICC is able to cater specifically to different architectures (IA-32, intel64 and IA-64). I've read that GCC has the -march compiler option which I think is similar, but I can't find a list of the options to use. I'm using Intel Xeon X5570, which is 64-bit. Are there any other GCC compiler options I could use that would cater my applications for 64-bit Intel CPUs? Thank you. Regards, Rayne

    Read the article

  • Compiler warning "not found in protocol(s)" when using [[[UIApplication sharedApplication] delegate]

    - by DK Crame
    I have myClass instantiated by my appDelegate, I have another class, newClass instantiated by myClass. From the newClass instance, I want to access a property in the myClass instance that created it. I have done this by: [[[UIApplication sharedApplication].delegate myClass] property] This works, I can actually get the property but I get this warning from Xcode: warning: "-myClass" not found in protocols warning: no "-myClass" method found (messages without a matching signature will be assumed to return "id" and accept "..." as arguments) The newClass property has been correctly declared in the .h and .m files, it's properties have been set and it has been synthesized. It compiles and runs and I can actually get the property's value. Should I ignore the warning in Xcode? Is there a better way to access the myClass instance's property?

    Read the article

  • iphone - compiler conditionals

    - by Mike
    Two questions: this code #ifdef __IPHONE_3_0 // iPhone 3.0 specific stuff #else // iPhone 2.2 specific stuff #endif compiles specific codes for specific versions of the iPhone. How could this be transformed to compile for a range of devices? For example: if iphone version < 3.1 or if version = 3.2, and so one... 2) where do I get a list of all conditionals allowed by Xcode? thanks for any help.

    Read the article

  • Use any CSS compiler (Sass, Less) to generate the selector

    - by xckpd7
    So I've recently been playing around with CSS compilers, but I have no idea how (or if it's possible) to dynamically generate pieces of a selector. For instance, let's say I wanted to make mixins to get display: inline-block; to work cross browser. I would have to do the styles, yeah, but I would have to do the IE6/7 selector hacks to get them to work in those browsers too. Ideally I'm looking for a one off thing to add to an element and have the ability for that to work. Some kind person recently gave me this solution: http://stackoverflow.com/questions/2746754/css-compilers-and-converting-ie-hacks-to-conditional-css/2747036#2747036 and it would be nice to implement that in a minimal way that would allow me to specify it for a given element and be on my way (for instance in Less, you can create a class with styles, pass that class to another element, and that element will inherit all of those styles. It would be nice to pass an element .inline-block; and it create the styles needed to support IE6/7 without having to resort to stuff like _color: pink; Any ideas? EDIT: for instance as well, how could I do something like clearfix for LESS? (lesscss.org)? If Sass can only do it then that will work too.

    Read the article

  • Alternative to Turbo C

    - by Asad Jibran Ahmed
    My university is hosting a Programming Competition, and have decided to support Turbo C (the 16-bit DOS version) as a valid programming environment. I have just read that PC^2, the software that is going to be used to auto-judge the competition, does not support 16-bit programs. So, is there any alternative to Turbo C that I can use. I need the same header files, and the compiler would need to support all the outdated C standards that Turbo C supports. But the output needs to be 32-bit. Is there any compiler that can satisfy these conditions?

    Read the article

  • Seam/JSF/Facelets Compiler or Validator (equivalent of JspC for JSP)

    - by Drew
    Is there such a thing as JspC in the Seam/JSF/Facelets world? I used the Tomcat's JspC to validate a JSP/Struts application to validate if there are typos in the JSPs or some JSP was calling a Java function that didn't exist, etc. etc. From time to time I come across bugs in my current project (Seam/Facelets/RichFaces) where it's caused by a typo in action/value binding. And I think bugs like these can be caught using a program. Just wondering if someone has already written one. Basically a tool that can validate if the method/value binding are correct. I know this would be specially hard in Seam since names are Context sensitive and the tool should somehow figure out what the context is. But I think it should be easier to just check if the names are valid and the Objects bound to those names have the methods and/or properties being referred to in the JSF page. Thanks

    Read the article

  • Compiler optimization of reference variables

    - by Phineas
    I often use references to simplify the appearance of code: vec3f& vertex = _vertices[index]; // Calculate the vertex position vertex[0] = startx + col * colWidth; vertex[1] = starty + row * rowWidth; vertex[2] = 0.0f; Will compilers recognize and optimize this so it is essentially the following? _vertices[index][0] = startx + col * colWidth; _vertices[index][1] = starty + row * rowWidth; _vertices[index][2] = 0.0f;

    Read the article

  • Pesky compiler error on iPhone app

    - by RexOnRoids
    Trying to get MGTwitterEngine app to build. Getting one pesky error. The following ERROR. ld warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib/libxml2.dylib, missing required architecture i386 in file ld warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib/libobjc.A.dylib, missing required architecture i386 in file ld warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib/libSystem.dylib, missing required architecture i386 in file ld: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib/libobjc.A.dylib, missing required architecture i386 in file collect2: ld returned 1 exit status

    Read the article

  • Tricky compiler behavior

    - by Neeraj
    Simple java code snippet. It has three classes. After compiling the code please delete A.class and then execute the code. Code still runs, why its not checking whether the byte code of A exists or not? class A { static { System.out.println("In the class A"); } public A() { } } class B { private A a = null; static { System.out.println("In the class B"); } public B() { a = new A(); } } public class ExampleLinkage { static { System.out.println("In the class A"); } public ExampleLinkage(String str) { } public static void main(String args[]) { try { System.out.println("In the main method of ExampleLinkage"); Class.forName("com.bt.rtti.B"); } catch(Exception e) { e.printStackTrace(); } } }

    Read the article

  • Compiler optimization of references

    - by Phineas
    I often use references to simplify the appearance of code: vec3f& vertex = _vertices[index]; // Calculate the vertex position vertex[0] = startx + col * colWidth; vertex[1] = starty + row * rowWidth; vertex[2] = 0.0f; Will compilers recognize and optimize this so it is essentially the following? _vertices[index][0] = startx + col * colWidth; _vertices[index][1] = starty + row * rowWidth; _vertices[index][2] = 0.0f;

    Read the article

  • Embedded Prolog Interpreter/Compiler for Java

    - by Sami
    I'm working on an application in Java, that needs to do some complex logic rule deductions as part of its functionality. I'd like to code my logic deductions in Prolog or some other logic/constraint programming language, instead of Java, as I believe the resulting code will be significantly simpler and more maintainable. I Googled for embedded Java implementations on Prolog, and found number of them, each with very little documentation. My (modest) selection criteria are: should be embeddable in Java (e.g. can be bundled up with my java package instead of requiring any native installations on external programs) simple interface to use from Java (for initiating deductions, inspecting results, and adding rules) come with at least a few examples on how to use it doesn't necessarely have to be Prolog, but other logic/constraint programming languages with the above criteria would suit my needs, too. What choices do I have and what are their advantages and disadvantages?

    Read the article

  • How can I easily maintain a cross-file JavaScript Library Development Environment

    - by John
    I have been developing a new JavaScript application which is rapidly growing in size. My entire JavaScript Application has been encapsulated inside a single function, in a single file, in a way like this: (function(){ var uniqueApplication = window.uniqueApplication = function(opts){ if (opts.featureOne) { this.featureOne = new featureOne(opts.featureOne); } if (opts.featureTwo) { this.featureTwo = new featureTwo(opts.featureTwo); } if (opts.featureThree) { this.featureThree = new featureThree(opts.featureThree); } }; var featureOne = function(options) { this.options = options; }; featureOne.prototype.myFeatureBehavior = function() { //Lots of Behaviors }; var featureTwo = function(options) { this.options = options; }; featureTwo.prototype.myFeatureBehavior = function() { //Lots of Behaviors }; var featureThree = function(options) { this.options = options; }; featureThree.prototype.myFeatureBehavior = function() { //Lots of Behaviors }; })(); In the same file after the anonymous function and execution I do something like this: (function(){ var instanceOfApplication = new uniqueApplication({ featureOne:"dataSource", featureTwo:"drawingCanvas", featureThree:3540 }); })(); Before uploading this software online I pass my JavaScript file, and all it's dependencies, into Google Closure Compiler, using just the default Compression, and then I have one nice JavaScript file ready to go online for production. This technique has worked marvelously for me - as it has created only one global footprint in the DOM and has given me a very flexible framework to grow each additional feature of the application. However - I am reaching the point where I'd really rather not keep this entire application inside one JavaScript file. I'd like to move from having one large uniqueApplication.js file during development to having a separate file for each feature in the application, featureOne.js - featureTwo.js - featureThree.js Once I have completed offline development testing, I would then like to use something, perhaps Google Closure Compiler, to combine all of these files together - however I want these files to all be compiled inside of that scope, as they are when I have them inside one file - and I would like for them to remain in the same scope during offline testing too. I see that Google Closure Compiler supports an argument for passing in modules but I haven't really been able to find a whole lot of information on doing something like this. Anybody have any idea how this could be accomplished - or any suggestions on a development practice for writing a single JavaScript Library across multiple files that still only leaves one footprint on the DOM?

    Read the article

  • objective-c Derived class may not respond to base class method

    - by zadam
    Hi, I have derived from a 3rd party class, and when I attempt to call a method in the base class, I get the x may not respond to y compiler warning. How can I remove the warning? Repro: @interface ThirdPartyBaseClass : NSObject {} +(id)build; -(void)doStuff; @end @implementation ThirdPartyBaseClass +(id) build{ return [[[self alloc] init] autorelease]; } -(void)doStuff{ } @end @interface MyDerivedClass : ThirdPartyBaseClass {} +(id)buildMySelf; @end @implementation MyDerivedClass +(id)buildMySelf{ self = [ThirdPartyBaseClass build]; [self doStuff]; // compiler warning here - 'MyDerivedClass' may not respond to '+doStuff' return self; } @end Thanks!

    Read the article

  • iphone - compiler conditional on header

    - by Mike
    I have a project that generates applications for two targets. One of the targets has to include one additional delegate protocol that should not be present on the other one. So, I have created a macro on Xcode and declared the header like this: #ifdef TARGET_1 @interface myViewController : UIViewController <UIScrollViewDelegate, UIPopoverControllerDelegate> #endif #ifdef TARGET_2 @interface myViewController : UIViewController <UIScrollViewDelegate> #endif { .... bla bla.... } The problem is that Xcode is not liking this "double" declaration of @interface and is giving me all sort of problems. How to solve that? thanks for any help.

    Read the article

  • Need help in resolving a compiler error: error: invalid conversion from ‘int’ to ‘GIOCondition’

    - by michael
    I have a simple cpp file which uses GIO. I have stripped out everything to show my compile error: Here is the error I get: My.cpp:16: error: invalid conversion from ‘int’ to ‘GIOCondition’ make[2]: *** [My.o] Error 1 Here is the complete file: #include <glib.h> static gboolean read_socket (GIOChannel *gio, GIOCondition condition, gpointer data) { return false; } void createGIOChannel() { GIOChannel* gioChannel = g_io_channel_unix_new(0); // the following is the line causing the error: g_io_add_watch(gioChannel, G_IO_IN|G_IO_HUP, read_socket, NULL); } I have seen other example using gio, and I am doing the same thing in term of calling G_IO_IN|G_IO_HUP. And the documentation http://www.gtk.org/api/2.6/glib/glib-IO-Channels.html, said I only need to include , which I did. Can you please tell me how to resolve my error? One thing I can think of is I am doing this in a cpp file. But g_io_add_watch is a c function? Thank you for any help. I have spent hours on this but did not get anywhere.

    Read the article

  • #pragma init and #pragma fini using gcc compiler on linux

    - by Josh
    I would like to build some code which calls some code on loadup of the shared library. I thought i would do it like this: #pragma init(my_init) static void my_init () { //do-something } int add (int a,int b) { return a+b; } So when i build that code with gcc -fPIC -g -c -Wall tt.c It returns gcc -fPIC -g -c -Wall tt.c tt.c:2: warning: ignoring #pragma init tt.c:4: warning: ‘my_init’ defined but not used So its warning my #pragmas. I tried this in real code and my code aborted because a function hadn't been called in the pragma section because it was ignored. How do i get gcc to use these #pragma init and fini statemets?

    Read the article

  • floating exception using icc compiler

    - by Hristo
    I'm compiling my code via the following command: icc -ltbb test.cxx -o test Then when I run the program: time ./mp6 100 > output.modified Floating exception 4.871u 0.405s 0:05.28 99.8% 0+0k 0+0io 0pf+0w I get a "Floating exception". This following is code in C++ that I had before the exception and after: // before if (j < E[i]) { temp += foo(0, trr[i], ex[i+j*N]); } // after temp += (j < E[i])*foo(0, trr[i], ex[i+j*N]); This is boolean algebra... so (j < E[i]) is either going to be a 0 or a 1 so the multiplication would result either in 0 or the foo() result. I don't see why this would cause a floating exception. This is what foo() does: int foo(int s, int t, int e) { switch(s % 4) { case 0: return abs(t - e)/e; case 1: return (t == e) ? 0 : 1; case 2: return (t < e) ? 5 : (t - e)/t; case 3: return abs(t - e)/t; } return 0; } foo() isn't a function I wrote so I'm not too sure as to what it does... but I don't think the problem is with the function foo(). Is there something about boolean algebra that I don't understand or something that works differently in C++ than I know of? Any ideas why this causes an exception? Thanks, Hristo

    Read the article

  • C++ to bytecode compiler for CLR?

    - by paleozogt
    I'd like to be able to compile a C++ library so that it runs within a managed runtime in the CLR. There are several tools for doing this with the JVM (NestedVM, LLJVM, etc) but I can't seem to find any for the CLR. Has anyone tried doing this?

    Read the article

  • Compiler error: memset was not declared in this scope

    - by michael
    Hi, I am trying to compile my c program in ubuntu 9.10 (gcc 4.4.1). I am getting this error: Rect.cpp:344: error: ‘memset’ was not declared in this scope But the problem is I have already included in my cpp file: #include <stdio.h> #include <stdlib.h> And the same program compiles fine under ubuntu 8.04 gcc 4.2.4). Please tell me what am i missing. Thank you.

    Read the article

  • C++ to bytecode compiler for Silverlight CLR?

    - by paleozogt
    I'd like to be able to compile a C/C++ library so that it runs within a safe managed runtime in the Silverlight CLR. There are several tools for doing this with the JVM that allows C++ code to run within a CRT emulation layer (see NestedVM, LLJVM, etc), which effectively allows C++ code to be run within a Java Applet. There's even a tool for this for the Adobe Flash VM (see Alchemy). However, I can't seem to find any tools like this for the CLR. fyi, the MSVC tools don't seem to allow for this: The /clr:pure flag will create C++ code that runs in the CLR, but it isn't safe (because the CRT isn't safe) and /clr:safe requires massive code changes (no native types, etc).

    Read the article

  • Java compiler error: "cannot find symbol" when trying to access local variable

    - by HH
    $ javac GetAllDirs.java GetAllDirs.java:16: cannot find symbol symbol : variable checkFile location: class GetAllDirs System.out.println(checkFile.getName()); ^ 1 error $ cat GetAllDirs.java import java.util.*; import java.io.*; public class GetAllDirs { public void getAllDirs(File file) { if(file.isDirectory()){ System.out.println(file.getName()); File checkFile = new File(file.getCanonicalPath()); }else if(file.isFile()){ System.out.println(file.getName()); File checkFile = new File(file.getParent()); }else{ // checkFile should get Initialized at least HERE! File checkFile = file; } System.out.println(file.getName()); // WHY ERROR HERE: checkfile not found System.out.println(checkFile.getName()); } public static void main(String[] args) { GetAllDirs dirs = new GetAllDirs(); File current = new File("."); dirs.getAllDirs(current); } }

    Read the article

  • Start exe even with missing dependency dlls?

    - by k3b
    In Dotnet2.0 and later a program refuses to start if one of its dependent (static referenced) dlls are missing. With Dotnet1.1 and 1.0 the program started but crashed later when trying to use functionality of the missing assembly. I wonder if there is something like a compiler switch , configuration option or a dotnet [attribute] to allow me to start the app when certain dlls are missing. Is it possible without moidfying the sourcecode (execpt by applying some Attriutes)? I don't want to manualy load assemblies by programcode or use IOC-Framworks. Update: With "static referenced dlls" i mean the opposite of dynamicly loading a dll in my own programcode using reflection and Assembly.Loadxxxx(). Update 2010-12-25: This scenario happens for example if you want to use Log4net with Dotnet4 clientprofile together with a WinForms-Aplication: Log4net requires System.Web.dll that is not in Dotnet4-Clientprofile. You must install dotnet4-web-support to use the winforms-aplication that is compiled against log4net unless there is some magic Compiler-switch/Attribute/Configuration that i am still looking for.

    Read the article

  • pro*C in oracle XE

    - by srandpersonia
    I downloaded the free express edition of oracle, Oracle XE. I couldn't find the pro*c compiler in this edition. I read somewhere that oracle 9i client has pro*C, So I presumed that oracle client for 10g XE should have it too and downloaded it. But to my disappointment, I can't find it there too. :(. Is there a way to download the older oracle 9i and use it connect to 10g XE without any compatibility problems?. Or is it possible to download the pro*C compiler alone?. I don't want to download the standard editions as they are too large(2 GB). Thanks.

    Read the article

  • Compiler Errors...it ran yesterday!?

    - by howdytest
    This is a pre-existing Java project being run in Eclipse 3.5.2 32 bit.. Day 1: Install Java SE 6 Update 20 JDK. Experience Crash in Eclipse. Install Java 5. Same problem-(uninstall java 5). Re-install Java 6. Install Eclipse 3.3.1. Install Eclipse 3.5.2. 32-bit. No problems. Run Eclipse 3.5.2. 64-bit. No problems. Set up the project, configure, and run. No problems. Day 2: Load Eclipse to start a new project. Previous project now has 940 errors. Error Type is "Java Problem". The project ran 100% without a problem on Day 1. The only thing that happened between Day 1 and Day 2 was restarting my computer. I just tried to recreate the project, step by step, and am still getting the same errors. I know it's not the code -- it was working. Not to mention that it's an opensource project, such a problem would be documented. I'm thinking something is wrong with my Java install. Or, perhaps, it's a 32-bit/64-bit problem. I'm running win7 64bit. So before formatting my window's partition, I thought I'd throw the problem your way to see if anyone knows what's going on. Thanks.

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >