Search Results

Search found 6159 results on 247 pages for 'compile'.

Page 11/247 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Opscode Chef nginx compile from source issue reports successful run but does nothing

    - by v_abhi_v
    I am trying to install nginx from source in Opscode Chef and its bit weird, it runs complaining nothing but does not install it either. This is how my role attributes look like looks like "nginx":{ "default_site_enabled":false, "version":"1.2.6", "init_style":"init", "install_method":"source", "configure_flags":[ "--without-http_access_module", "--without-http_auth_basic_module", "--without-http_autoindex_module", "--without-http_browser_module", "--without-http_charset_module", "--without-http_fastcgi_module", "--without-http_memcached_module", "--without-http_referer_module", "--without-http_scgi_module", "--without-http_split_clients_module" ], "log_dir":"/var/log/nginx", "binary":"/opt/nginx/sbin/nginx", "source":{ "prefix":"/opt/nginx/dist", "modules":["http_ssl_module", "http_gzip_static_module" ] } }, The chef log shows: [2012-12-19T02:37:44+00:00] INFO: Processing bash[compile_nginx_source] action run (nginx::source line 82) [2012-12-19T02:37:45+00:00] INFO: bash[compile_nginx_source] ran successfully I am clueless on what's going on :(

    Read the article

  • compile Passenger statically into Apache httpd?

    - by Oleg
    I prefer to disable httpd dynamic module loading on my production server. I've been using mod_jk linked statically into httpd for quite a long time and it proved to be stable. Now I would like to add Ruby Passenger (mod_rails/mod_rack) to my httpd. I wonder if it is possible to link it statically into Apache httpd the same way too? (without producing a huge httpd) If it is, are there any potential pitfalls, safety or performance concerns having both mod_jk and mod_rails within the same executable? Thanks

    Read the article

  • Unable to compile netmap on Fedora 32 bit

    - by John Elf
    This is the error everytime I try to install netmap: Can someone let me know how to isntall the same on e1000e or ixgbe. I have kernel header and source installed. [root@localhost e1000]# make KSRC=/usr/src/kernels/2.6.35.6-45.fc14.i686/ make -C /usr/src/kernels/2.6.35.6-45.fc14.i686/ M=/media/sf_Shared/netmap-linux/net/e1000 modules make[1]: Entering directory /usr/src/kernels/2.6.35.6-45.fc14.i686' CC [M] /media/sf_Shared/netmap-linux/net/e1000/e1000_main.o /media/sf_Shared/netmap-linux/net/e1000/e1000_main.c: In function ‘e1000_setup_tx_resources’: /media/sf_Shared/netmap-linux/net/e1000/e1000_main.c:1485:2: error: implicit declaration of function ‘vzalloc’ /media/sf_Shared/netmap-linux/net/e1000/e1000_main.c:1485:20: warning: assignment makes pointer from integer without a cast /media/sf_Shared/netmap-linux/net/e1000/e1000_main.c: In function ‘e1000_setup_rx_resources’: /media/sf_Shared/netmap-linux/net/e1000/e1000_main.c:1680:20: warning: assignment makes pointer from integer without a cast /media/sf_Shared/netmap-linux/net/e1000/e1000_main.c: In function ‘e1000_tx_csum’: /media/sf_Shared/netmap-linux/net/e1000/e1000_main.c:2780:2: error: implicit declaration of function ‘skb_checksum_start_offset’ /media/sf_Shared/netmap-linux/net/e1000/e1000_main.c: In function ‘e1000_rx_checksum’: /media/sf_Shared/netmap-linux/net/e1000/e1000_main.c:3689:2: error: implicit declaration of function ‘skb_checksum_none_assert’ /media/sf_Shared/netmap-linux/net/e1000/e1000_main.c: In function ‘e1000_restore_vlan’: /media/sf_Shared/netmap-linux/net/e1000/e1000_main.c:4617:23: error: ‘VLAN_N_VID’ undeclared (first use in this function) /media/sf_Shared/netmap-linux/net/e1000/e1000_main.c:4617:23: note: each undeclared identifier is reported only once for each function it appears in make[2]: *** [/media/sf_Shared/netmap-linux/net/e1000/e1000_main.o] Error 1 make[1]: *** [_module_/media/sf_Shared/netmap-linux/net/e1000] Error 2 make[1]: Leaving directory/usr/src/kernels/2.6.35.6-45.fc14.i686' make: * [all] Error 2

    Read the article

  • The very bare minimum of latex to compile documents

    - by ldigas
    I'm creating a relatively small console program which will be used by some other people as well. As part of its output it will be creating a tex file which will contain some two tables, a few rows of text and one plot. Not, my program is pretty small - under a Mb. The problem is I can't count on my users to have latex installed, so I'd like to include the very bare minimum required files to create it (pdf). What would be a good place to start searching on that topic, or even better, does anyone know what I would need to include with it to accomplish that ? I remember my last latex install being pretty ... well, gigantic. Kind regards !

    Read the article

  • How to compile zip/tar file using SSH

    - by JM4
    I am trying to run through the following instructions: install ssh when I get to the line "make" in the installation for zlib (first box), the following error is returned: make: * No targets specified and no makefile found. Stop. any ideas?

    Read the article

  • why won't php 5.3.3 compile libphp5.so on redhat ent

    - by spatel
    I'm trying to upgrade to php 5.3.3 from php 5.2.13. However, the apache module, libphp5.so will not be compiled. Below is a output I got along with the configure options I used. The configure statement is a reduced version of what I normally use. ========== './configure' '--disable-debug' '--disable-rpath' '--with-apxs2=/usr/local/apache2/bin/apxs' ... ** ** ** Warning: inter-library dependencies are not known to be supported. ** ** ** All declared inter-library dependencies are being dropped. ** ** ** Warning: libtool could not satisfy all declared inter-library ** ** ** dependencies of module libphp5. Therefore, libtool will create ** ** ** a static module, that should work as long as the dlopening ** ** ** application is linked with the -dlopen flag. copying selected object files to avoid basename conflicts... Generating phar.php Generating phar.phar PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled. clicommand.inc pharcommand.inc directorytreeiterator.inc directorygraphiterator.inc invertedregexiterator.inc phar.inc Build complete. Don't forget to run 'make test'. ============= php 5.2.13 recompiles just fine so something is up with 5.3.3. Any help would be greatly appreciated!!

    Read the article

  • why won't php 5.3.3 compile libphp5.so on redhat ent

    - by spatel
    I'm trying to upgrade to php 5.3.3 from php 5.2.13. However, the apache module, libphp5.so will not be compiled. Below is a output I got along with the configure options I used. The configure statement is a reduced version of what I normally use. ========== './configure' '--disable-debug' '--disable-rpath' '--with-apxs2=/usr/local/apache2/bin/apxs' ... ** ** ** Warning: inter-library dependencies are not known to be supported. ** ** ** All declared inter-library dependencies are being dropped. ** ** ** Warning: libtool could not satisfy all declared inter-library ** ** ** dependencies of module libphp5. Therefore, libtool will create ** ** ** a static module, that should work as long as the dlopening ** ** ** application is linked with the -dlopen flag. copying selected object files to avoid basename conflicts... Generating phar.php Generating phar.phar PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled. clicommand.inc pharcommand.inc directorytreeiterator.inc directorygraphiterator.inc invertedregexiterator.inc phar.inc Build complete. Don't forget to run 'make test'. ============= php 5.2.13 recompiles just fine so something is up with 5.3.3. Any help would be greatly appreciated!!

    Read the article

  • InvalidOperationException (Lambda parameter not in scope) when trying to Compile a Lambda Expression

    - by Moshe Levi
    Hello, I'm writing an Expression Parser to make my API more refactor friendly and less error prone. basicaly, I want the user to write code like that: repository.Get(entity => entity.Id == 10); instead of: repository.Get<Entity>("Id", 10); Extracting the member name from the left side of the binary expression was straight forward. The problems began when I tried to extract the value from the right side of the expression. The above snippet demonstrates the simplest possible case which involves a constant value but it can be much more complex involving closures and what not. After playing with that for some time I gave up on trying to cover all the possible cases myself and decided to use the framework to do all the heavy lifting for me by compiling and executing the right side of the expression. the relevant part of the code looks like that: public static KeyValuePair<string, object> Parse<T>(Expression<Func<T, bool>> expression) { var binaryExpression = (BinaryExpression)expression.Body; string memberName = ParseMemberName(binaryExpression.Left); object value = ParseValue(binaryExpression.Right); return new KeyValuePair<string, object>(memberName, value); } private static object ParseValue(Expression expression) { Expression conversionExpression = Expression.Convert(expression, typeof(object)); var lambdaExpression = Expression.Lambda<Func<object>>(conversionExpression); Func<object> accessor = lambdaExpression.Compile(); return accessor(); } Now, I get an InvalidOperationException (Lambda parameter not in scope) in the Compile line. when I googled for the solution I came up with similar questions that involved building an expression by hand and not supplying all the pieces, or trying to rely on parameters having the same name and not the same reference. I don't think that this is the case here because I'm reusing the given expression. I would appreciate if someone will give me some pointers on this. Thank you.

    Read the article

  • Strange VS2005 compile errors: unable to locate resource file (because the compiler keeps deleting i

    - by Velika
    I AM GETTING THE FOLLOWING ERROR IN A VERY SIMPLE CLASS LIBRARY: Error 1 Unable to copy file "obj\Debug\SMIT.SysAdmin.BusinessLayer.Resources.resources" to "obj\Debug\SMIT.SysAdmin.BusinessLayer.SMIT.SysAdmin.BusinessLayer.Resources.resources". Could not find file 'obj\Debug\SMIT.SysAdmin.BusinessLayer.Resources.resources'. SMIT.SysAdmin.BusinessLayer Going to the Project Properties-Resource tab, I see that I defined do resources. Still, I tried to delete the resource file and recreate by going to the resource tab. When I recompile, I still get the same error. Why is it even looking for a resource file? I define no resources on teh project properties tab and added no new resource file items. Any suggestions of things to try? Update: I found the missing file in an old backup. I copied it to the location where the compiler expected it, and then successfully recompiled the project that previously had compile time errors. However, when I rebuild the entire solution, it deletes the file that I previously restored and I'm back to where I started. My solution contains several projects (maybe 10 or so). Could VS 2005 be having a problem determining dependencies and the proper order to compile these projects?

    Read the article

  • android compile error: could not reserve enough space for object heap

    - by moonlightcheese
    I'm getting this error during compilation: Error occurred during initialization of VM Could not create the Java virtual machine. Could not reserve enough space for object heap What's worse, the error occurs intermittently. Sometimes it happens, sometimes it doesn't. It seems to be dependent on the amount of code in the application. If I get rid of some variables or drop some imported libraries, it will compile. Then when I add more to it, I get the error again. I've included the following sources into the application in the [project_root]/src/ directory: org.apache.httpclient (I've stripped all references to log4j from the sources, so don't need it) org.apache.codec (as a dependency) org.apache.httpcore (dependency of httpclient) and my own activity code consisting of nothing more than an instance of HttpClient. I know this has something to do with the amount of memory necessary during compile time or some compiler options, and I'm not really stressing my system while i'm coding. I've got 2GB of memory on this Core Duo laptop and windows reports only 860MB page file usage (haven't used any other memory tools. I should have plenty of memory and processing power for this... and I'm only compiling some common http libs... total of 406 source files. What gives? Android API Level: 5 Android SDK rel 5 JDK version: 1.6.0_12

    Read the article

  • android compile error: could not reserve enough space for object heap

    - by moonlightcheese
    I'm getting this error during compilation: Error occurred during initialization of VM Could not create the Java virtual machine. Could not reserve enough space for object heap What's worse, the error occurs intermittently. Sometimes it happens, sometimes it doesn't. It seems to be dependent on the amount of code in the application. If I get rid of some variables or drop some imported libraries, it will compile. Then when I add more to it, I get the error again. I've included the following sources into the application in the [project_root]/src/ directory: org.apache.httpclient (I've stripped all references to log4j from the sources, so don't need it) org.apache.codec (as a dependency) org.apache.httpcore (dependency of httpclient) and my own activity code consisting of nothing more than an instance of HttpClient. I know this has something to do with the amount of memory necessary during compile time or some compiler options, and I'm not really stressing my system while i'm coding. I've got 2GB of memory on this Core Duo laptop and windows reports only 860MB page file usage (haven't used any other memory tools. I should have plenty of memory and processing power for this... and I'm only compiling some common http libs... total of 406 source files. What gives? edit (4/30/2010-18:24): Just compiled some code where I got the above stated error. I closed some web browser windows and recompiled the same exact code with no edits and it compiled with no issue. this is definitely a compiler issue related to memory usage. Any help would be great.... because I have no idea where to go from here. Android API Level: 5 Android SDK rel 5 JDK version: 1.6.0_12 Sorry I had to repost this question because regardless of whether I use the native HttpClient class in the Android SDK or my custom version downloaded from apache, the error still occurs.

    Read the article

  • MVC View Model Intellisense / Compile error

    - by Marty Trenouth
    I have one Library with my ORM and am working with a MVC Application. I have a problem where the pages won't compile because the Views can't see the Model's properties (which are inherited from lower level base classes). They system throws a compile error saying that 'object' does not contain a definition for 'ID' and no extension method 'ID' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?) implying that the View is not seeing the model. In the Controller I have full access to the Model and have check the Inherits from portion of the view to validate the correct type is being passed. Controller: return View(new TeraViral_Blog()); View: <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<com.models.TeraViral_Blog>" %> <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> Index2 </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <h2>Index2</h2> <fieldset> <legend>Fields</legend> <p> ID: <%= Html.Encode(Model.ID) %> </p> </fieldset> </asp:Content>

    Read the article

  • Maven doesn't compile target/hibernate3/generated-sources

    - by mmm
    Can someone tell me how to configure maven for it also to compile sources from the target/hibernate3/generated-sources directory? I have already read this and other posts but they don't seem to solve my problem (which indeed seems trivial). I have used the bottom-up approach hibernate configuration for cfg.xml, hbm.xml and POJO generation (i.e. auto-generated the complete hibernate configuration out of an existing database schema). I'm also only using standard maven and hibernate3-plugin directory layouts. Yet, when executing mvn compile in the command-line while my sources are in the src/main/java and the generated sources in /target/hibernate3/generated-sources only the ones from src/main/java get compiled and copied into target/classes. I wouldn't like to generate sources into src/main/java as I'd like mvn clean to clean them. I'd like to solve the problem using command-line, plugins and pom.xml only. Is there a way to configure maven-compiler-plugin to do so? Or is there another way? Regards and thanks for any help.

    Read the article

  • Trying to compile x264 and ffmpeg for iPhone - "missing required architecture arm in file"

    - by jtrim
    I'm trying to compile x264 for use in an iPhone application. I see there are instructions on how to compile ffmpeg for use on the platform here: http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2009-October/076618.html , but I can't seem to find anything this complete for compiling x264 on the iPhone. I've found this source tree: http://gitorious.org/x264-arm that seems to have support for the ARM platform. Here is my config line: ./configure --cross-prefix=/usr/bin/ --host=arm-apple-darwin10 --extra-cflags="-B /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk/usr/lib/ -I /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk/usr/lib/" ...and inside configure I'm using the gas-preprocessor script (first link above) as my assembler: gas-preprocessor.pl gcc When I start compiling, it chunks away for a little while, then it spits out these warnings and a huge list of undefined symbols: ld: warning: option -s is obsolete and being ignored ld: warning: -force_cpusubtype_ALL will become unsupported for ARM architectures ld: warning: in /usr/lib/crt1.o, missing required architecture arm in file ld: warning: in /usr/X11R6/lib/libX11.dylib, missing required architecture arm in file ld: warning: in /usr/lib/libm.dylib, missing required architecture arm in file ld: warning: in /usr/lib/libpthread.dylib, missing required architecture arm in file ld: warning: in /usr/lib/libgcc_s.1.dylib, missing required architecture arm in file ld: warning: in /usr/lib/libSystem.dylib, missing required architecture arm in file Undefined symbols: My guess would be that the problem has to do with the "missing required architecture arm in file" warning...any ideas?

    Read the article

  • Simple Enterprise Library console application refuses to compile

    - by Vadim
    I just downloaded and installed Microsoft Enterprise Library 5.0. I fired up VS 2010 to play with EL 5 and created a very simple console application. However, it would not compile. I got the following error: The type or namespace name 'Data' does not exist in the namespace 'Microsoft.Practices.EnterpriseLibrary' (are you missing an assembly reference?) I added Microsoft.Practices.EnterpriseLibrary.Common, Microsoft.Practices.EnterpriseLibrary.Data, and Microsoft.Practices.Unity references to my project. Here's the simple code that refuses to compile. using Microsoft.Practices.EnterpriseLibrary.Common.Configuration.Unity; using Microsoft.Practices.EnterpriseLibrary.Data; using Microsoft.Practices.Unity; namespace EntLib { class Program { static void Main(string[] args) { IUnityContainer container = new UnityContainer(); container.AddNewExtension<EnterpriseLibraryCoreExtension>(); var defaultDatabase = container.Resolve<Database>(); } } } The error above complains about line #2 : using Microsoft.Practices.EnterpriseLibrary.Data; Someone probably will point out to a stupid mistake by me, but at the moment I fail to see it. I tried to remove and add again Microsoft.Practices.EnterpriseLibrary.Data to refences but it didn't help.

    Read the article

  • How to compile Open Flash Chart v.1?

    - by geehertush01
    Let me just say, that I'm a total beginner in anything related to flash. I would like to compile latest version of OFC1 (v.1.9.7). It can be downloaded here: link. Unfortunately no tutorial of how to do it can be found anywhere. I succeeded in compiling OFC2 (v.Lug-Wyrm-Charmer). I installed FlashDevelop, then I found .proj file in the OFC2 package, opened it in FlashDevelop and built the project. It worked fine (although I had to fix some code errors, but it was simple). Unfortunately there is no project file in OFC1 package. I tried to create a new project (Project-New Project-AS3 Project). It created .proj file and few folders (src,bin...). I deleted 'Main.as' from 'src' folder. Then I copied all files from 'actionscript' folder from OFC1 to 'src' project folder. I opened the project and set 'open-flash-char.as' as Document Class (right click on the file in the project tree and 'Set Document Class'). Then I tried to build the project, but got an syntax error with (in 'open-flash-char.as'): #include "prototype.drawCircle.as" #include "prototype.fillCircle.as" #include "String.prototype.replace.as" So I removed "#" signs. But then I got an error ...\ofc1\projtest4\src\open-flash-chart.as: Error: A file found in a source-path must have an externally visible definition. If a definition in the file is meant to be externally visible, please put the definition in a package. I have no idea of how to continue. Maybe I'm doing everything wrong, because OFC1 is written in AS2 (probably), not AS3. I don't know. So my question is: How to compile OFC v.1.9.7?

    Read the article

  • unable to compile a servlet in ubuntu

    - by codeomnitrix
    I am newbie to j2ee. I have download and installed j2eesdk-1_4_03-linux.bin in my ubuntu 10.04 distribution. and then i tried to code my first servlet in it as: import java.io.*; import javax.servelet.*; import javax.servelet.http.*; public class HowdyServelet extends HttpServelet{ public void doGet(HttpServeletRequest request, HttpServeletResponse response) throws IOException, ServeletException{ PrintWriter out = response.getWriter(); response.setContentType("text/html"); out.println("<html>"); out.println("<head><title>howdy</title></head>"); out.println("<body>"); out.println("<center><h1>Howdy</h1></center>"); out.println("</body>"); out.println("</html>"); } } and here are the environment variables i set after installation: 1. J2EE_HOME=/home/vinit/SUNWappserver 2. JAVA_HOME=/home/vinit/SUNWappserver/jdk 3. CLASSPATH=/home/vinit/SUNWappserver/lib and now i tried to compile the servlet using javac HowdyServelet.java But i got following errors: HowdyServelet.java:2: package javax.servelet does not exist import javax.servelet.*; ^ HowdyServelet.java:3: package javax.servelet.http does not exist import javax.servelet.http.*; ^ HowdyServelet.java:5: cannot find symbol symbol: class HttpServelet public class HowdyServelet extends HttpServelet{ ^ HowdyServelet.java:6: cannot find symbol symbol : class HttpServeletRequest location: class HowdyServelet public void doGet(HttpServeletRequest request, HttpServeletResponse response) throws IOException, ServeletException{ ^ HowdyServelet.java:6: cannot find symbol symbol : class HttpServeletResponse location: class HowdyServelet public void doGet(HttpServeletRequest request, HttpServeletResponse response) throws IOException, ServeletException{ ^ HowdyServelet.java:6: cannot find symbol symbol : class ServeletException location: class HowdyServelet public void doGet(HttpServeletRequest request, HttpServeletResponse response) throws IOException, ServeletException{ ^ 6 errors So how to compile this servlet. Thanks in advance.

    Read the article

  • Using GCC (MinGW) to compile OpenGL on Windows

    - by Casey
    I've searched on google and haven't been able to come up with a solution. I would like to compile some OpenGL programming using GCC. In the GL folder in GCC I have the following headers: gl.h glext.h glu.h Then in my system32 file I have the following .dll opengl32.dll glu32.dll glut32.dll If I wanted to write a simple OpenGL "Hello World" and link and compile with GCC, what is the correct process? I'm attempting to use this code: #include <GL/gl.h> #include <GL/glut.h> void display() { glClear(GL_COLOR_BUFFER_BIT); glFlush(); } int main(int argc, char **argv) { glutInit(&argc, argv); glutInitWindowSize(512,512); glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); glutCreateWindow("The glut hello world program"); glutDisplayFunc(display); glClearColor(0.0, 0.0, 0.0, 1.0); glutMainLoop(); // Infinite event loop return 0; } Thank you in advance for the help.

    Read the article

  • I'm about to learn x86 assembly on os x 10.6 let me know how compile..plz

    - by kevin choung
    hello~ I'm about to learn x86 assembly language on mac os x... I'm using as instruction to compile assembly file in commend window. but I have several errors.. and I don't know how I can get through.. here is the errors and my assembly code.. which is quite simple. **ung-mi-lims-macbook-pro:pa2 ungmi$ as swap.s swap.s:16:Unknown pseudo-op: .type swap.s:16:Rest of line ignored. 1st junk character valued 115 (s). swap.s:19:suffix or operands invalid for `push' swap.s:46:suffix or operands invalid for `pop' ung-mi-lims-macbook-pro:pa2 ungmi$** and the source is .text .align 4 .globl swap .type swap,@function swap: pushl %ebp movl %esp, %ebp movl %ebp, %esp popl %ebp ret and I searched some solution which is I have to put -arch i386 than **ung-mi-lims-macbook-pro:pa2 ungmi$ as -arch i386 swap.s swap.s:16:Unknown pseudo-op: .type swap.s:16:Rest of line ignored. 1st junk character valued 115 (s). ung-mi-lims-macbook-pro:pa2 ungmi$** could you help me out.. just let me know what I need to compile assembly file.. I have xcode already.. and I'd rather to do this with commend window..and vi editor.. I will be waiting for your answer... plz help me.

    Read the article

  • NOT A DUPLICATE! VS2010 - How to automatically stop compile on first compile error

    - by Ben Robbins
    {rant}First I'd like to say that this IS NOT A DUPLICATE. I've asked this question previously but it got closed as a duplicate when it isn't. This question is SPECIFIC to VS 2010 and the answers to the so-called duplicate work in VS 2008 but not in VS 2010 (at least not for me or anyone I know). So before you go closing something as a duplicate how about you read the question carefully and try the answer for yourself and see if it actually works. Apologies for the rant but there is no obvious way to contact the SO police that closed the issue or get it reopened. {/rant} At work we have a C# solution with over 80 projects. In VS 2008 we use a macro to stop the compile as soon as a project in the solution fails to build (see this question for several options for VS 2005 & VS 2008: http://stackoverflow.com/questions/134796/how-to-automatically-stop-visual-c-build-at-first-compile-error). Is it possible to do the same in VS 2010? What we have found is that in VS 2010 the macros don't work (at least I couldn't get them to work) as it appears that the environment events don't fire in VS 2010. The default behaviour is to continue as far as possible and display a list of errors in the error window. I'm happy for it to stop either as soon as an error is encountered (file-level) or as soon as a project fails to build (project-level). Answers for VS 2010 only please. If the macros do work then a detailed explanation of how to configure them for VS 2010 would be appreciated. Thanks.

    Read the article

  • Compile time float packing/punning

    - by detly
    I'm writing C for the PIC32MX, compiled with Microchip's PIC32 C compiler (based on GCC 3.4). My problem is this: I have some reprogrammable numeric data that is stored either on EEPROM or in the program flash of the chip. This means that when I want to store a float, I have to do some type punning: typedef union { int intval; float floatval; } IntFloat; unsigned int float_as_int(float fval) { IntFloat intf; intf.floatval = fval; return intf.intval; } // Stores an int of data in whatever storage we're using void StoreInt(unsigned int data, unsigned int address); void StoreFPVal(float data, unsigned int address) { StoreInt(float_as_int(data), address); } I also include default values as an array of compile time constants. For (unsigned) integer values this is trivial, I just use the integer literal. For floats, though, I have to use this Python snippet to convert them to their word representation to include them in the array: import struct hex(struct.unpack("I", struct.pack("f", float_value))[0]) ...and so my array of defaults has these indecipherable values like: const unsigned int DEFAULTS[] = { 0x00000001, // Some default integer value, 1 0x3C83126F, // Some default float value, 0.005 } (These actually take the form of X macro constructs, but that doesn't make a difference here.) Commenting is nice, but is there a better way? It's be great to be able to do something like: const unsigned int DEFAULTS[] = { 0x00000001, // Some default integer value, 1 COMPILE_TIME_CONVERT(0.005), // Some default float value, 0.005 } ...but I'm completely at a loss, and I don't even know if such a thing is possible. Notes Obviously "no, it isn't possible" is an acceptable answer if true. I'm not overly concerned about portability, so implementation defined behaviour is fine, undefined behaviour is not (I have the IDB appendix sitting in front of me). As fas as I'm aware, this needs to be a compile time conversion, since DEFAULTS is in the global scope. Please correct me if I'm wrong about this.

    Read the article

  • Compile Assembly Output generated by VC++?

    - by SDD
    I have a simple hello world C program and compile it with /FA. As a consequence, the compiler also generates the corresponding assembly listing. Now I want to use masm/link to assemble an executable from the generated .asm listing. The following command line yields 3 linker errors: \masm32\bin\ml /I"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include" /c /coff asm_test.asm \masm32\bin\link /SUBSYSTEM:CONSOLE /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib" asm_test.obj indicating that the C-runtime functions were not linked to the object files produced earlier: asm_test.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4 asm_test.obj : error LNK2001: unresolved external symbol _printf LINK : error LNK2001: unresolved external symbol _wmainCRTStartup asm_test.exe : fatal error LNK1120: 3 unresolved externals Here is the generated assembly listing ; Listing generated by Microsoft (R) Optimizing Compiler Version 15.00.30729.01 TITLE c:\asm_test\asm_test\asm_test.cpp .686P .XMM include listing.inc .model flat INCLUDELIB OLDNAMES PUBLIC ??_C@_0O@OBPALAEI@hello?5world?$CB?6?$AA@ ; `string' EXTRN @__security_check_cookie@4:PROC EXTRN _printf:PROC ; COMDAT ??_C@_0O@OBPALAEI@hello?5world?$CB?6?$AA@ CONST SEGMENT ??_C@_0O@OBPALAEI@hello?5world?$CB?6?$AA@ DB 'hello world!', 0aH, 00H ; `string' CONST ENDS PUBLIC _wmain ; Function compile flags: /Ogtpy ; COMDAT _wmain _TEXT SEGMENT _argc$ = 8 ; size = 4 _argv$ = 12 ; size = 4 _wmain PROC ; COMDAT ; File c:\users\octon\desktop\asm_test\asm_test\asm_test.cpp ; Line 21 push OFFSET ??_C@_0O@OBPALAEI@hello?5world?$CB?6?$AA@ call _printf add esp, 4 ; Line 22 xor eax, eax ; Line 23 ret 0 _wmain ENDP _TEXT ENDS END I am using the latest masm32 version (6.14.8444).

    Read the article

  • C++ Switch won't compile with externally defined variable used as case

    - by C Nielsen
    I'm writing C++ using the MinGW GNU compiler and the problem occurs when I try to use an externally defined integer variable as a case in a switch statement. I get the following compiler error: "case label does not reduce to an integer constant". Because I've defined the integer variable as extern I believe that it should compile, does anyone know what the problem may be? Below is an example: test.cpp #include <iostream> #include "x_def.h" int main() { std::cout << "Main Entered" << std::endl; switch(0) { case test_int: std::cout << "Case X" << std::endl; break; default: std::cout << "Case Default" << std::endl; break; } return 0; } x_def.h extern const int test_int; x_def.cpp const int test_int = 0; This code will compile correctly on Visual C++ 2008. Furthermore a Montanan friend of mine checked the ISO C++ standard and it appears that any const-integer expression should work. Is this possibly a compiler bug or have I missed something obvious? Here's my compiler version information: Reading specs from C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/specs Configured with: ../gcc-3.4.5-20060117-3/configure --with-gcc --with-gnu-ld --with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable-languages=c,c++,f77,ada,objc,java --disable-win32-registry --disable-shared --enable-sjlj-exceptions --enable-libgcj --disable-java-awt --without-x --enable-java-gc=boehm --disable-libgcj-debug --enable-interpreter --enable-hash-synchronization --enable-libstdcxx-debug Thread model: win32 gcc version 3.4.5 (mingw-vista special r3)

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >