compilation

No such module <product module name> in XCode Unit test

谁说胖子不能爱 提交于 2019-12-06 11:59:51
I have a mixed objective-c and Swift project and I try to write Unit tests for it. My project name is: Alphaproject my product module name is: Alphaproject I set to YES Defines Module in my main Target (Alphaproject) and set to YES EnableTestability for Debug only in this same Target. In my Test class, I try to import my product module name: @testable import Alphaproject Additional notes: all my projects files are only part of the main target my test files are only part of the test target My scheme for Test is set to Build Debug configuration. I also tried to clean the Build folder (ALT +

Compile JavaScripts with Gulp and Resolve Dependencies (separate files)

瘦欲@ 提交于 2019-12-06 11:54:34
I want to compile JavaScript files with Gulp. I have a src directory where all scripts are present with .js extension. I want all scripts to be compiled separately and placed into a destination directory ( dist ) with the same filename as the original. Consider this example: src/jquery.js : /** * @require ../../vendor/jquery/dist/jquery.js */ src/application.js : /** * @require ../../vendor/angular/angular.js * @require ../../vendor/ngprogress-lite/ngprogress-lite.js * @require ../../vendor/restangular/dist/restangular.js * @require ../../vendor/lodash/dist/lodash.underscore.js * @require ../.

ocamlbuild; building toplevel

只谈情不闲聊 提交于 2019-12-06 11:49:34
问题 Having successfully reorganized my project for ocamlbuild with subdirectories and using ocamlfind, I've found it difficult to build the top-level. I've constructed a .mltop file containing all the modules that would be included and added the packages to the _tags , but the build doesn't work. It cannot find the C functions that are compiled with one of the modules. With -classic-display on, I can see that file, libcside.a , not being included and isn't even being compiled at all! The c file

AddressSanitizer / LeakSanitizer Error with -lsupc++ and -stdlib=libc++ on a never called virtual function that writes to a stream

萝らか妹 提交于 2019-12-06 11:28:36
The following code throws an AddressSanitizer Error when compiled on Debian Jessie with clang 3.5. It appears to be related to the combination of linked libraries, but i have not been able to find something similar on the internet. Reproduction of the Error Invocation: clang++ -stdlib=libc++ -lc++abi -fsanitize=address,vptr sample.cpp -lsupc++ -o sample //sample.cpp #include <iostream> class Foo { virtual void bar() { std::cerr << std::endl; } public: virtual ~Foo() { } }; int main() { Foo foo; try{ throw 1; } catch(int i) { return i; } return -1; } When omitting compile flag -lc++abi , a

Code::Blocks C++ compiling with MacOS Mojave : fatal error: sys/cdefs.h: No such file or directory

試著忘記壹切 提交于 2019-12-06 11:26:40
(This is my first question ever on StackOverflow) I have to use a Mac at work, and I'm coding in C++ with Code::Blocks (because I am used to this IDE). 2 days ago I upgraded from MacOS High Sierra to MacOS Mojave and I can fairly say that... it was a bad decision. Now, when trying to #include <math.h> I get this error : fatal error: sys/cdefs.h: No such file or directory . I have tried to reinstall the xcode line command tools with xcode-select --install , but it still doesn't work. Does anybody have a clue of what is going on, and how I could solve this issue ? The accepted answer doesn't

Setting up Linux to use a certain version of python for compile

谁都会走 提交于 2019-12-06 11:08:06
I'm running Ubuntu to compile a set of code which requires python 2.4. How can I setup a terminal launcher so that when I open that launcher all python related commands will use python 2.4 instead of the python 2.6 that is defaulted in Ubuntu? Set a bash alias in that shell session: alias python=python2.4 (assuming python2.4 is in your $PATH of course). This way you won't have to remember to explicitly type the 2.4 a zillion times in that terminal -- which is what bash aliases are for!-) Invoke the interpreter via python2.4 instead of using the default. For a permenant system wide change put a

Exporting Scala project as jar from Eclipse

孤人 提交于 2019-12-06 10:21:16
I have a Scala project and I would like to export it as a jar. *1. At first I tried creating a Java class for the project as an entry point public class JMain { public static void main(String[] args) { System.out.println("Java main calling Scala main"); SMain.main(new String[] {""}); //SMain.main is the actual *main* and this worked fine and dandy when launched from Eclipse, but when I export it as jar it'll give me 18 exceptions or so. I do now know how to replicate then "environment" in which Eclipse manages to launch this and I'm prety sure it relies on the fact that Scala is on my system

How to make libusb library visible to another program?

狂风中的少年 提交于 2019-12-06 10:17:37
I am trying to compile hidapi library. In order to compile that, I need libusb-1.0 . I've downloaded that, configured, made and installed to /usr/local/lib . But when I try to compile hidapi , it doesn't see libusb-1.0 : cc -Wall -g -c -I../hidapi pkg-config libusb-1.0 --cflags hid-libusb.c -o hid-libusb.o -L/usr/local/lib Package libusb-1.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `libusb-1.0.pc' to the PKG_CONFIG_PATH environment variable No package 'libusb-1.0' found /bin/sh: cc: not found make: * [hid-libusb.o] Error 127 How can I fix

Unable to Compile Objective C using Gnustep on windows

痞子三分冷 提交于 2019-12-06 09:38:39
Hi i am a beginner learning objective c. i am finding an error "hello.m:1:34: Foundation/Foundation.h: No such file or directory" i came to know that i need to make a make file may i know how to make the make file please No need to create a makefile. If you start MinGW from "All Programs -> GNUstep -> Shell" as Pax indicates above, you can just compile your .m file. My GNUstep installation is in c:\GNUstep\GNUstep\System. If yours is different, you should change the import of Foundation.h accordingly. I did this: Create c:\myprogs\obj-c\hello\hello.m that looks like this: //---------- Hello.m

How is the order of compilation of source files decided?

此生再无相见时 提交于 2019-12-06 09:13:33
I have a workspace containing many *.c files, which I compile. (I could use any toolchain say MSVC6.0, or gcc etc) Which source file is compiled first? How is the order of the files to be compiled subsequently decided? The order of compilation is not specified by the C standard. Since there is no need for the construction of global objects like in C++, there is no situation where the order of compilation is relevant in C. Generally, this is not specified anywhere. Especially when using eg. parallel make, the order of compilation is pretty much arbitrary. VC : By project folder, then