News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Problem with strsafe.h on settings

Started by mythcat, December 22, 2010, 07:38:53 PM

Previous topic - Next topic

mythcat

Hi

I try using DirectX template from C::B , but C::B not find "strsafe.h".
I use Code::Blocks with mingw32 10.05 .
What i make wrong ?

Thank you.

MortenMacFly

Quote from: mythcat on December 22, 2010, 07:38:53 PM
I try using DirectX template from C::B , but C::B not find "strsafe.h".
http://lmgtfy.com/?q=strsafe.h

...reveals in the first link:
"Strsafe.h is available in the Windows SDK starting with Windows XP with Service Pack 2 (SP2)."
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

mythcat

#2
Yes I've found .
QuoteYou should also note that Windows SDK[8] shall be installed in order to compile Windows app.
I download it from here: http://www.microsoft.com/downloads/details.aspx?FamilyID=e6e1c3df-a74f-4207-8586-711ebe331cdc&DisplayLang=en
But I got this error :

-------------- Build: Debug in testDX9 ---------------

cl : Command line warning D9002 : ignoring unknown option '-g'
cl : Command line warning D9002 : ignoring unknown option '-ggdb'
cl : Command line warning D9024 : unrecognized source file type 'Files\Microsoft', object file assumed
cl : Command line warning D9024 : unrecognized source file type 'Visual', object file assumed
cl : Command line warning D9024 : unrecognized source file type 'Studio', object file assumed
LINK : fatal error LNK1181: cannot open input file 'Files\Microsoft.obj'
Process terminated with status 2 (0 minutes, 0 seconds)
1 errors, 0 warnings

I think C::B not see the compiler from Microsoft SDK ... and this is from Visual Studio
How i set it ?

stahta01

Set default compiler to the correct Compiler; not MinGW GCC if you wish to use MS Visual Studio!
Re-do the project from template using the correct Compile; do NOT pick MinGW GCC if you wish to use MS Visual Studio!

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

mythcat

I try use Compiler from MS SDK , not  MS Visual Studio.
But C::B not see MS SDK compiler, if it is on \Bin.
My path is something like this :
C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin
Maybe correct way is to install MS SDK and next install C::B.
I think is more easy if C::B come with some default settings for each compiler.
Maybe some tutorials is need to understand how is corect way to set up C::B.
Is good to be fully custom , but become dizzy with new users like me.
Thank you .
Regards.


mythcat

I  solve the problem with add "#include <cstddef>" and remove "strsafe.h"
I  set SDK 2008 and Windows SDK v6.0.
I  set on Toolchain "C:\Program Files\CodeBlocks\MinGW" (seam Auto-detect want this path) .
On tabs "Program Files" and "aditional.." from toolchain is set correct "mingw32-g++.exe" path .
Now i got this error :
mingw32-g++.exe: CreateProcess: No such file or directory
Process terminated with status 1 (0 minutes, 4 seconds)
0 errors, 2 warnings

...and C::B not make the exe file.
What is wrong ?
Thank you . Regards.


stahta01

#6
The message you got normally means an improper MinGW GCC Installation.
It could be an improper CB Configuration of the Compiler.

NOTE: You CAN NOT use MinGW GCC with MS SDK and have it Work!!

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

mythcat

QuoteNOTE: You CAN NOT use MinGW GCC with MS SDK and have it Work!!
Can you tell me more ? I think more people thinking is working ...