Browse Source

Attempted compilation, fails on linking Global primitives

refactor
suhrke 5 years ago
parent
commit
2165899504
  1. 19
      Makefile
  2. 32
      source/Global.cpp

19
Makefile

@ -1,23 +1,12 @@ @@ -1,23 +1,12 @@
EX=paperback-cli
SDIR=./source
CC=g++
CFLAGS=-std=c++11
CFLAGS=-std=c++11 -I"$(SDIR)" -I"$(SDIR)/cxxopts/include"
all: main
main: Compress.o Decode.o
$(CC) $^ main.cpp $(CFLAGS) -o $(EX) 2>error8.log
Compress.o: Compress.cpp
$(CC) -c $^ $(CFLAGS)
Decode.o: Decode.cpp
$(CC) -c $^ $(CFLAGS)
Crc16.o: Crc16.cpp
$(CC) -c $^ $(CFLAGS)
Ecc.o: Ecc.cpp
$(CC) -c $^ $(CFLAGS)
main: $(SDIR)/main.cpp $(SDIR)/Decoder.cpp $(SDIR)/Printer.cpp $(SDIR)/Fileproc.cpp $(SDIR)/Ecc.cpp $(SDIR)/Crc16.cpp
$(CC) $^ $(CFLAGS) -o $(EX)
clean:

32
source/Global.cpp

@ -1,32 +0,0 @@ @@ -1,32 +0,0 @@
#include "Global.h"
#include <iostream>
void Reporterror(const std::string &input) {
std::cerr << input << std::endl;
}
void Message(const std::string &input, int progress) {
std::cout << input << " @ " << progress << std::endl;
}
// Converts file date and time into the text according to system defaults and
// places into the string s of length n. Returns number of characters in s.
#ifdef _WIN32
int Filetimetotext(FILETIME *fttime,char *s,int n) {
int l;
SYSTEMTIME sttime;
FileTimeToSystemTime(fttime,&sttime);
l=GetDateFormat(LOCALE_USER_DEFAULT,DATE_SHORTDATE,&sttime,NULL,s,n);
s[l-1]=' '; // Yuck, that's Windows
l+=GetTimeFormat(LOCALE_USER_DEFAULT,TIME_NOSECONDS,&sttime,NULL,s+l,n-l);
return l;
};
#endif
Loading…
Cancel
Save