compilation

javac @<opiton_file> and encoding

有些话、适合烂在心里 提交于 2019-12-11 05:11:12
问题 I'm trying to compile some java files on my computer under Windows 7 in french; and I thing I have some trouble with file endoding... In a first step, I'm generating a list of the file to compile: dir src\*.java /B/S > javasrc.tmp~ Which will wrote in the file "javasrc.tmp~" line by line the full path of java file (recursivly) of the directory src. In my case I have : C:\Users\Alexandre\Développement\Java\src\testA.java C:\Users\Alexandre\Développement\Java\src\testB.java [...] (Note that

Over 200 ~SYNTAX ERRORS~ in math.h for visual studio, which doesn't make sense

最后都变了- 提交于 2019-12-11 05:06:55
问题 Using Visual Studio Express2013 for Windows Desktop, with a "Win32 Console Application" C++ project (I'm doing a project for a course. In order to start, I have to import all of the project files that the instructor provided - there are tons (all .cpp and .h files), so I can't really copy-paste any of them here... but I don't think that's the issue anyway). When I hit "run debugger," I get nearly 200 syntax errors in math.h Even though math.h is what came with Visual Studio. All the errors

Compile c++ file using external library from linux terminal

心已入冬 提交于 2019-12-11 05:06:34
问题 I have the following files: ex1.cpp ex1.h GLee.cpp GLee.h and I want to make it use the library (openmesh library) on the following path: home/xyz/Downloads/OpenMesh-2.3/src/OpenMesh/ I'm trying to execute it with this: g++ -Wall -o ex1 ex1.cpp GLee.cpp -L/..path../ but no luck, output is: In file included from ex1.cpp:17:0: ex1.h:28:38: fatal error: OpenMesh/Core/IO/MeshIO.hh: No such file or directory compilation terminated. what is the correct way of doing this? Thanks! 回答1: You need to

Create a .NET program that produces custom EXE's

不羁的心 提交于 2019-12-11 04:55:34
问题 I want to create a program that produces an executable slideshow. So I need it to output an EXE with some required code and certain embedded resources (pictures) in it. Does .NET provide such capability? 回答1: You can use CSharpCodeProvider class to compile code at runtime and add embedded resources. Have a look at this article where I explain how to do it: SlideShow Builder 回答2: This is easy to accomplish. You can add pictures as embedded resources and then use the technique of Reflection to

Use compiled Boost library with Visual Studio 2010

ⅰ亾dé卋堺 提交于 2019-12-11 04:53:50
问题 I try to use compiled Boost library (FileSystem) with Visual Studio. So, I add the boost lib directory in : Project Properties > Linker > Additional Library Directories The problem is Visual Studio try to add a prefix lib : fatal error LNK1104: cannot open file 'libboost_filesystem-vc100-mt-gd-1_51.lib' But the real name of the lib is simply boost_filesystem-vc100-mt-gd-1_51.lib How to disable the prefix before the lib name ? Thank you ! 回答1: It wasn't a problem of a prefix. To fix that I

Compiler outputs the errors under Wine, but not on Windows

廉价感情. 提交于 2019-12-11 04:48:53
问题 I've got .mqh source code file with syntax error, for example created by the following command: echo some_error > fail.mqh Now, I'm using Metaeditor compiler to check the syntax and my goal is to print the errors to the standard output ( CON ), instead of logging them to the file ( /log:file.log ). See: Compiling. The following syntax works fine on Linux/macOS as follow (also under wine cmd.exe ): $ wine metaeditor.exe /s /log:CON /compile:fail.mqh ??fail.mqh : information: Checking 'fail.mqh

How to compile thrust and c++ project?

≯℡__Kan透↙ 提交于 2019-12-11 04:48:38
问题 I got big problems about the compile when I want to use thrust and c++ meanwhile. Here is the project structure(just a test project): sortbase.h #include<iostream> #include <thrust/device_vector.h> using namespace std; template<class T> class SortBase { public: void Init() { } void resize(const int &x) { CV.resize(x); cout<<"resize succeed!"<<endl; } private: thrust::device_vector<T> CV; }; sorter.h #ifndef __SORTER_H__ #define __SORTER_H__ #include <iostream> #include <thrust/device_vector.h

Compiling and linking C and C++ files

孤者浪人 提交于 2019-12-11 04:47:26
问题 I would like to invoke a C++ function from within a C file and I have read about the extern "C" construct and the wrapper API. However, I am unsure how to organize the various header files and how to link the object files. Assume I have a C file MyProg.c and its corresponding header file MyProg.h . Now, I created two files Wrapper.cpp and Wrapper.h that declare the function I wish to call from MyProg.c // Wrapper.h #include "Utility.h" #ifdef __cplusplus extern "C" { #endif void func_to

Compile position-independent executable with statically linked library on 64 bit machine

好久不见. 提交于 2019-12-11 04:16:45
问题 When I try to compile with the following command-line: g++ code.cpp /usr/lib/x86_64-linux-gnu/libcrypto.a -ldl -Fpie -pie -o executable I get the following error message: /usr/bin/ld: /tmp/ccNHn5FA.o: Die Umlagerung von /tmp/ccNHn5FA.o: error adding symbols: Ungültiger Wert collect2: error: ld returned 1 exit status I am wondering why this does not work, because exactly the same command line on my 32 bit machine works fine. What am I doing wrong? 回答1: When I try to compile with the following

Python youtube-dl recompile

大城市里の小女人 提交于 2019-12-11 03:55:30
问题 The old youtube-dl use to be just one file so it was easy for me to edit. The new version has multiple files inside of it. To get it to work on my server I needed to extract the files and change the python path. Now how do I put it back together? The youtube-dl site says make compile. youtube-dl contains main .py, init .py, FileDownloader.py, InfoExtractors.py, PostProcessor.py, utils.py I need to put those scripts back into a single youtube-dl file. I'm running CentOS. Thanks for your help!