Permalink
Browse files

created eclipse project for linux editing.

added rubbish makefile.
  • Loading branch information...
eagle2com committed Feb 22, 2012
1 parent a4d6e66 commit e9130f6fc6f9e2dde28123cff7876d786f31ce9a
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?>
+
+<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+ <storageModule moduleId="org.eclipse.cdt.core.settings">
+ <cconfiguration id="cdt.managedbuild.toolchain.gnu.base.1199017521">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.base.1199017521" moduleId="org.eclipse.cdt.core.settings" name="Default">
+ <externalSettings/>
+ <extensions>
+ <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+ <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <configuration buildProperties="" id="cdt.managedbuild.toolchain.gnu.base.1199017521" name="Default" parent="org.eclipse.cdt.build.core.emptycfg">
+ <folderInfo id="cdt.managedbuild.toolchain.gnu.base.1199017521.89176298" name="/" resourcePath="">
+ <toolChain id="cdt.managedbuild.toolchain.gnu.base.951409654" name="cdt.managedbuild.toolchain.gnu.base" superClass="cdt.managedbuild.toolchain.gnu.base">
+ <targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.base.899118860" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
+ <builder id="cdt.managedbuild.target.gnu.builder.base.1406296717" managedBuildOn="false" name="Gnu Make Builder.Default" superClass="cdt.managedbuild.target.gnu.builder.base"/>
+ <tool id="cdt.managedbuild.tool.gnu.archiver.base.999869069" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
+ <tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.2112753375" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base"/>
+ <tool id="cdt.managedbuild.tool.gnu.c.compiler.base.682725869" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base"/>
+ <tool id="cdt.managedbuild.tool.gnu.c.linker.base.1458799066" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/>
+ <tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.1514450264" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base"/>
+ <tool id="cdt.managedbuild.tool.gnu.assembler.base.676567158" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base"/>
+ </toolChain>
+ </folderInfo>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <project id="src.null.1399486196" name="src"/>
+ </storageModule>
+ <storageModule moduleId="scannerConfiguration">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+ </storageModule>
+</cproject>
@@ -0,0 +1,2 @@
+/*.o
+/*.out
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>src</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+ <triggers>clean,full,incremental,</triggers>
+ <arguments>
+ <dictionary>
+ <key>?name?</key>
+ <value></value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.append_environment</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.autoBuildTarget</key>
+ <value>all</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildArguments</key>
+ <value></value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildCommand</key>
+ <value>make</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
+ <value>clean</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.contents</key>
+ <value>org.eclipse.cdt.make.core.activeConfigSettings</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+ <value>false</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableCleanBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableFullBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.fullBuildTarget</key>
+ <value>all</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.stopOnError</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
+ <value>true</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+ <triggers>full,incremental,</triggers>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ <nature>org.eclipse.cdt.core.ccnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+ </natures>
+</projectDescription>
@@ -1,5 +1,7 @@
#include "LinearSystem.h"
#include <iostream>
+#include <cstdlib>
+#include <cstring>
using namespace std;
LinearSystem::LinearSystem(int size):m_size(size),m_null_coefs(0)
@@ -0,0 +1,3 @@
+
+all:
+ g++ Literal.cpp LiteralElement.cpp LinearSystem.cpp TransferFunction.cpp main.cpp
@@ -0,0 +1,18 @@
+
+all: main.o TransferFunction.o
+ g++ main.o LiteralElement.o Literal.o LinearSystem.o TransferFunction.o -o main.x
+
+main.o: main.cpp
+ g++ -c main.cpp -o main.o
+
+Literal.o: Literal.cpp Literal.h
+ g++ Literal.cpp -o Literal.o
+
+LiteralElement.o: LiteralElement.cpp LiteralElement.h Literal.o
+ g++ -c LiteralElement.cpp -o LiteralElement.o
+
+LinearSystem.o: LinearSystem.cpp LinearSystem.h LiteralElement.o Literal.o
+ g++ -c LinearSystem.cpp -o LinearSystem.o
+
+TransferFunction.o: TransferFunction.cpp TransferFunction.h LiteralElement.o Literal.o LinearSystem.o
+ g++ -c TransferFunction.cpp -o TransferFunction.o
@@ -1,6 +1,8 @@
#include "TransferFunction.h"
-#include <iostream>
#include <fstream>
+#include <ios>
+#include <iostream>
+#include <cstdlib>
#include "LinearSystem.h"
using namespace std;
@@ -32,11 +34,12 @@ void TransferFunction::Clean(void)
void TransferFunction::LoadFromFile(string filename)
{
Clean();
- ifstream in_stream(filename);
+ ifstream in_stream(filename.c_str());
+
if(!in_stream)
{
cout << "Could not open: "<<filename<<endl;
- return ;
+ exit(1) ;
}
cout << "Opened "<<filename<<endl;
int n_num, n_denom,max_power;
@@ -221,4 +224,4 @@ void TransferFunction::FindFactors(void)
correct_factors[i*2] = factors[index*2 - 2];
}
-}
+}
Oops, something went wrong.

0 comments on commit e9130f6

Please sign in to comment.