c++,makefileRelated issues-Collection of common programming errors
datenwolf
c++ templates compiler-errors
Ive looked all over and I cant find anything relating to my problem. Im trying to write a class definition for a polygon class that basicly has a vector that holds pointers to a point. When I try to compile i keep geting the folllowing errors…error C2143: syntax error : missing ‘;’ before ‘<‘ error C4430: missing type specifier – int assumed. error C2238: unexpected token(s) preceding ‘;’ error C2061: syntax error : identifier ‘vector’ error C2065: ‘myPolygonPoints’ : undeclared identifier
Faylixe
c++ compilation cplex
I have a compilation problem using C++ language and IloCplex framework.I first tried to compile the entire project using a makefile, but i got an unexpected error, with a class header call AbstractModel, so as to ensure that this error is not due to other file, i decided to just compile this class with this command :g++ -o AbstractModel.o -c -I/path/to/cplex/include -I/path/to/concert/include -DIL_STD AbstractModel.cppThen i realized that i got the same error message, here is the AbstractModel c
hrr4
c++ rapidxml
I’m having an issue with storing member variables that are of RapidXML datatypes. I also experience this problem with member functions’ return types.Only in the class’ file header to I experience this issue. Using these datatypes within functions yields no issues.class Level { public://Level();//~Level();sf::Sprite Update(Camera& _currentView);char* ReadFile(std::string& _level);xml_node<>* ParseFile(std::string _level, std::string _tileset);void BuildLayers(xml_node<>* _file
Coding Mash
c++ class sfml
My header for my class is#ifndef _CENGINE_H #define _CENGINE_H #include “SFML\Graphics.hpp” #include “CTextureManager.h” #include “CTile.h”class CEngine { private://Create instance of CTextureManagerCTextureManager textureManager;//Load texturesvoid LoadTextures();//New tileCTile* testTile;bool Running; //Is running?sf::RenderWindow* window; //Create render window public:CEngine(); //Constructorint Execute(); //Executebool OnInit(); //On intializationvoid GameLoop(); //Main game loopvoid Render(
ayurchen
c++ c comparison unsigned signed
By “intuitive” I mean givenint a = -1; unsigned int b = 3;expression (a < b) should evaluate to 1.There is a number of questions on Stackoverflow already asking why in this or that particular case C compiler complains about signed/unsigned comparison. The answers boil down to integer conversion rules and such. Yet there does not seem to be a rationale behind why compiler has to be so exceptionally dumb when comparing singed and unsigned integers. Using declarations above, why expression like(
sweet
c++ multithreading
I saw this question Simple example of threading in C++ but my problem is that I want to run this program in windows 32 and it seems that pthread is not recognized in windows!please tell me what is problem?This is my error: fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add ‘#include “StdAfx.h”‘ to your source?(I added #include “StdAfx.h but it stilldoes not work!)#include <pthread.h> #include <stdio.h> #include <stdlib.h> #defi
KRao
c++ iostream
I am reading a std::istream and I need to verify without extracting characters that:1) The stream is not “empty”, i.e. that trying to read a char will not result in an fail state (solved by using peek() member function and checking fail state, then setting back to original state)2) That among the characters left there is at least one which is not a space, a tab or a newline char. The reason for this is, is that I am reading text files containing say one int per line, and sometimes there may be e
Eduardo Moratto
c++ visual-c++
I am trying to creates a class Circle that calculates area of a circle. It uses a basic Point class that initializes 2 points, one as the center one as a point on the circle (aka radius) these are the errors I am getting:(25) error C2533: ‘Circle::{ctor}’ : constructors not allowed a return type (25) error C2511: ‘Circle::Circle(Point &,Point &)’ : overloaded member function not found in ‘Circle’ (12) : see declaration of ‘Circle’ (46): fatal error C1004: unexpected end-of-file foundMay
Dan D.
c++ function struct
I’m learning about struct types in C++ and I tried to write a function that would change the values of the members of a struct type variable. However, it produces an unexpected output and I can’t figure out why this is happening. /Program to test struct types/#include <iostream> #include <cstring> using namespace std; struct myStruct {string a;string b;int c;float d; };void assignValues(myStruct myobj) {myobj.a = “foobar”;myobj.b = “Foo Bar”;myobj.c = 12;myobj.d = 15.223; } int main
JRL
c++ include
I’m going through exercises of a C++ book. For each exercise I want to minimize the boilerplate code I have to write. I’ve set up my project a certain way but it doesn’t seem right, and requires too many changes.Right now I have a single main.cpp file with the following:#include “e0614.h” int main() {E0614 ex;ex.solve(); }Each time I create a new class from an exercise, I have to come and modify this file to change the name of the included header as well as the class i’m instantiating.So my ques
Beta
c# makefile nmake
I am trying to build a multimodule assembly. I have got 2 files namely Fraction.cs and MyCalc.cs and both in the same namespace and another AssemblyInfo.cs. I dont know how to make a makefile file so I copied one from the book I am following. Here are the contentsASSEMBLY= MySharedAssembly.dllBIN=.\bin SRC=. DEST=.\binCSC=csc /nologo /debug+ /d:DEBUG /d:TRACE MODULETARGET=/t:module LIBTARGET=/t:library EXETARGET=/t:exeREFERENCES=System.dllMODULES=$(DEST)\Fraction.dll $(DEST)\MyCalc.dll METADATA
gwenger
c unix gcc makefile
I’ve written the below makefile:hw2p1: hw2p1_main.o hw2p1_getit.o hw2p1_parseit.o hw2p1_moveit.o hw2p1_showit.ogcc hw2p1_main.o hw2p1_getit.o hw2p1_parseit.o hw2p1_moveit.o hw2p1_showit.o hw2p1_main.o: hw2p1_main.cgcc -c hw2p1_main.c hw2p1_getit.o: hw2p1_getit.cgcc -c hw2p1_getit.c hw2p1_parseit.o: hw2p1_parseit.cgcc -c hw2p1_parseit.c hw2p1_moveit.o: hw2p1_moveit.cgcc -c hw2p1_moveit.c hw2p1_showit.o: hw2p1_showit.cgcc -c hw2p1_showit.cThe first time I tried to call make, I got the error: “make
Raugnar
c++ makefile fortran
Greetings Everyone,Trying to compile using g++ and need to link the standard f90 (or f77 even) libraries for some fortran source codes in my Makefile. I cant find the name of it anywhere.Makerfile:products: SlowDynamic.exeSlowDynamic.exe: main.o SA.o mersenne.o CFE.o BCs.o EMatrix.o Numbering.o KMatrix.o Solve.o MA_57.o blas.o MA_57_Depend.o Metis.og++ -L/usr/sfw/lib -R/usr/sfw/lib -lgcc_s -lstdc++ -o SlowDynamic.exe main.o \SA.o mersenne.o CFE.o MA_57.o blas.o MA_57_Depend.o Metis.o\BCs.o EMatr
Raúl Ferràs
makefile
I have a script that compresses my css files and outputs the filename of the output file. I’m trying to build a makefile to automatize the process:all:@echo “Compiling CSS”CSS_OUTPUT=$(shell php minify_css.php )echo $(CSS_OUTPUT)I’m trying to store the output filename in CSS_OUTPUT variable, but I’m doing something wrong, as this whole makefile just prints:$ make abcdefg.css Compiling CSS CSS_OUTPUT= echo So output is not assigned to CSS_OUTPUT. Also, why is php output printed before the @echo “
Joris Meys
path makefile cygwin
I am trying to use ifeq in my rule pattern and I have problems with it. This is the rule I am having trouble with:$(OBJS): $(OBJDIR)/%.o : ../%.c@mkdir -p $(dir $@)ifeq(mcc.exe,$(CC))o_file:=$(shell echo $@ | sed -e ‘s/\/cygdrive\///’ | sed -e ‘s/\([a-zA-Z]\)/\1:/’)$(CC) $(CFLAGS) $< -o $(o_file)else$(CC) $(CFLAGS) $< -o $@endifWhen I run this, I get:”/bin/sh: -c: line 0: syntax error near unexpected token `mcc.exe,mcc.exe’ /bin/sh: -c: line 0: `ifeq(mcc.exe,mcc.exe)'”But, when I don’t use
Bjarke Freund-Hansen
android linux makefile android-source prebuild
I have glibc compiled for arm which is different from Android glibc or the bionic C as the glibc environment I have complied will help in providing more api’s. Now I can copy the glibc environment on /system/ folder while Android is running, and on doing chroot I can run my programs on glibc environment.Currently I am compiling glibc and Android separately and then tarring the glibc and copying it on Android emulator sdcard and then untarring it on /system folder and then doing chroot on /system
Christian Ivicevic
variables recursion linker makefile
Currently i am having problems with a makefile due to some unexpected recursion and the neccessary collection of filenames. I want to call recursively a Makefile in the root folder of my project and that one should go through every possible subfolder (and their subfolders…) with the goal to collect all files and write them to a variable to be used as “targets” or dependent files.For example: /Makefile goes through /Source, /Source/Boot and finds /Source/Boot/Boot.s (-> one target is therefore
Boris the Spider
makefile gnu-make
is my first question here and first time I manage GNU Make so I want to explain my problem.perhaps you could help me to find a light at the end of this tunnel.That thing Im trying to do is to check a word into my path and do something after check pathI’ve got that code on make:WORD=GNUMAKE; \FOUND=1; \echo “$$FOUND”; \PWD=$(PWD); \ifeq ($(findstring $$WORD,$$PWD),) \$(warning list contains “$$WORD”) \endifbut when I run $make I get this error, for me so strange and can’t find a solution could yo
Arthur Ulfeldt
c makefile autotools openssh
I needed to add AM_PATH_CHECK to configure.am I then try to run the usual sequence of autotools commands to rebuild all the makefiles and whatnot:aclocal automake -ac autoheader autoreconf ./configure makeand here my lack of understanding of autotools showes up because this release of openssh has no Makefile.am??? now what do I do?if i try to ignore this and build anyway configure dies with this lovely error:checking whether OpenSSL’s PRNG is internally seeded… yes ./configure: line 18275: syn
techtonik
python variables makefile
I have a complex logic for detecting path for Makefile variable. I gave up on doing this in make language, so I coded it in Python, and want to embed the code into Makefile to set variable. However, this doesn’t work:define DETECT_SDK import os locations = [“../google_appengine”,”/usr/local/google_appengine”,”../.locally/google_appengine”, ] for path in locations:if os.path.exists(path):print(path)break else:print(“.”) endefSDK_PATH ?= $(shell python -c $(DETECT_SDK))default:python -c ‘import sy
Web site is in building