Jump to content

Recommended Posts

Hey, 

 

I have a problem when Compiling

 

its works Compile with Visual Studio 2012 and befor works in Freebsd now in my new Server i get this problem

/usr/home/mt2/server/src/db/src # gmake
gmake: Warning: File 'Makefile' has modification time 6.3 s in the future
compile Config.cpp
Config.cpp:154:2: warning: identifier 'decltype' is a keyword in C++11 [-Wc++0x-compat]
  itertype(m_valueMap) i = m_valueMap.find(key);
  ^
In file included from stdafx.h:17:0,
                 from Config.cpp:1:
Config.cpp: In member function 'std::string* CConfig::Search(const char*)':
../../common/stl.h:16:41: error: 'decltype' was not declared in this scope
 #define itertype(v) decltype((v).begin())
                                         ^
Config.cpp:154:2: note: in expansion of macro 'itertype'
  itertype(m_valueMap) i = m_valueMap.find(key);
  ^
Config.cpp:154:23: error: expected ';' before 'i'
  itertype(m_valueMap) i = m_valueMap.find(key);
                       ^
Config.cpp:156:6: error: 'i' was not declared in this scope
  if (i == m_valueMap.end())
      ^
Config.cpp:160:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
Makefile:58: recipe for target '.obj/Config.o' failed
gmake: *** [.obj/Config.o] Error 1

Link to comment
https://metin2.dev/topic/5651-error-compile-source-gcc48/
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Add -std=c++11 to your CFLAGS in the Makefile.

If you're using the default Makefile, replace

ifeq ($(GCC_VERSION), 4)
CFLAGS += -mtune=i686 -fstack-protector-all -std=c++11
else
CFLAGS += -mcpu=i686
endif
with

CFLAGS += -mtune=i686 -fstack-protector-all -std=c++11
Link to comment
https://metin2.dev/topic/5651-error-compile-source-gcc48/#findComment-35778
Share on other sites

  • 8 months later...

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.