Hi Chilli,
I am totally stuck on this. Well not on the program. I am doing well with that, but what I am stuck on is why it won't compile in DEBUG mode.
I am actually working on my new font routine. This one differs from yours in the fact that it does NON fixed width fonts. I will eventually add the other option too.
Anyway my program is coming on well. It does what it says on the tin. It puts my text on the screen. It's not quite finished yet.
Now the problem is this. It compiles in RELEASE mode but not in DEBUG mode. I like debug mode because it is the best when I need to DEBUG LOL.
I only have to add these three lines and it will not compile
#include <string>
using namespace std;
string text("Chilli");
That is just an example, but I will attach my code for you to see.
I put the include and the namespace in FontLoader.h and the string functions are in Fontloader.cpp.
I hope you can see why it won't compile cos it is damn annoying LOL.
Asimov
#include <string> Won't compile in DEBUG mode
#include <string> Won't compile in DEBUG mode
- Attachments
-
- Font.zip
- (2.64 MiB) Downloaded 144 times
----> Asimov
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk
Re: #include <string> Won't compile in DEBUG mode
Both compile fine for me bro.
Try compiling debug from your cleaned version.
Try compiling debug from your cleaned version.
Chili
Re: #include <string> Won't compile in DEBUG mode
Hi Chilli,
Everytime I try to compile in DEBUG mode I get the following error
1>libcpmtd.lib(stdthrow.obj) : error LNK2019: unresolved external symbol __CrtDbgReportW referenced in function "void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)" (?_Debug_message@std@@YAXPB_W0I@Z)
1>C:\Users\Thomas R Williams\Desktop\Font\Debug\Chili DirectX Framework.exe : fatal error LNK1120: 1 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:08.86
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I didn't post the error last night as I was sure you would get the same error. I am going mad as I can see nothing wrong with my code, and it works in RELEASE mode
I also did as you suggested and tried to compile in DEBUG after cleaning the files as well.
Asimov
Everytime I try to compile in DEBUG mode I get the following error
1>libcpmtd.lib(stdthrow.obj) : error LNK2019: unresolved external symbol __CrtDbgReportW referenced in function "void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)" (?_Debug_message@std@@YAXPB_W0I@Z)
1>C:\Users\Thomas R Williams\Desktop\Font\Debug\Chili DirectX Framework.exe : fatal error LNK1120: 1 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:08.86
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I didn't post the error last night as I was sure you would get the same error. I am going mad as I can see nothing wrong with my code, and it works in RELEASE mode
I also did as you suggested and tried to compile in DEBUG after cleaning the files as well.
Asimov
----> Asimov
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk
Re: #include <string> Won't compile in DEBUG mode
Hi Chilli,
I solved the problem by changing the linker settings, which is strange.
In both the RELEASE version and the DEBUG version the runtime library was set to
Multithreaded (/MT)
Anyway in the DEBUG version I changed this to Multithreaded (/Mtd) and then it compiled fine.
I am afraid the linker and all the stuff in there is a bit of a mystery to me. I just changed it on the offchance and it worked.
I wonder why my file worked for you though. I thought the stuff in properties was dependant on the file loaded in.
Asimov
I solved the problem by changing the linker settings, which is strange.
In both the RELEASE version and the DEBUG version the runtime library was set to
Multithreaded (/MT)
Anyway in the DEBUG version I changed this to Multithreaded (/Mtd) and then it compiled fine.
I am afraid the linker and all the stuff in there is a bit of a mystery to me. I just changed it on the offchance and it worked.
I wonder why my file worked for you though. I thought the stuff in properties was dependant on the file loaded in.
Asimov
----> Asimov
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk
Re: #include <string> Won't compile in DEBUG mode
I was thinking the same thing. First I thought you might have different linker/code generation setting for debug and release. But then I thought that if that were the case, it shouldn't work for me either. Strange stuff, but at least you're settled now.
Chili