compilation

LD script for symbol hidding in c++

扶醉桌前 提交于 2019-12-13 13:16:43
问题 I would like to use an GNU LD version script to hide unwanted symbols in c++ shared library. Say my header file looks like this: int a(); int a(int); class B { B(){} ~B(){} int x(int); }; std::ostream& operator<< (std::ostream& out, const B& b ); I would like to hide everything which is not stated in the header file. How would a version script for this look like? 回答1: Something like this should do the trick: { global: extern "C++" { "a()"; "a(int)"; B::*; "operator<<(std::ostream&, B const&)"

How to add Tkinter support for PIL Python library

你。 提交于 2019-12-13 12:33:26
问题 Okay, well supposedly PIL is supposed to be able to work with Tkinter automatically, but mine is not. I found this text file in the Imaging directories Tk directory. Using PIL With Tkinter Starting with 1.0 final (release candidate 2 and later, to be precise), PIL can attach itself to Tkinter in flight. As a result, you no longer need to rebuild the Tkinter extension to be able to use PIL. However, if you cannot get the this to work on your platform, you can do it in the old way: * Adding

ISO C++ Forbids Declaration of Multiset [duplicate]

夙愿已清 提交于 2019-12-13 10:53:36
问题 This question already has an answer here : ISO C++ forbids declaration of ‘multiset’ with no type (1 answer) Closed 4 years ago . I am trying to build a software using waf and I get the error: In file included from ../src/internet-stack/mp-tcp-typedefs.cc:6: ../src/internet-stack/mp-tcp-typedefs.h:151: error: ISO C++ forbids declaration of ‘multiset’ with no type ../src/internet-stack/mp-tcp-typedefs.h:151: error: expected ‘;’ before ‘<’ token ../src/internet-stack/mp-tcp-typedefs.cc: In

Creating a bash script to compile a c++

血红的双手。 提交于 2019-12-13 10:36:23
问题 I have a program I've written in c++ which outputs some simulation results to a .csv excel file. According to some instructions I need to create a simple bash script that would run the .cpp file given the command "$ run_program" ($ is not a part of the command). I've looked on Stackoverflow and other sites however I have not found a concrete answer to help me. I would also greatly appreciate it if those who answer can take some time to explain what the parameters mean. Thank you. How I should

How to include and compile multiple C++ files? [closed]

旧城冷巷雨未停 提交于 2019-12-13 09:22:58
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . I have these files: classA.cpp , classA.h , classB.cpp , classB.h , and main.cpp . All needed libraries are included in both .h files. In main.cpp I include classA.cpp and classB.cpp . In classB.cpp I include classB.h and in classA.cpp it is classA.h I compile it by g++ main.cpp (

Error linking object files

不问归期 提交于 2019-12-13 07:56:34
问题 I had this in my .cpp #include <iostream> #include <string> #include <vector> #include "HW00.h" using namespace std; int main() { string netId = "aag61"; HW00 hw00(netId); hw00.printMyAnswer(); return 0; } And I was able to compile the driver file into a .o file without any errors but when I run g++ -o HW00.exe aag61HW00.o HW00Imp.o I keep getting this confusing error: "ld: warning: ignoring file HW00Imp.o, file was built for unsupported file format ( 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00

Cannot build asmack

白昼怎懂夜的黑 提交于 2019-12-13 07:12:46
问题 Following the instructions here: https://github.com/Flowdalic/asmack/wiki/Build-Instructions-for-Linux This is what I get: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Smack git repository git://github.com/Flowdalic/smack.git with branch master SMACK_LOCAL:false UPDATE_REMOTE:true BUILD_CUSTOM: BUILD_JINGLE:false PARALLEL_BUILD:false BASE:/home/pankaj/asmack ## Step 00: initialize ## Step 15: fetching sources Fetching master branch/commit from git://github.com

Embarcadero C++ Builder 2010 - Compilation

家住魔仙堡 提交于 2019-12-13 07:05:45
问题 I am using Embarcaedro C++ Builder 2010 for a few weeks and there are somethings strage about the compilation process.. First, does anybody know a trick to prevent C++ Builder from re-compiling every source file that have'nt been edited ? Second, why is the compiler compiling more lines of code than the project really contains ? It awefully increases the compilation time ! I browsed the web without satifying answers. I tried : to keep object files to disable pre-compiled headers organising

Header file wont work -undefined reference to `method'

时光怂恿深爱的人放手 提交于 2019-12-13 06:55:17
问题 Header File doesn't seem to work properly. I'm new to C and don't really know what i'm doing error - findvals.c:(.text+0x561): undefined reference to `approxEqual' findvals.c #include <time.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "utils.h" int main(int argc, char **argv) { //printf("GRR ENTAR SOMETHANG"); //char word[64]; //scanf("%s", word); int count = 0; int ret; double x; double y; int i = 0; int c = 0; char *refStr, *tolStr; double refDub; double tolDub;

C++ / R: RInside in Windows 7 machine

你说的曾经没有我的故事 提交于 2019-12-13 06:55:13
问题 This question is related to: C++ and R: Create a .so or .dll plus i have read the questions and replies of these posts: Compiling RInside programs on Windows Problem with compiling RInside examples under Windows I try to run the code provided as an example in the answer provided #include <RInside.h> // for the embedded R via RInside #include <iomanip> int main(int argc, char *argv[]) { RInside R(argc, argv); // create an embedded R instance std::string txt = // load library, run regression,