compilation

solaris - compile 64bit gcc - elf class error

北城以北 提交于 2019-12-04 20:15:22
I'm installing a modern version of gcc on solaris. I compiled gmp, mpfr and mpc, they're all 64bit. When I try to configure gcc as follows I get an error complaining that mpc,mpfr and gmp are the wrong elf class. What gives? ./../gcc-4.5.1/configure --prefix=/opt/OurAppDir/gcc --with-gmp=/opt/OurAppDir/gmp --with-mpfr=/opt/OurAppDir/mpfr --with-gnu-as --with-gnu-ld --build=sparc-sun-solaris2.10 checking build system type... sparc-sun-solaris2.10 checking host system type... sparc-sun-solaris2.10 checking target system type... sparc-sun-solaris2.10 checking for a BSD-compatible install... ./..

Compiling a driver as a part of a kernel, not as a module

六眼飞鱼酱① 提交于 2019-12-04 19:59:32
问题 I am trying to create a minimalistic Linux for an embedded device. That means the necessity of compiling kernel and drivers. One driver is written directly for the device's board by it's creator, so it is not a repository one. It can be compiled as a kernel module. However because of immutable nature of the Linux and requirement of extremely small use of memory I do not want to use modules. I want all drivers built-in in the kernel. And all drivers provided with kernel I have set this way. So

iPhone compile for thumb

早过忘川 提交于 2019-12-04 19:45:35
问题 I've heard it might be a good idea to turn off "compile for thumb" in an iPhone target's settings to increase performance. I'm having some trouble finding this setting though. Since I couldn't find it in my current project, I decided to make a new one (where I could find and set it), and copy my files over to it (and also update all libs I'm using at the same time). But now it seems like this setting has disapperad from this new project also. No matter what SDK I choose, simulator or device,

It is possible to read an object file?

你离开我真会死。 提交于 2019-12-04 19:39:15
问题 I was curious about .obj files: I pretty much don't know what they are (or what they contain), so I opened them with Vim text editor and what I found inside was an Alien like language... Is there any way to understand what they represent and what is their content Also, for what are they being used ? Thanks. 回答1: Sure. But every different platform has a different object format. On Windows, you could use a tool like dumpbin (dumpbin comes with Visual Studio). On Linux, you could use "dumpobj",

Running the C# compiler from a C# program

拜拜、爱过 提交于 2019-12-04 19:37:26
I am trying to build a C# program that converts a different language into C# code. I have the program working fine, converting the code and writing it to a .cs file. I want to have this file automatically be compiled, and run, however I cannot figure out how to do this with C#. I can do it manually by simply running a batch file I wrote, and I attempted to run this batch file from C# using the System.Diagnostics.Process class. When it ran it gave an error within the batch code itself, saying that none of the commands were found (the usual "not an executable, batch file etc"). I can't figure

How to configure VS to compile only changed code

假装没事ソ 提交于 2019-12-04 19:32:50
问题 I have very big solution, and it compiling every time I'm tring to debug. So I know that I can to disable building of all projects at all in solution configuration, but is there way to say to Visual Studion to compile only changed code? I sure that is. Thank you for ahead. 回答1: As Marnix and Anton already said this is what VS normally does. But if you have a lot of projects within your solution which depend on each other and you make changes to a component which will be used by all or most of

Xcode, is it possible to intercept and change code on build without updating the file? If so, how?

天大地大妈咪最大 提交于 2019-12-04 19:19:41
I need a way to intercept the code before it goes into the compiler, change it, AND have it remain the same in the file / in Xcode afterwards. I thought build scripts were a sort of stream interception but that doesn't seem to be the case. Another method might be to run a script both before and after build. Are there any implications with this I should be aware of? ----- EDIT ----- Why? I have an idea for an auto-logging system based on a certain comment syntax. I want to be able, on build, to parse a certain string and replace it with a logging function but have the code remain unchanged. Is

Why does 'undefined behaviour' exist? [duplicate]

血红的双手。 提交于 2019-12-04 18:56:28
问题 This question already has answers here : Why is undefined behaviour allowed in C (3 answers) Closed last year . Certain common programming languages, most notably C and C++, have the strong notion of undefined behaviour : When you attempt to perform certain operations outside of the way they are intended to be used, this causes undefined behaviour. If undefined behaviour occurs, a compiler is allowed to do anything (including nothing at all, 'time traveling', etc.) it wants. My question is:

iOS - conditional compilation (xcode)

岁酱吖の 提交于 2019-12-04 18:44:32
I have created an additional iPad target for what was originally an iphone app. From the Apple docs: "In nearly all cases, you will want to define a new view controller class to manage the iPad version of your application interface, especially if that interface is at all different from your iPhone interface. You can use conditional compilation to coordinate the creation of the different view controllers." But they don't give any example or detail on what conditional compilation is. Can anyone give an example? And where would I do this? EDIT: I have tried defining the following C Flags in the

mysql-python: building a completely standalone _mysql.so on Mac OS X?

烈酒焚心 提交于 2019-12-04 18:41:18
I'm running a database server in a Linux VM (Ubuntu 9.10) under VMware Fusion, but coding Django on the Mac side. Installing mysql-python requires that MySQL is installed on the Mac for compiling _mysql.so into site-packages . However, after this is done, I have no further use for MySQL on the Mac side, and would rather just delete it. Of course, this is not possible when _mysql.so requires /usr/local/mysql/lib/libmysqlclient_r.16.dylib . There is a "static" option in mysql-python's site.cfg , which, when set to "true", significantly increases the size of the _mysql.so file, but it still