Author Topic: Visual C++ 4k settings?  (Read 11074 times)

0 Members and 1 Guest are viewing this topic.

Offline taj

  • Bytes hurt
  • DBF Aficionado
  • ******
  • Posts: 4810
  • Karma: 189
  • Scene there, done that.
    • View Profile
Re: Visual C++ 4k settings?
« Reply #20 on: November 19, 2006 »
Quote
I really recommend for people who want install VC++2005 to follow this link, step by step, to avoid such problems:
http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/

Yeah I did that, it didnt work...I had to do what I said as well..
Challenge Trophies Won:

Offline taj

  • Bytes hurt
  • DBF Aficionado
  • ******
  • Posts: 4810
  • Karma: 189
  • Scene there, done that.
    • View Profile
Re: Visual C++ 4k settings?
« Reply #21 on: November 19, 2006 »
Quote
Well, I found one issue about VC++2005 framework, msvcrt.lib and msvcrtd.lib they call respectively those dlls - msvcrt80.dll and msvcrt80d.dll
to get rid about that I've included an old msvcrt.lib (from VC++6.0) and renamed it to msvcrts.lib ( s=standard), this library call the standard msvcrt.dll present in all windows platform (I guess), anyway I've tested it with Windows98 and WinXP and it works fine.

Download the updated framework here --> http://www.rbraz.com/source/1K_FrameWork_VC2005.zip
There's a little readme.txt file included to help you install the file msvcrts.lib

I dont understand - are you saying that people have to install a dll to run the file at 4k? If so, it doubt it will be accepted as 4k at any compo. I had a similar problem yesterday wjhen I tried to add a call to ZeroMemory which began looking for msvcrt80d.dll. In the end I just avoided the call - so I'm sure this will bite me in the future but not yet. Incidentally Im using your settings to try and get D3D and OGL up and running and talking to each other so I can use functions from either set of libraries. I managed yesterday to have d3d and opengl up and running in 490 bytes. Though only ogl was drawing, d3d was just intialised. Nontheless, its an exciting idea because d3dx offers lots of useful routines (say like finding the normals on a mesh). From GCC this is a real pain in the arse and not worth trying to do IMO.

Challenge Trophies Won:

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2750
  • Karma: 493
    • View Profile
    • http://www.rbraz.com/
Re: Visual C++ 4k settings?
« Reply #22 on: November 19, 2006 »
Quote
I dont understand - are you saying that people have to install a dll to run the file at 4k?

Yes, but you will be able to get rid about that, just use the standard msvcrts.lib that I've included in the new package, any problems, let me know...
Challenge Trophies Won:

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2750
  • Karma: 493
    • View Profile
    • http://www.rbraz.com/
Re: Visual C++ 4k settings?
« Reply #23 on: November 19, 2006 »
Quote
Nontheless, its an exciting idea because d3dx offers lots of useful routines (say like finding the normals on a mesh)

@taj: Where I can found more info about that, I would like to know what I can do with directx 9...
Challenge Trophies Won:

Offline taj

  • Bytes hurt
  • DBF Aficionado
  • ******
  • Posts: 4810
  • Karma: 189
  • Scene there, done that.
    • View Profile
Re: Visual C++ 4k settings?
« Reply #24 on: November 19, 2006 »
Quote
Nontheless, its an exciting idea because d3dx offers lots of useful routines (say like finding the normals on a mesh)

@taj: Where I can found more info about that, I would like to know what I can do with directx 9...

Honestly I started last week, but the thing that got me excited was d3dx so go to www.msdn.com and search for d3dx...look at the mesh stuff for a start. Its how loonies/fairlight are doing their 4ks right now, a few calls into d3dx (meshes and precomputed radiance transfer (ie ambient occlusion for free) and a kicking synth (diectsound :-). Basically they have huge advantages over us OGL guys so I'm trying to even the odds a little.

For the last few years the winning 4ks at breakpoint are basically calls to d3d and not a lot else...

You could also start here:
http://msdn2.microsoft.com/en-us/library/ms810495.aspx
« Last Edit: November 19, 2006 by taj »
Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: Visual C++ 4k settings?
« Reply #25 on: November 19, 2006 »
If you can use d3d9.dll and opengl32.dll, what would be the problem with using msvcrt.dll?  As long as it's part of a modern XP SP2 install it would be OK, right?

Jim
Challenge Trophies Won:

Offline taj

  • Bytes hurt
  • DBF Aficionado
  • ******
  • Posts: 4810
  • Karma: 189
  • Scene there, done that.
    • View Profile
Re: Visual C++ 4k settings?
« Reply #26 on: November 19, 2006 »
If you can use d3d9.dll and opengl32.dll, what would be the problem with using msvcrt.dll?  As long as it's part of a modern XP SP2 install it would be OK, right?
Jim

Nothing at all, but it seemed Rbraz was delivering a dll with his stuff for it to work...whcih you cant do...Rbraz can you be a bit clearer? Why are you renaming a file and shipping it?
Challenge Trophies Won:

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2750
  • Karma: 493
    • View Profile
    • http://www.rbraz.com/
Re: Visual C++ 4k settings?
« Reply #27 on: November 20, 2006 »
If you can use d3d9.dll and opengl32.dll, what would be the problem with using msvcrt.dll?  As long as it's part of a modern XP SP2 install it would be OK, right?

Jim


That's what I'm trying to do, how can I access msvcrt.dll using VC++ 2005 ? If I compile with msvcrt.lib it still calling msvcrt80.dll, so, my fix for this was to compile with an old msvcrt.lib file from Visual C++ 6.0, just renamed it to msvcrts.lib and using with that framework.
I did this because most of people don't have msvcrt80.dll installed on their PC.


Quote
Nothing at all, but it seemed Rbraz was delivering a dll with his stuff for it to work...whcih you cant do...Rbraz can you be a bit clearer? Why are you renaming a file and shipping it?

I just renamed that old library file to avoid conflicts with the new msvcrt.lib installed (I don't want to delete it!)  with your VC++2005, in the end this is just my way to call the standard msvcrt.dll found in every Windows incarnation.


If someone have another way to do that let me know...


Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: Visual C++ 4k settings?
« Reply #28 on: November 20, 2006 »
I guess in the Project Linker options,
Linker, Input, Ignore Specific Library,
you need to add msvcrt??.lib
otherwise it will always use it.
Then put the old .lib of your choice in your project folder and add it to
Additional Dependencies
and in to your library path.

There's a huge gotcha doing that though - if the standard C headers have changed in any way (for instance, say someone changed FILE or time_t or something, which does happen) then the old runtime library may not work with code generated by the new compiler.  You might get linker errors (missing symbols) or you might get runtime errors or crashes.

Another possibility is to LoadLibrary your desired runtime yourself and GetProcAddress the C runtime library functions you want.  That's subject to the same gotcha...

Jim
Challenge Trophies Won:

Offline taj

  • Bytes hurt
  • DBF Aficionado
  • ******
  • Posts: 4810
  • Karma: 189
  • Scene there, done that.
    • View Profile
Re: Visual C++ 4k settings?
« Reply #29 on: December 28, 2006 »
BTW Rbraz, in the end I got the framework working without the extra lib. I've forgotten what I did though, so I'll package a copy and you can have a look.

Also I got it working with D3D and Opengl both initialised in less than 500 bytes. Meaning the Dx maths stuff can be used with opengl in 1k or 4k. I'm not willing to release this in a public forum but anyone from this forum who wants a copy of the code can have it.
Challenge Trophies Won:

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2750
  • Karma: 493
    • View Profile
    • http://www.rbraz.com/
Re: Visual C++ 4k settings?
« Reply #30 on: December 29, 2006 »
Quote
BTW Rbraz, in the end I got the framework working without the extra lib. I've forgotten what I did though, so I'll package a copy and you can have a look.

Cool, if you don't mind, send it to me (or attach it) and I'll update it on my site.
Challenge Trophies Won: