Author Topic: Problems with C++  (Read 3976 times)

Uh, I have no idea on how to solve a certain problem I've bumped into, could someone tell me here, what is wrong and how to solve this in the following log;

1>------ Build started: Project: md5, Configuration: Debug Win32 ------
1>  md5.cpp
1>c:\lolserver\herowars-master\dep\include\crypt\md5.h(36): fatal error C1083: Cannot open include file: 'string': No such file or directory
2>------ Build started: Project: authd, Configuration: Debug Win32 ------
2>  WinSocket.cpp
2>c:\lolserver\herowars-master\authd\stdafx.h(34): fatal error C1083: Cannot open include file: 'memory': No such file or directory
2>  Settings.cpp
2>c:\lolserver\herowars-master\authd\stdafx.h(34): fatal error C1083: Cannot open include file: 'memory': No such file or directory
2>  PostgreSQL.cpp
2>c:\lolserver\herowars-master\authd\stdafx.h(34): fatal error C1083: Cannot open include file: 'memory': No such file or directory
2>  Packets.cpp
2>c:\lolserver\herowars-master\authd\stdafx.h(34): fatal error C1083: Cannot open include file: 'memory': No such file or directory
2>  PacketHandler.cpp
2>c:\lolserver\herowars-master\authd\stdafx.h(34): fatal error C1083: Cannot open include file: 'memory': No such file or directory
2>  MySQL.cpp
2>c:\lolserver\herowars-master\authd\stdafx.h(34): fatal error C1083: Cannot open include file: 'memory': No such file or directory
2>  Main.cpp
2>c:\lolserver\herowars-master\authd\stdafx.h(34): fatal error C1083: Cannot open include file: 'memory': No such file or directory
2>  Log.cpp
2>c:\lolserver\herowars-master\authd\stdafx.h(34): fatal error C1083: Cannot open include file: 'memory': No such file or directory
2>  Crypt.cpp
2>c:\lolserver\herowars-master\authd\stdafx.h(34): fatal error C1083: Cannot open include file: 'memory': No such file or directory
2>  AuthHandler.cpp
2>c:\lolserver\herowars-master\authd\stdafx.h(34): fatal error C1083: Cannot open include file: 'memory': No such file or directory
========== Build: 0 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========


Any ideas?
The stdafx.h has both;

#include <string>
#include <memory>

But still this error?

Remove the line that says #include <memory>

I didn't realize you were compiling someone else's code. Nevermind. One moment.

Okay, so I have no idea why you're getting this error. The thing that comes to mind is that the project may be misconfigured and it may be looking for the memory header elsewhere and not finding it. This problem appears to be unique to you, though (just this topic and the one you posted over at ac-web.org) so I don't know how much help you'll get. I'd recommend recloning the repo and trying again, be sure you're using the latest project file (VC100) unless you're running VC 9 in which case you probably need to upgrade anyway.
« Last Edit: February 05, 2014, 11:44:09 AM by $trinick »

Remove the line that says #include <memory>

I didn't realize you were compiling someone else's code. Nevermind. One moment.

Okay, so I have no idea why you're getting this error. The thing that comes to mind is that the project may be misconfigured and it may be looking for the memory header elsewhere and not finding it. This problem appears to be unique to you, though (just this topic and the one you posted over at ac-web.org) so I don't know how much help you'll get. I'd recommend recloning the repo and trying again, be sure you're using the latest project file (VC100) unless you're running VC 9 in which case you probably need to upgrade anyway.

I am using Visual Stuido 2010 Ultimate.
The file is a VC100.

Not my files, I have no experience of C++ what so ever hahah. D:

I have no experience of C++ what so ever hahah. D:
Start simple first.  :nes:


How 'bout no
How will you learn if you just keep getting others to do it for you?

How will you learn if you just keep getting others to do it for you?

Because it seems like a very small problem?

I am not wanting to learn C++ for something that I am going to do ONE time.


I am using Visual Stuido 2010 Ultimate.
The file is a VC100.

Not my files, I have no experience of C++ what so ever hahah. D:
Was the code you're using made for Visual Studio? Because I know that Visual studio has applied a different syntax than traditional C++.

The thing is, that I am missing some kind of library or something, but have no idea where to get it or how to fix it.

That is why I ask others, so that I don't have to learn a whole new language just to know how to add a library with <string, <memory> and such.

Was the code you're using made for Visual Studio? Because I know that Visual studio has applied a different syntax than traditional C++.
Really?

He told me I could use Visual Stuido 2010 for this

THUREEPLU POAST

I really need help with this, could anyone link me a pre-compiled library?

Well, try putting

#include "stdafx.h"
#include <string>
#include <memory

At the top.

Well, try putting

#include "stdafx.h"
#include <string>
#include <memory

At the top.

Where?
All the files that are listed there?

Was the code you're using made for Visual Studio? Because I know that Visual studio has applied a different syntax than traditional C++.
what the hell are you talking about

try compiling with visual studio 2012.

if i recall correctly visual studio 2010 lacks certain C++11 features, such as memory.h
« Last Edit: February 05, 2014, 06:01:18 PM by Kaphonaits² »