Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » project is not compiling but eclipse shows no errors
project is not compiling but eclipse shows no errors [message #1016980] Fri, 08 March 2013 12:50 Go to next message
Michal Mising name is currently offline Michal Mising nameFriend
Messages: 5
Registered: February 2010
Junior Member
Hi

I'm trying to include some source files to a project. They allow to read, write and modify *.xls files. Here's basic code:

#include <iostream>
#include "ExcelFormat.h"
#include <iostream>
#include "funkcje.h"


using namespace ExcelFormat;
using namespace std;

#ifdef _WIN32

#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <shellapi.h>
#include <crtdbg.h>

#else // _WIN32

#define	FW_NORMAL	400
#define	FW_BOLD		700

#endif // _WIN32

static void example_read_write(const char* from, const char* to)
{

	cout << "read " << from << endl;
	BasicExcel xls(from);

	XLSFormatManager fmt_mgr(xls);
    CellFormat fmt(fmt_mgr);

	cout << "THIS IS DISPLAYED !!!" << endl;

	BasicExcelWorksheet * sheet = xls.GetWorksheet(0);

	cout << "THIS IS NOT DISPLAYED !!!" << endl;

	for(int y=0; y<2000; ++y) {             
		for(int x=0; x<20; ++x) {

    BasicExcelCell* cell = sheet->Cell(y, x);

            string cell_string = cell->GetString()?cell->GetString():"";

            cout << cell_string << endl;

            if(!cell_string.empty())
            {
		if(cell_string == "Element")
                {

                    cout << "Found!" << endl;

                    fmt.set_format_string(XLS_FORMAT_GENERAL);
                    fmt.set_font(ExcelFont().set_weight(FW_BOLD));
                    cell->SetFormat(fmt);

                }
            }

		}
	}

	cout << "write: " << from << endl;
	xls.SaveAs(to);
}


int main() {



	example_read_write("BasicXls_type1.xls", "BasicXls_type1-out.xls");
	return 0;
}


The only output is:
read zestawienie_typ1.xls
THIS IS DISPLAYED !!!


I get these warnings but none about paths or anything that would bring me to get this program working:
Description	Resource	Path	Location	Type
comparison between signed and unsigned integer expressions [-Wsign-compare]	ExcelFormat.h	/PierwszyEclipse/src	line 596	C/C++ Problem
'ExcelFormat::ExcelFont::_character_set' will be initialized after [-Wreorder]	ExcelFormat.h	/PierwszyEclipse/src	line 114	C/C++ Problem
  when initialized here [-Wreorder]	ExcelFormat.h	/PierwszyEclipse/src	line 80	C/C++ Problem
  when initialized here [-Wreorder]	ExcelFormat.h	/PierwszyEclipse/src	line 93	C/C++ Problem
  'std::wstring ExcelFormat::ExcelFont::_name' [-Wreorder]	ExcelFormat.h	/PierwszyEclipse/src	line 106	C/C++ Problem
'ExcelFormat::ExcelFont::_color_index' will be initialized after [-Wreorder]	ExcelFormat.h	/PierwszyEclipse/src	line 110	C/C++ Problem
  'short int ExcelFormat::ExcelFont::_weight' [-Wreorder]	ExcelFormat.h	/PierwszyEclipse/src	line 108	C/C++ Problem


Please, could somebody help me to work this out... Any suggestions would be appreciated.

[Updated on: Fri, 08 March 2013 12:51]

Report message to a moderator

Re: project is not compiling but eclipse shows no errors [message #1017203 is a reply to message #1016980] Mon, 11 March 2013 06:21 Go to previous message
Dirk Wibben is currently offline Dirk WibbenFriend
Messages: 50
Registered: February 2010
Member
Hi,

your warnings output looks like a 'table' (maybe 'tab' separated) with a header line 'Description Resource ...'.
If you read it like this, the 'Description' and 'Location' varies, but everything else is fix:
- 'Resource' == ExcelFormat.h
- 'Path' == /PierwszyEclipse/src
- 'Type' == C/C++ Problem.

And with that information you can setup an error parser, which analyzes these lines.

Although I don't have any knowledge about 'ExcelFormat.*', these warnings clearly indicates problems with that.

HTH.

Regards
Dirk


Best regards
Dirk

[Updated on: Mon, 11 March 2013 06:22]

Report message to a moderator

Previous Topic:downloading cdt
Next Topic:Unable to open a workspace
Goto Forum:
  


Current Time: Sat Apr 20 03:24:05 GMT 2024

Powered by FUDForum. Page generated in 0.04826 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top