compilation

C++ Errors: “ 'class' does not name a type” and “invalid use of incomplete type ‘struct …' ”

限于喜欢 提交于 2019-12-13 02:57:03
问题 Here is a very repetitive issue, also here in StackOverflow, but I do not manage to solve my problem even trying the different answers. So, I have some classes: main.cpp: #include "foo.h" #include "bar.h" ... foo.h: #include "bar.h" class foo { foo(); bar& bind(bar &b); gru& bind(gru &g); }; bar.h: #include "foo.h" class bar { bar(); foo& bind(foo &f); gru& bind(gru &g); }; Clearly, I have a cyclic dependency. So I get the infamous error 'bar' does not name a type . In this case, I add class

What is an alternative to including sys/times.h on windows?

↘锁芯ラ 提交于 2019-12-13 02:35:35
问题 Background I am trying to compile some code on windows that has previously been compiled on QNX. According to this SO Question and this SO Question, I can resolve this issue by simply removing the include statements for sys/times.h. When I remove the includes, I get a bunch of errors saying that variables have not been defined within the scope. I assume this is because I have removed the include call. Question What is an alternative to using sys/times.h in the code so I can use it on windows?

How to make my cheque generator output exactly what it is instead of “Zero” in C

安稳与你 提交于 2019-12-13 02:35:34
问题 My Cheque generator program has worked flawlessly for any input you give it to make it output the numerals in words. for example if I were to input "1234.56" it will out put "One Thousand Two Hundred Thirty Four Dollars and ... 56 Cents". However whenever I want to output something like "1000" it will output "One Thousand Zero Dollars and ... 0 Cents". Obviously its not 1000 Zero dollars, The cents are perfectly fine, however I wish to get rid of that "Zero" but I need that in there for

Using conditional expression for Kits in Qt qmake

烈酒焚心 提交于 2019-12-13 02:15:26
问题 I have a qmake (Qt 4.8.6) .pro file and I need to add conditional expressions based on the compiled kits: I currently have 2 Kits (with different compilers), one for the Desktop and one for the Embedded Platform , my application is linked to some libraries, that are compiled both for Desktop and for Embedded in two different folders. So what I'd like to achieve is: unix { embedded-platform { LIBS+= -lonearm -ltwoarm etc... }} unix { desktop { LIBS += -lonex86 -ltwox86 etc... }} I read the

How to compile an mruby example?

流过昼夜 提交于 2019-12-13 01:56:45
问题 Hearing about mruby has inspired me to start learning C programming. I have worked through a few tutorials online so I understand the basics, but now I would like to start playing with mruby by compiling an example application. I understand how to compile a single C file, but I'm stuck at trying to figure out how to also compile mruby along with my own code. I'm using GCC on Mac OS X 10.8. Using this example: #include <stdlib.h> #include <stdio.h> #include <mruby.h> #include <mruby/compile.h>

cant compile apk using Game Maker Studio

左心房为你撑大大i 提交于 2019-12-13 01:55:20
问题 I just updated the build tools using android SDK manager. Now I cant compile apk using game maker studio. Here is the error output from the console. I dont think i have changed anything except windows update. I have windows 10, 64 bit Stats : GMA : Elapsed=6821.0873 Stats : GMA : sp=32,au=0,bk=3,pt=0,sc=11,sh=0,fo=4,tl=0,ob=41,ro=3,da=0,ex=1,ma=29,fm=0x49E50A39 cmd /c ""C:\Users\pc\AppData\Roaming\GameMaker-Studio\Android\runner\gradle\gradlew"" build -x assembleDebug :com.mysite.myapp

Error when compiling apache, “Undefined symbols:Undefined symbols:”_apr_dir_read$INODE64“…ld: symbol(s) not found”

不想你离开。 提交于 2019-12-13 00:23:30
问题 I am trying to compile Apache. I did download the latest version of the sourcecode (2.2.17). This is what I do: > sudo ./configure --prefix=/usr/local/apache2 --with-included-apr --enable-mods-shared=all --enable-module=so > sudo make and when doing that I get: /Users/Niklas/Development/apache/httpd-2.2.17/srclib/apr/libtool --silent --mode=link gcc -g -O2 -o httpd modules.lo buildmark.o -export-dynamic server/libmain.la modules/http/libmod_http.la modules/mappers/libmod_so.la server/mpm

Compilation error: /usr/bin/ld: cannot find -lclntsh

二次信任 提交于 2019-12-12 19:59:00
问题 While trying to compile a C program using make file, I am facing the following linking error described below. I know this kind of issues are already discussed in many other posts, but I tried with solutions suggested in them but they all did not work. /usr/bin/ld: cannot find -lclntsh libclntsh.so and libclntsh.so.10.1 are present in oracle path /u01/app/oracle/product/10.2.0/lib and that is being given as -L option in make file. Still I am facing the issue:- Linking yieldrpt ... cc -v -g -D

Eclipse RCP standalone export problem with Groovy scripts

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-12 19:26:41
问题 I am trying to export a standalone RCP app using Eclipse 3.5.2. The app has a main pure Java plug-in, and a Java / Groovy plug-in that is used by the main plug-in. When I export the main RCP plug-in using the "Export Wizard", I get compiler errors saying that the Groovy classes cannot be found, e.g ERROR in C:\mysrc\src\ch\calcs\providers\CalcProvider.java (at line 8) import ch.calcs.ArgSet; This plug-in works fine when run from within Eclipse. EDIT: Also tried this using a hand-crafted plug

Do unused ES6 modules affect performance?

僤鯓⒐⒋嵵緔 提交于 2019-12-12 19:20:36
问题 I know for a fact that unused Java/.NET imports won't affect performance. But I also know that implementations of require() (used to?) simply pull and concatenate the entire required module/file at compile time, and that the import statement is sort of an evolution of that. Is it actually different? Will forgetting a very big unused ES6 module in the import list affect my app's performance? 回答1: Yes, it will definitely affect performance, especially if you have non-exported code that does