compilation

WINDOWS.H already included error

偶尔善良 提交于 2019-12-05 18:47:44
问题 I get an error when trying to compile a small c++ program Error 87 fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include c:\program files\microsoft visual studio 9.0\vc\atlmfc\include\afxv_w32.h 16 I made sure that the windows.h was not included in any of the project files I have. I am using a visual studio 2008 IDE Any reason why ? 回答1: reason why is because something is including Windows.h: the compiler is not lying to you. Go to project Properties-

freeling error with python and java api: undefined symbol: _ZN5boost6system15system_categoryEv

筅森魡賤 提交于 2019-12-05 18:26:42
问题 I installed freeling in Ubuntu 13.10 and I'm trying to use either the python or java apis but I get an error whenever I try to: matias@matias-IdeaPad-U430-Touch:~/Programas/Tools/freeling/freeling-3.1/APIs/python$ ./sample.py <test.txt >out.txt Traceback (most recent call last): File "./sample.py", line 10, in <module> import freeling File "/home/matias/Programas/Tools/freeling/freeling-3.1/APIs/python/freeling.py", line 26, in <module> _freeling = swig_import_helper() File "/home/matias

How can I make the compilation log create a new window in Emacs?

好久不见. 提交于 2019-12-05 18:07:32
If I only have one window showing in emacs and use M-x compile, the window splits in two and I can watch the compile buffer easily. However, if I have more windows showing, the compilation log takes over one of the others, which I find irritating. How can I make emacs always split a new window to show the compilation log? Edit: A bit more information from my reading that I've been doing. It looks like compile.el calls display-buffer, which only splits a window if it is current full width. Is there some way to avoid this behaviour? Török Gábor You may modify the solution provided by Trey

Compile error: unresolved overloaded function type

天涯浪子 提交于 2019-12-05 18:03:55
I try to compile the following with g++ 4.7.2: template <typename T> struct A { struct B { T t; template<T B::*M> T get() { return this->*M; } }; B b; T get() { return b.get<&B::t>(); } }; int main() { A<int> a; a.get(); } It gives me test.cpp: In member function ‘T A<T>::get()’: test.cpp:15:23: error: expected primary-expression before ‘)’ token test.cpp: In instantiation of ‘T A<T>::get() [with T = int]’: test.cpp:22:8: required from here test.cpp:15:23: error: invalid operands of types ‘<unresolved overloaded function type>’ and ‘int A<int>::B::*’ to binary ‘operator<’ Why? Thanks. You need

Maven - Pull code from SVN

人盡茶涼 提交于 2019-12-05 16:53:18
I am migrating J2ee Project from Ant to Maven, One of The ant tasks is to pull existing source from SVN Repository Compile it, and add its jar to my current build as Jar Is it possible to do the get the source and compile it in Maven? Thank you! <target name="checkoutBuild" description="Pulls code from SVN into the build directory"> <exec executable="svn"> <arg line="co ${svn.projecturl} ${project.build.root} -r ${svn.revision} --username ${svn.username} --password ${svn.password}"/> </exec> </target> Yes, in a similar way as in Ant. Execute the svn command in exec-maven-plugin in one of pre

Images in iPhone app appear in Simulator, but not when compiled to device

回眸只為那壹抹淺笑 提交于 2019-12-05 16:50:00
I am learning iPhone development, and have built a simple app that has an image that changes to another image when you tap it. If i build it to the simulator, it works fine, but if i build it to the device the images dont appear. i feel like they aren't being copied across. I have checked they have been named correctly and i have made sure i imported them to 'resources' I dont think it is a problem with the code because i added a thing to also make text appear when the image is tapped, and this works, so a button is still there doing something, it just doesn't have an image on it. -(IBAction

C++ compiles but gives error when executed

风格不统一 提交于 2019-12-05 16:46:10
I am new to Linux Ubuntu 11.10 and have basic C++exposure. I installed the g++ by sudo apt-get install build-essential and created a directory cpp in my home directory. I then wrote a program hello.cpp in my cpp directory #include <iostream> using namespace std; int main() { cout << "Hello !" ; return 0; } and compiled using g++ -W hello.cpp -o hello The program compiles without any errors/warnings. When I try to execute the file ./hello.cpp I get error messages: line 3: using: command not found line 6: syntax error near unexpected token `(' line 6: `int main() {' I tried looking at a lot of

Compiling any JavaFX project in NetBeans returns Unsupported major.minor version 52.0

▼魔方 西西 提交于 2019-12-05 16:23:40
问题 I see a number of similar questions Netbeans 8.0 Unsupported major.minor version 52.0 error Unsupported major.minor version 52.0 Error (duplicate) Running a JAR I compiled: Unsupported major.minor version 52.0 Can't fix Unsupported major.minor version 52.0 even after fixing compatibility But none with the same circumstances as mine. I've tried their solutions anyway (when relevant) and they haven't helped. I had created a JavaFX FXML Application in NetBeans 8.0.2 and had to manually upgrade

How to ignore .java files when compiling using maven?

久未见 提交于 2019-12-05 16:19:09
I have .java files in my source directory that don't compile yet due to some API change. I would like to fix sources one by one and it would be useful to ignore some of them to run tests. Colin Hebert With the maven compiler plugin and the exclude option: <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <excludes> <exclude>**/*Point*.java</exclude> </excludes> </configuration> </plugin> </plugins> </build> Resources: Maven 2 Compiler plugin - Compile mojo 来源: https://stackoverflow.com/questions/3621727/how-to

Trying compile a C Code with PHP

柔情痞子 提交于 2019-12-05 16:03:58
I have a file named gcc.exe and I have a php page... I want to use: gcc test.c And, if there's some compilation error, I want to show it on the php page... But I can't. What happens is: If the file is correct, it generates the .exe file, but if it's wrong, nothing happens. What I want here, again, is to show all errors. Anyone has an idea? Edit[1]: Some code: <?php exec("gcc teste.c",$results); print_r($results) ?> Output: *Nothing* Edit[2]: I tryed put gcc output on a text file: This way (on prompt): gcc test.c > teste.txt Teorically, everythings on the screen go to text file. But this was