Error message:
Account.cpp:
This is highlighted:
otpch.h:
What is wrong? (its same for all .cpp files but I only wrote one) What do I need to do to fix it?
Code:
1>------ Build started: Project: otserv, Configuration: Release Win32 ------
1> account.cpp
1>..\..\account.cpp(20): fatal error C1083: Cannot open precompiled header file: 'Release\otserv.pch': No such file or directory
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Account.cpp:
Code:
//////////////////////////////////////////////////////////////////////
// OpenTibia - an opensource roleplaying game
//////////////////////////////////////////////////////////////////////
//
//////////////////////////////////////////////////////////////////////
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//////////////////////////////////////////////////////////////////////
#include "otpch.h"
#include <algorithm>
#include <functional>
#include <iostream>
#include "definitions.h"
#include "account.h"
Account::Account()
{
accnumber = 0;
premEnd = 0;
}
Account::~Account()
{
charList.clear();
}
uint16_t Account::getPremiumDaysLeft() const
{
uint32_t today = uint32_t(time(NULL) / 86400);
if(premEnd == (time_t)(-1))
return 0xFFFF;
if(uint32_t(premEnd / 86400) < today)
return 0;
if(uint32_t(premEnd / 86400) - today >= 0xFFFF)
return 0xFFFF;
return uint32_t(premEnd / 86400) - today;
}
This is highlighted:
Code:
#include "otpch.h"
otpch.h:
Code:
#ifdef __OTSERV_OTCP_H__
#error "Precompiled header should only be included once"
#endif
#define __OTSERV_OTCP_H__
//#undef __USE_OTPCH__
// Definitions should be global.
#include "definitions.h"
#ifdef __USE_OTPCH__
#ifdef __WINDOWS__
#include <winerror.h>
#endif
//libxml
#include <libxml/xmlmemory.h>
#include <libxml/parser.h>
#include <libxml/threads.h>
//boost
#include <boost/config.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/bind.hpp>
#include <boost/function.hpp>
#include <boost/tokenizer.hpp>
#include <boost/regex.hpp>
#include <boost/asio.hpp>
#include <boost/thread.hpp>
//std
#include <list>
#include <vector>
#include <map>
#include <string>
//lua
extern "C"
{
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
}
//otserv
#include "thing.h"
#endif
What is wrong? (its same for all .cpp files but I only wrote one) What do I need to do to fix it?
Last edited: