compilation

Netbeans: move a text file into dist folder when compiling

微笑、不失礼 提交于 2019-12-12 08:54:08
问题 I have a text file (let's say textfile.txt ) stored in the project folder in Netbeans 7.3 , e.g. project folder textfile.txt src package package.subpackage MyClass.java When I compile I get a dist folder where the jar file is put in, e.g. project folder textfile.txt dist MyProject.jar src package package.subpackage MyClass.java How can I edit the build.xml file to make the file textfile.txt being copied under dist folder? 回答1: Edit the "-post-compile" target inside the build.xml as follows:

Build OpenSSL on Linux with -g for debugging

☆樱花仙子☆ 提交于 2019-12-12 08:35:17
问题 I have a segfault coming from OpenSSL (specifically SSL_read ) that I'd like to debug. I think the best step to take here is to build the library myself with debug symbols so I can step into the function and see the command it's happening on. It's not clear to me how to a) build the library myself and b) hack the makefile to give me the debug symbols. Does anyone have experience doing this with this specific library, or have general guidelines on this sort of build and modify approach? Got

Sass importing without compiling

 ̄綄美尐妖づ 提交于 2019-12-12 08:34:58
问题 In sass, the way one imports is by using the import command. I will use Zurb Foundation as an example: @import "foundation"; This will then import the whole foundation.scss file and all it's relative imports to the top of the current file. This means that the entire foundation.scss file will be compiled and outputted along with the contents of the file to the final <name here>.css file. Though this is good for customisation, such as custom colors and spacing, it becomes a pain when creating

How can I auto compile my HAML files into HTML files in a tiny project that doesn't run on RoR?

邮差的信 提交于 2019-12-12 08:24:52
问题 I have only today started playing with compass and haml . While I am quite familiar with the way sass works and I get the idea of what compass is for sass and how to use it, I've hit a little bit of a road block when it comes to using haml efficiently. Of course I am hoping that someone here already knows the answer to my problem and can give me a little jump start into haml . Here is what I'd like to accomplish: Auto compile my HAML files when I save them. The project however is just a tiny

How to compile a julia script?

六月ゝ 毕业季﹏ 提交于 2019-12-12 08:20:31
问题 I have noticed that the version 0.4.* of julia has a --compile option. Strangely, I cannot find any documentation about it. I was trying (in Ubuntu), to compile a julia script to an executable LLVM bytecode file. But until here, I failed: julia --compile=yes --output-bc test.bc test.jl Segmentation fault (core dumped) I also can get this error message: julia --compile=yes --output-bc test.bc test.jl ERROR: could not open file boot.jl This error does not appear anymore, if I put a boot.jl file

Compiling gdb for remote debugging

给你一囗甜甜゛ 提交于 2019-12-12 07:56:53
问题 I'm trying to remote debug an application running on arm9 So far I've been able to cross compile and execute gdbserver on my device. get gdb (7.2) sources and extract them ./configure --target=arm-none-linux-gnueabi --with-expat=/usr/local/lib/ make cd gdb/gdbserver ./configure --host=arm-none-linux-gnueabi make tftp gdbserver to my device run and connect via gdb to the device gdbserver "seems" to start correctly and attach itself to my helloworld application When I try to gdb to the remote

WPF - Compilation error: Tags of type 'PropertyArrayStart' are not supported in template sections

瘦欲@ 提交于 2019-12-12 07:40:07
问题 Ordinarily I wouldn't just post an error message on SO, but after a Google search only found one hit, I thought I'd at least open the floor for this error here on SO. I have a custom control called Sparkline with a dependency property called Values of type unit[] . Here's an example where I use it in a DataTemplate : <DataTemplate DataType="{x:Type Activity:ActivityHistory}"> <Controls:Sparkline Grid.Column="1" Values="{Binding Path=Values}" /> </DataTemplate> This code doesn't compile. I

Why doesn't the compiler detect out-of-bounds in string constant initialization?

两盒软妹~` 提交于 2019-12-12 07:27:20
问题 I read this question and its answer in a book. But I didn't understand the book's justification. Will the following code compile? int main() { char str[5] = "fast enough"; return 0; } And the answer was: Yes.The compiler never detects the error if bounds of an array are exceeded. I couldn't get it. Can anybody please explain this? 回答1: In the C++ standard, 8.5.2/2 Character arrays says: There shall not be more initializers than there are array elements. In the C99 standard, 6.7.8/2

When we compile a source code that contains a 'main' without linking, why can't we run it?

对着背影说爱祢 提交于 2019-12-12 07:24:49
问题 I am learning about compiling process and I know that linking is mainly used to link a binary file which contains a 'main' function with other binary files that contain other helper functions that are used in our main functions. However when I try to run an object file with the code: int main() { return 0; } Compiled with the -c command in gcc on Ubuntu, I try to run it and I get the error: "bash: ./source.o: cannot execute binary file: Exec format error" 回答1: Read Levine's Linkers & Loaders.

How to speed up g++ compile time (when using a lot of templates)

心不动则不痛 提交于 2019-12-12 07:07:59
问题 This question is perhaps somehow odd, but how can I speed up g++ compile time? My C++ code heavily uses boost and templates. I already moved as much as possible out of the headers files and use the -j option, but still it takes quite a while to compile (and link). Are there any tools out there which analyse my code and point out bottle-necks for the compiler? Or can one somehow profile the compiler running on my code? This would be really nice, because sometimes I have the impression, that I