My Vista Prob

Discussion about everything. New games, 3d math, development tips...
Halan
Posts: 447
Joined: Tue Oct 04, 2005 8:17 pm
Location: Germany, Freak City
Contact:

My Vista Prob

Post by Halan »

Hey,

its been a long time i used vista and tried it again today. well when using minGW i get alot of linking error with can mostly be solved by moving the needed file into the project directory but when trying to solve this problem i have no idea howto do it:

cannot find -lgcc

any ideas?

greets,
halan
Halan
Posts: 447
Joined: Tue Oct 04, 2005 8:17 pm
Location: Germany, Freak City
Contact:

Post by Halan »

i now tried visual studio express caus this compiler should work :lol:
but i get strange warning and the applicatiuon crashes, look here:

1>.\main.cpp(66) : warning C4996: 'fopen' was declared deprecated
1> C:\Program Files\Microsoft Visual Studio 8\VC\include\stdio.h(234) : see declaration of 'fopen'
1> Message: 'This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
zenaku
Posts: 212
Joined: Tue Jun 07, 2005 11:23 pm

Post by zenaku »

Halan wrote:i now tried visual studio express caus this compiler should work :lol:
but i get strange warning and the applicatiuon crashes, look here:

1>.\main.cpp(66) : warning C4996: 'fopen' was declared deprecated
1> C:\Program Files\Microsoft Visual Studio 8\VC\include\stdio.h(234) : see declaration of 'fopen'
1> Message: 'This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
Add _CRT_SECURE_NO_DEPRECATE to your project's preprocessor definitions.

FYI when using gcc, if you do something like -lgcc, it's actually looking for a file called libgcc.so, libgcc.a, or libgcc.lib depending on the architecture and build options.
-------------------------------------
IrrLua - a Lua binding for Irrlicht
http://irrlua.sourceforge.net/
Halan
Posts: 447
Joined: Tue Oct 04, 2005 8:17 pm
Location: Germany, Freak City
Contact:

Post by Halan »

ah thank you i just switched to visual studio so im a bit confused.. can you help me with this linker problem?
1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
1>Debug\DSAEditor.exe : fatal error LNK1120: 1 unresolved externals
greets,
halan
zenaku
Posts: 212
Joined: Tue Jun 07, 2005 11:23 pm

Post by zenaku »

Halan wrote:ah thank you i just switched to visual studio so im a bit confused.. can you help me with this linker problem?
1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
1>Debug\DSAEditor.exe : fatal error LNK1120: 1 unresolved externals
greets,
halan
You are trying to make a console application using a windows application project. It won't work.

Windows projects have WinMain(). Console projects have main() (or _tmain() whatevah).

The quick and dirty fix is to go into your project's compiler options and change the "/Subsystem=Windows" to "/Subsystem=Console". I forget the exact syntax, but you'll see what I mean in your project settings.

The best way to fix it is to make a new project as a console app instead of a windows app.
-------------------------------------
IrrLua - a Lua binding for Irrlicht
http://irrlua.sourceforge.net/
Halan
Posts: 447
Joined: Tue Oct 04, 2005 8:17 pm
Location: Germany, Freak City
Contact:

Post by Halan »

thank you :)

in dev-cpp the compiler doesnt care about it

greets,
halan

edit: it works fine thank you but im getting a warning and want to know if i should worry about it:
1>main.obj : warning LNK4210: .CRT section exists; there may be unhandled static initializers or terminators
1>Embedding manifest...
zenaku
Posts: 212
Joined: Tue Jun 07, 2005 11:23 pm

Post by zenaku »

Halan wrote:thank you :)

in dev-cpp the compiler doesnt care about it

greets,
halan

edit: it works fine thank you but im getting a warning and want to know if i should worry about it:
1>main.obj : warning LNK4210: .CRT section exists; there may be unhandled static initializers or terminators
1>Embedding manifest...
That's why changing the subsystem in the project is the 'quick and dirty' fix ;). You probably just need to do a full rebuild.

Instead of trying to convert the windows-app project to work as a console-app, I highly recommend remaking the windows-app project as a brand new console-app project. Trying to change the project type after the fact is like trying to modify auto-generated code. You just don't do it; you auto-generate new code instead. There may be other things you have to do besides set subsystem=console. It's better to let VisualStudio do that. You just picked the wrong project type from the start ;)
-------------------------------------
IrrLua - a Lua binding for Irrlicht
http://irrlua.sourceforge.net/
Halan
Posts: 447
Joined: Tue Oct 04, 2005 8:17 pm
Location: Germany, Freak City
Contact:

Post by Halan »

ah ok well i didnt chose anything at the beginning but just created an empty project.
Halan
Posts: 447
Joined: Tue Oct 04, 2005 8:17 pm
Location: Germany, Freak City
Contact:

Post by Halan »

i did now "create a new project from existing code" and choosed "windows application form" but the message still appears and it crashes at device creation...

what am i doing wrong?

edit: i also get this message maybe that helps you:
1>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/OPT:ICF' specification
greets,
halan
Halan
Posts: 447
Joined: Tue Oct 04, 2005 8:17 pm
Location: Germany, Freak City
Contact:

Post by Halan »

well i thought about trying code::blocks with the ms compiler. my question is do i have to use the odl mircosoft visual c++ toolkit 2003? or can i use the new one (visual studio express)? if not where can i find a setup for the 2003 toolkit? because ms did take it off from their site...

greets,
halan
jam
Posts: 409
Joined: Fri Nov 04, 2005 3:52 am

Post by jam »

The nightly builds of code::blocks can use the newer microsoft compiler. If you want to use the older visual C++ toolkit you can download it off this website. Link
system-independent, adj.:
Works equally poorly on all systems.
-- unknown
Halan
Posts: 447
Joined: Tue Oct 04, 2005 8:17 pm
Location: Germany, Freak City
Contact:

Post by Halan »

fantastic thank you
Halan
Posts: 447
Joined: Tue Oct 04, 2005 8:17 pm
Location: Germany, Freak City
Contact:

Post by Halan »

well some inlcude files where missing so i moved the missing ones to the visual c++ toolkit 2003 folder ( i didnt overwrite anything) but now i get a lot of error messages ...
Project : Editor
Compiler : Microsoft Visual C++ Toolkit 2003 (called directly)
Directory : C:\Users\Kai\Documents\DSA Game\BinEditor\
--------------------------------------------------------------------------------
Switching to target: default
main.cpp
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\winnt.h(3035) : warning C4103: 'c:\program files\microsoft visual c++ toolkit 2003\include\winnt.h' : used #pragma pack to change alignment
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\winnt.h(3327) : warning C4103: 'c:\program files\microsoft visual c++ toolkit 2003\include\winnt.h' : used #pragma pack to change alignment
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\winnt.h(3423) : warning C4068: unknown pragma
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\winnt.h(3428) : warning C4068: unknown pragma
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\winbase.h(1252) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\winbase.h(1252) : error C2501: 'DECLSPEC_NORETURN' : missing storage-class or type specifiers
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\winbase.h(1253) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\winbase.h(1253) : error C2501: 'DECLSPEC_NORETURN' : missing storage-class or type specifiers
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\winbase.h(1253) : error C2086: 'int DECLSPEC_NORETURN' : redefinition
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\winbase.h(1252) : see declaration of 'DECLSPEC_NORETURN'
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\winbase.h(1313) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\winbase.h(1313) : error C2501: 'DECLSPEC_NORETURN' : missing storage-class or type specifiers
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\winbase.h(1313) : error C2086: 'int DECLSPEC_NORETURN' : redefinition
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\winbase.h(1252) : see declaration of 'DECLSPEC_NORETURN'
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\rpcdce.h(366) : error C2144: syntax error : 'void' should be preceded by ';'
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\rpcdce.h(366) : error C2501: 'DECLSPEC_NORETURN' : missing storage-class or type specifiers
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\rpcdce.h(366) : error C2086: 'int DECLSPEC_NORETURN' : redefinition
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\winbase.h(1252) : see declaration of 'DECLSPEC_NORETURN'
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\rpcdcep.h(89) : error C2146: syntax error : missing ';' before identifier 'I_RpcAllocate'
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\shellapi.h(129) : warning C4103: 'c:\program files\microsoft visual c++ toolkit 2003\include\shellapi.h' : used #pragma pack to change alignment
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\shellapi.h(265) : warning C4103: 'c:\program files\microsoft visual c++ toolkit 2003\include\shellapi.h' : used #pragma pack to change alignment
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\winsock2.h(524) : error C2146: syntax error : missing ';' before identifier 'inet_ntoa'
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\winsock2.h(524) : error C2733: second C linkage of overloaded function 'DECLARE_STDCALL_P' not allowed
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\winsock2.h(524) : see declaration of 'DECLARE_STDCALL_P'
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\winsock2.h(533) : error C2146: syntax error : missing ';' before identifier 'gethostbyaddr'
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\winsock2.h(533) : error C2733: second C linkage of overloaded function 'DECLARE_STDCALL_P' not allowed
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\winsock2.h(533) : see declaration of 'DECLARE_STDCALL_P'
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\winsock2.h(534) : error C2146: syntax error : missing ';' before identifier 'gethostbyname'
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\winsock2.h(535) : error C2146: syntax error : missing ';' before identifier 'getservbyport'
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\winsock2.h(535) : error C2733: second C linkage of overloaded function 'DECLARE_STDCALL_P' not allowed
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\winsock2.h(535) : see declaration of 'DECLARE_STDCALL_P'
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\winsock2.h(536) : error C2146: syntax error : missing ';' before identifier 'getservbyname'
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\winsock2.h(537) : error C2146: syntax error : missing ';' before identifier 'getprotobynumber'
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\winsock2.h(537) : error C2733: second C linkage of overloaded function 'DECLARE_STDCALL_P' not allowed
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\winsock2.h(537) : see declaration of 'DECLARE_STDCALL_P'
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\winsock2.h(538) : error C2146: syntax error : missing ';' before identifier 'getprotobyname'
Process terminated with status 1 (0 minutes, 0 seconds)
23 errors, 6 warnings
what am i doing wrong?

greets,
halan
jam
Posts: 409
Joined: Fri Nov 04, 2005 3:52 am

Post by jam »

If I remember correctly you need the Platform SDK that you can get off Microsoft's site. It has all the needed windows header files.
system-independent, adj.:
Works equally poorly on all systems.
-- unknown
Halan
Posts: 447
Joined: Tue Oct 04, 2005 8:17 pm
Location: Germany, Freak City
Contact:

Post by Halan »

well im using the includes files included in the newes visual c++ express edition and it doesn work :(

greets,
halan
Post Reply