synesissoftware / STLSoft-1.10

STLSoft 1.10 (current latest STLSoft)
Other
18 stars 8 forks source link

I got error when I using GCC 10.2 in msys2 #5

Open jackyxinli opened 4 years ago

jackyxinli commented 4 years ago

Hi, I got error when I using GCC 10.2 in msys2 on Windows 10. Codes listed below. Source Code: `#include

include <vole/vole.hpp>

include <comstl/util/initialisers.hpp>

using vole::object; using vole::collection;

int main(int argc, char *argv[]) { comstl::com_init init; object excelApp = object::create("Excel.Application", CLSCTX_LOCAL_SERVER, vole::coercion_level::naturalPromotion); excelApp.put_property(L"Visible", true);

collection workbooks = excelApp.get_property<collection>(L"Workbooks");
object dstWorkbook = workbooks.invoke_method<object>(L"Add");
object srcWorkbook = workbooks.invoke_method<object>(L"Open", L"D:/data2/xlsx-1557107544152.xlsx");

collection dstWorksheets = dstWorkbook.get_property<collection>(L"Worksheets");
object dstWorksheet = dstWorksheets.invoke_method<object>(L"Item", 1);

collection srcWorksheets = srcWorkbook.get_property<collection>(L"Worksheets");
object srcWorksheet = srcWorksheets.invoke_method<object>(L"Item", 1);
srcWorksheet.invoke_method_v(L"Copy", NULL, dstWorksheet);

srcWorkbook.invoke_method_v(L"Close");
dstWorkbook.invoke_method_v(L"SaveAs", L"D:/1.xls");
excelApp.invoke_method_v(L"Quit");

return 0;

}`

Makefile: `INCLUDE_PATH = -I ./include CXX_FLAGS= -Wall -fpermissive LIBS = -loleaut32 -lstdc++

all: docx2pdf

docx2pdf: main.o g++ -o $@ $< $(LIBS)

%.o : %.cpp g++ $(CXX_FLAGS) -o $@ $(INCLUDE_PATH) $<`

mwsis commented 11 months ago

Hi. I recognise that this has been a very long-time in response - I've been working in a context where it wasn't C++ and I was not permitted to do open source (even if I'd had the time, which was not so) - but I'm keen to catch up on all things STLSoft in the coming days. I've just released 1.10.1 proper, and am now looking into reported issues.

Can you let me know what the compile error was, and I'll attempt to follow up.

Thanks

Matt

Absolutely no problems if you're no longer interested, and appreciate the effort you made back then.