compilation

MinGW c++ compiler zlib1.dll missing error?

故事扮演 提交于 2019-12-02 22:05:06
I have just started to learn C++ for school, and I'm trying to download the compiler MinGW to compile my source code. However, every time I try to compile a program an error message shows up saying that zlib1.dll is missing. This is the error message the program can't start because zlib1.dll is missing from your computer I have tried installing/re-installing with no luck. I don't know what's the problem here? Can anyone please help me with this problem as I have some homework that I need to do but I can't without the compiler. Thanks. Niall From the MinGW getting started ; an automated GUI

Programmatically compile typescript in C#?

て烟熏妆下的殇ゞ 提交于 2019-12-02 20:42:16
I'm trying to write a function in C# that takes in a string containing typescript code and returns a string containing JavaScript code. Is there a library function for this? You can use Process to invoke the compiler, specify --out file.js to a temporary folder and read the contents of the compiled file. I made a little app to do that: Usage TypeScriptCompiler.Compile(@"C:\tmp\test.ts"); To get the JS string string javascriptSource = File.ReadAllText(@"C:\tmp\test.js"); Full source with example and comments: using System; using System.Collections.Generic; using System.Diagnostics; using System

Making GCC and Other C++ Compilers Very Strict

ⅰ亾dé卋堺 提交于 2019-12-02 20:34:04
I'm working on a large collaborative C++ project that is both developed and run on various flavors of Linux, OS X and Windows. We compile across these platforms with GCC, Visual Studio C++ and the Intel C++ compiler. As more and more people start developing code for the project, we're starting to see weird errors in compilation and runtime that are specific to particular compilers on particular operating systems. An example of this is implicit inclusion of headers that certain OS/compiler pairs seem to find for you, accidentally overloading a function from a base class in a derived class. My

fatal error: sqlite3.h: No such file or directory

荒凉一梦 提交于 2019-12-02 20:27:16
I'm trying to build a C application through cross compiling for a Zynq board (ARM architecture). When I type make without mentioning the ARM arch, it works fine on my laptop. But as soon as I modify the Makefile, I get an error saying: main.c:20:43: fatal error: sqlite3.h: No such file or directory #include "sqlite3.h" //library for sqlite3 ^ compilation terminated. make: *** [ws_temp_server] Error 1 The Makefile looks like this: SOURCE=lib/base64_enc.c lib/websocket.c lib/sha1.c lib/sqlite/sqlite3.c main.c CC = arm-xilinx-linux-gnueabi-gcc LDFLAGS=-lpthread -ldl INCLUDES=lib/ PROGRAM=ws_temp

Why does Delphi's compilation speed degrade the longer it's open, and what can I do about it?

三世轮回 提交于 2019-12-02 19:58:50
My company has been running a large project on Delphi for more than a decade. Our codebase has been growing over the years and now stands at around 4 million lines of code. Compilation speed is becoming an issue. We've spent time weeding out unit circular referencing (a known cause of slow compilation) and examined every aspect of the setup. It gets to a point we can't improve it any further materially with what we can control. At the moment, on a state of the art PC with 4 cores running Windows XP SP3 and Delphi 2006, start Delphi fresh and do a full build, it takes ~40 secs. Then, if we do

Classes not seeing each other in JSP

旧时模样 提交于 2019-12-02 19:30:49
问题 In a tomcat JSP application I have this directory layout: webapps/ myProjectName/ index.jsp WEB-INF/ classes/ mypackage/ class1.java class2.java I'm trying to compile class1.java which references class2.java. It's coded in a form sort of like this: package mypackage; public class class1 extends class2 {} and class2 looks like this: package mypackage; public class class2 {} however, I get an error on class1 saying that class2 cannot be found. First I compiled class2, which compiled just fine,

setting the correct classpath for compiling and running Java packages? [duplicate]

主宰稳场 提交于 2019-12-02 19:17:51
问题 This question already has an answer here : getting error when I compile the Java code using package in commandline? (1 answer) Closed 5 years ago . I have been using Eclipse lately, where compiling and running the program is very simple. Not much needs to be done in setting the classpath . But apparently that is not the case when it comes to running them from commandLine . when I try compiling from terminal , I am having various errors. I am pasting an image of my package structure of the

how to compile opencl project with kernels

本小妞迷上赌 提交于 2019-12-02 19:14:46
I am totally a beginner on opencl, I searched around the internet and found some "helloworld" demos for opencl project. Usually in such sort of minimal project, there is a *.cl file contains some sort of opencl kernels and a *.c file contains the main function. Then the question is how do I compile this kind of project use a command line. I know I should use some sort of -lOpenCL flag on linux and -framework OpenCL on mac. But I have no idea to link the *.cl kernel to my main source file. Thank you for any comments or useful links. Farzad In OpenCL, the .cl files that contain device kernel

Compiling Java file with code from within a Java file

女生的网名这么多〃 提交于 2019-12-02 18:58:19
问题 I'm currently creating a personal (maybe public) java terminal. I want to create a command that will create + compile a Java file on execution, except I'm not too sure on how to actually do this. Is it possible? Or am I just dreaming? 回答1: You could also use Groovy - it's quite handy if you just want to compile and run a line or two of Java code from within your application. The application may be in regular Java, with Groovy used only for compilation of the dynamically generated code.

Empty function macros

巧了我就是萌 提交于 2019-12-02 18:50:11
If I define a function macro with no actual body, is it like an empty string with the compiler (i.e. It doesn't generate any extra instructions at compile time)? Example: #define SomeMacro(a) SomeMacro("hello"); // This line doesn't add any instructions, does it? You're absolutely correct, the empty macro doesn't generate any code. I've seen two places where this is useful. The first is to eliminate warnings when a function parameter isn't used: #define UNUSED(x) int foo(int UNUSED(value)) { return 42; } The second is when you use conditionals to determine if there should be code or not.