• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Visual C++

Natrov

New Member
Joined
Dec 14, 2013
Messages
72
Reaction score
2
Witam,
dopiero zaczynam przygodę z kompilowaniem silników TFS.
Podczas kompilacji wyświetla się błąd:
Code:
c:\documents and settings\piotrek\pulpit\trunk.r5885_86\otpch.h(29): fatal error C1083: Cannot open include file: 'libxml/xmlmemory.h': No such file or directory
Wie ktoś co jest jego przyczyną? Czytałem coś o bibliotekach, lecz nie wiem gdzie co i jak wkleić... ;/
Zna się ktoś na tym? ;)))
 
Niby zrobiłem, ale teraz błąd:
Code:
1>------ Rebuild All started: Project: TFS, Configuration: Debug Win32 ------
1>Build started 2013-12-19 17:25:00.
1>_PrepareForClean:
1>  Deleting file "Debug\TFS.lastbuildstate".
1>InitializeBuildStatus:
1>  Touching "Debug\TFS.unsuccessfulbuild".
1>ClCompile:
1>  weapons.cpp
1>  waitlist.cpp
1>  vocation.cpp
1>  trashholder.cpp
1>  tools.cpp
1>  tile.cpp
1>  thing.cpp
1>  textlogger.cpp
1>  teleport.cpp
1>  talkaction.cpp
1>  status.cpp
1>  spells.cpp
1>  spawn.cpp
1>  server.cpp
1>  scriptmanager.cpp
1>c:\documents and settings\piotrek\pulpit\trunk.r5885_86\scriptmanager.cpp(146): error C2039: 'string' : is not a member of 'std::basic_string<_Elem,_Traits,_Ax>'
1>          with
1>          [
1>              _Elem=char,
1>              _Traits=std::char_traits<char>,
1>              _Ax=std::allocator<char>
1>          ]
1>  scheduler.cpp
1>  raids.cpp
1>  quests.cpp
1>  protocolold.cpp
1>  protocollogin.cpp
1>  Generating Code...
1>  Compiling...
1>  protocolhttp.cpp
1>  protocolgame.cpp
1>  protocol.cpp
1>  position.cpp
1>  player.cpp
1>  party.cpp
1>  outputmessage.cpp
1>  outfit.cpp
1>  otserv.cpp
1>c:\documents and settings\piotrek\pulpit\trunk.r5885_86\otserv.cpp(343): error C2664: 'SetConsoleTitleW' : cannot convert parameter 1 from 'const char [21]' to 'LPCWSTR'
1>          Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\documents and settings\piotrek\pulpit\trunk.r5885_86\otserv.cpp(446): error C2664: 'CreateMutexW' : cannot convert parameter 3 from 'const char *' to 'LPCWSTR'
1>          Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>  otpch.cpp
1>  npc.cpp
1>  networkmessage.cpp
1>  movement.cpp
1>  monsters.cpp
Wie ktoś jak to rozwiązać? :)
 
a moze tak caly blad, bo "is not a member of" mowi tyle co nic, member of std?

#edit
wczesniej wkleiles ledwie jedna linijke i to nie cala... wiec nie rob ze mnie wariata subzero
 
Last edited:
No to cały błąd; należy dolnym suwakiem przesunąć w prawo... :)

#edit
No wkleiłem wtedy jedną linijkę, ale po 2 min zamieniłem. Nie wiedziałem, że widziałeś tamtą wklejkę:D SRY ;(
 
Last edited:
w headers, w pliku otsystem.h (chyba) na końcu gdzieś powineneś mieć linijkę kończącą się na .string() <--- usuń to i spróbuj jeszcze raz
 
Aktualizacja BOSTA wyeliminowała błąd ze stringiem, lecz pozostaje
Code:
1>c:\documents and settings\piotrek\pulpit\trunk.r5885_86\otserv.cpp(343): error C2664: 'SetConsoleTitleW' : cannot convert parameter 1 from 'const char [21]' to 'LPCWSTR'
1>          Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\documents and settings\piotrek\pulpit\trunk.r5885_86\otserv.cpp(446): error C2664: 'CreateMutexW' : cannot convert parameter 3 from 'const char *' to 'LPCWSTR'
1>          Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>  otpch.cpp

##EDIT
Pozostał tylko błąd:
Code:
1>c:\documents and settings\piotrek\pulpit\trunk.r5885_86\otserv.cpp(446): error C2664: 'CreateMutexW' : cannot convert parameter 3 from 'const char *' to 'LPCWSTR'
1>          Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>  otpch.cpp

##EDIT
Z pierwszym błędem poradziłem sobie tak: Zamieniłem
SetConsoleTitle(SOFTWARE_NAME);
na
SetConsoleTitle(TEXT(SOFTWARE_NAME));
 
Last edited:
A jak poradziłeś sobie z tym pierwszym? wyglądają prawie identycznie. Może analogicznie poradzimy sobie tak samo z tym.
 
Pozbyłem się wszystkich błędów, lecz na sam koniec kompilacji wywala:
Code:
1>------ Build started: Project: OTS, Configuration: Debug Win32 ------
1>libboost_regex-vc100-mt-gd-1_44.lib(w32_regex_traits.obj) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 
Last edited:
Back
Top