compilation

How to reference both ASSEMBLYVERSION and ASSEMBLYFILEVERSION?

戏子无情 提交于 2020-01-05 13:26:11
问题 I need to display both the AssemblyVersion and the AssemblyFileVersion. In AssemblyInfo.cs, I have: [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyFileVersion("2009.8.0")] However, I only get "2009.8.0" when I reference the above with: public class VersionInfo { public static string AppVersion() { return System.Diagnostics.FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location).FileMajorPart + "." + System.Diagnostics.FileVersionInfo.GetVersionInfo

Why does a Roslyn compilation include metadata references or project references but not both?

♀尐吖头ヾ 提交于 2020-01-05 12:59:34
问题 I'm using Roslyn to look at a project that references a number of System assemblies, like this: var workspace = MSBuildWorkspace.Create(); _solution = workspace.OpenSolutionAsync(_solutionPath).Result; var project = _solution.Projects.Single(p => p.Name == "TestProject"); When I look at project.MetadataReferences it has 9 elements and project.ProjectReferences has no elements - all as I'd expect. The Documents property contains one more document than I'd expect, a generated document. If I add

Windows 7 MinGW compilation error using Boost ASIO

时间秒杀一切 提交于 2020-01-05 09:30:49
问题 Having trouble compiling the following C++ code on Windows 7: #include <boost/asio.hpp> #include <iostream> void handler1(const boost::system::error_code &ec) { std::cout << "5 s." << std::endl; } void handler2(const boost::system::error_code &ec) { std::cout << "10 s." << std::endl; } int main() { boost::asio::io_service io_service; boost::asio::deadline_timer timer1(io_service, boost::posix_time::seconds(5)); timer1.async_wait(handler1); boost::asio::deadline_timer timer2(io_service, boost:

Visual Studio 2013 C++ not compiling changes

≯℡__Kan透↙ 提交于 2020-01-05 09:29:26
问题 I'm trying to get a feel for visual studio, due to my professor wishes to use this environment for class. I've created a simple "Hello World!" project to make VS work for me. Everything worked just fine until recently. Whenever I tell VS to compile and run my code, it will run the program, but it simply runs the initial version of the program, leaving out any changes I have made. I've tried rebuilding the solution, building it, made sure it is set to always build on run, and the correct

glWindowPos2i was not declared in this scope

家住魔仙堡 提交于 2020-01-05 08:27:27
问题 I'm migrating an OpenGL program over to C++. I have all of the library includes transitioned except for one. In my display function, I have this line (to display text on the screen): glWindowPos2i(5,5); This works fine when I run the program as a .c or when I run it as a .cpp in OSX. But I need it to compile as a .cpp on Linux, also. When I go to compile it there, I get this error: error: 'glWindowPos2i' was not declared in this scope I can't figure out if this is a missing library or what is

Cython compile error “is not a valid module name”

旧时模样 提交于 2020-01-05 06:42:29
问题 I trying to compile on windows a Cython file (.pyx), a file which I just saved from .py. Here is my project dir path. c:\..\Project\App\Analyzer\ _init_.py Few_other_files.py consolidated_loop_C.pyx cl_setup.py Here is my cl_setup.py from Cython.Build import cythonize try: from setuptools import setup from setuptools import Extension except ImportError: from distutils.core import setup from distutils.extension import Extension setup( name = "Consolidated Loop", ext_modules = cythonize(

Cython compile error “is not a valid module name”

你离开我真会死。 提交于 2020-01-05 06:42:13
问题 I trying to compile on windows a Cython file (.pyx), a file which I just saved from .py. Here is my project dir path. c:\..\Project\App\Analyzer\ _init_.py Few_other_files.py consolidated_loop_C.pyx cl_setup.py Here is my cl_setup.py from Cython.Build import cythonize try: from setuptools import setup from setuptools import Extension except ImportError: from distutils.core import setup from distutils.extension import Extension setup( name = "Consolidated Loop", ext_modules = cythonize(

Linking libavcodec in Cmake, find_library won't work with any library

百般思念 提交于 2020-01-05 05:40:09
问题 I'm trying to compile a cpp code which uses libavcodec: #include <libavcodec/avcodec.h> I tried all variations of find_package() with names like ffmpeg for which I get CMake Warning at CMakeLists.txt:17 (find_package): By not providing "Findffmpeg.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "ffmpeg", but CMake did not find one. Could not find a package configuration file provided by "ffmpeg" with any of the following names:

Proper way to include C code from directories other than the current directory

核能气质少年 提交于 2020-01-05 05:37:13
问题 I have two directories, sorting and searching (children of the same directory), that have .c source files and .h header files: mbp:c $ ls sorting array_tools.c bubble_sort.c insertion_sort.c main selection_sort.c array_tools.h bubble_sort.h insertion_sort.h main.c selection_sort.h mbp:c $ ls searching array_tools.c array_tools.h binary_search.c binary_search.h linear_search.c linear_search.h main main.c Within searching , I am building an executable that needs to use insertion_sort function,

Google Drive Java API

穿精又带淫゛_ 提交于 2020-01-05 04:14:10
问题 I am desperately trying to compile Quickstart: Run a Drive App in Java but no matter what, I always hit on: java.lang.NoSuchMethodError: com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient The same thing happens both for at the servlet and the SE version. Any ideas? 回答1: The code compiled and ran fine here. Steps: Create/select a project at Google Developer Console , enable the Drive API, create a new Client ID so that you have a valid CLIENT_ID , CLIENT_SECRET , REDIRECT