.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > General Programming
General Programming Help others and get yourself helped here!

Reply
 
Thread Tools
visual C++ 6.0 metamod compile question
Old
  (#1)
cruft
Guest
 
Status:
Posts: n/a
Default visual C++ 6.0 metamod compile question - 28-02-2004

Does anyone have step-by-step instructions on how to setup visual c++ 6.0 to compile a metamod dll? I've been playing with it for while without any luck. The problem isn't compiling. I'm able to compile the dll without any errors. The problem is that metamod doesn't load the resulting dll.

I should also mention that I've been compiling the same source with the free borland c++ compiler without any metamod loading issues. For the borland compile, I have to use a .def file for it to work correctly. I also tried a .def file with visual c++ and didn't have any luck there either.
  
Reply With Quote
Re: visual C++ 6.0 metamod compile question
Old
  (#2)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: visual C++ 6.0 metamod compile question - 28-02-2004

Strange...
Is it really your compiler's configuration ?
I assume you're talking about compiling metamod plugins, not metamod itself.
Have you tried recompiling a metamod plugin of which you have the source code ?



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: visual C++ 6.0 metamod compile question
Old
  (#3)
Austin
Moderator
 
Austin's Avatar
 
Status: Offline
Posts: 403
Join Date: Nov 2003
Default Re: visual C++ 6.0 metamod compile question - 29-02-2004

You for sure need a def file or Metamod will not load the dll since the dll will not have any exports.

Here is an example Metamod def file of mine "hostageFix.def"

LIBRARY hostageFix_mm
EXPORTS
GiveFnptrsToDll @1
SECTIONS
.data READ WRITE

For Vc 6.0 you will also need a /def:"hostageFix.def"
in the link options in the project settings.

I had this exact same problem the first time I tried to make a mm dll.

If you still can't get it working download this small mm project to see how everything is set up. You will obviously have to change the include paths in this project. All it does is keep hostages from taking damage to fix the pod bot 2.5 crash.

http://austinbots.com/hostagefixsource.zip

It has project files for both VC60 and VC.NET
It also shows a nice organized way is setting up a Metamod project separating your functions from the Metamod required stuff and correctly using a common include file. This MIGHT be a little over kill for a tiny project but it really help on larger projects.

This project also shows you how to add a VERSION RESOURCE to your dll so you can right click it, do a properties, go to version and see what version it is!

HELLO!
Any BOT authors listening?
VERSION STAMP YOUR DLLS!
WHAT A NOVEL IDEA!

Last edited by Austin; 29-02-2004 at 11:49..
  
Reply With Quote
Re: visual C++ 6.0 metamod compile question
Old
  (#4)
cruft
Guest
 
Status:
Posts: n/a
Default Re: visual C++ 6.0 metamod compile question - 29-02-2004

Thanks for the tips. There were 2 problems that prevented me from getting a metamod loadable .dll 1) my .def file was incorrect - I was using the .def file from my borland c++ compile and it's different for visual c++, and 2) I needed to add the /def option you mentioned for the .def file to take effect. End result is now metmod loads the .dll. !!
  
Reply With Quote
Re: visual C++ 6.0 metamod compile question
Old
  (#5)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: visual C++ 6.0 metamod compile question - 01-03-2004

Quote:
Originally Posted by Austin
HELLO!
Any BOT authors listening?
VERSION STAMP YOUR DLLS!
WHAT A NOVEL IDEA!
I hear you Austin, I hear you
However this win32-specific version stuff does not suit the version convention scheme I'd like to use. I version stamp most of my files under the form YYYYMMDD[-b] for year, month, day and (optionally) build, such as "version 20040229-2", which tells me the file was the second release built on february 29, 2004. Windows, on the other hand, wants me to version stamp my files like "1.0.0.1" or so. It doesn't represent anything for me...

If you tell me I can keep my version convention scheme with the Windows version stamp resource, I'll add this version stamp resource right away to all of my projects, I swear !



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: visual C++ 6.0 metamod compile question
Old
  (#6)
Austin
Moderator
 
Austin's Avatar
 
Status: Offline
Posts: 403
Join Date: Nov 2003
Default Re: visual C++ 6.0 metamod compile question - 01-03-2004

Quote:
Originally Posted by Pierre-Marie Baty
I hear you Austin, I hear you
However this win32-specific version stuff does not suit the version convention scheme I'd like to use. I version stamp most of my files under the form YYYYMMDD[-b] for year, month, day and (optionally) build, such as "version 20040229-2", which tells me the file was the second release built on february 29, 2004. Windows, on the other hand, wants me to version stamp my files like "1.0.0.1" or so. It doesn't represent anything for me...

If you tell me I can keep my version convention scheme with the Windows version stamp resource, I'll add this version stamp resource right away to all of my projects, I swear !
PM, I woudl say this fits in almost exactly with what you described.



The only downside is you can't have leading 0's,
otherwise it is exactly what you wanted but with "."

AND you COULD use the file and product version anyway you want to since it is free text.

I agree the version resource, like SOOO MANNY things was totally duffed by
the V-O-L-E. (the inq.'s (http://www.theinquirer.net) pet name for MS. Look up vole at dictionary.com! ahaha! )

Yes, tell me why few if any ms executables follow this 1.1.1.1 ridiculous scheme, but their development tools seem to force this on us.


BUT, I believe ANY version stamping is better than NONE even 1.1.1.1.

I believe totally in the simple major.minor version scheme.
This is easy for the end users to deal with, the whole point.
The version isn't for developers. We should have build numbers internally that we use.


For a professional product you SHOULDN'T have a bunch of releases!
(Steam for example. What a mess... sorry to say…)
  
Reply With Quote
Re: visual C++ 6.0 metamod compile question
Old
  (#7)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: visual C++ 6.0 metamod compile question - 01-03-2004

Thanks a lot for the info !

Do you know if it is possible to have these resource strings reference variables ?
So far I use a function which generates the file version number at startup from the __DATE__ preprocessor macro and puts it in a string. I'd like this string to be tied at run-time to the FileVersion resource string if this is possible. Do you have an idea ?



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: visual C++ 6.0 metamod compile question
Old
  (#8)
Austin
Moderator
 
Austin's Avatar
 
Status: Offline
Posts: 403
Join Date: Nov 2003
Default Re: visual C++ 6.0 metamod compile question - 01-03-2004

You can hack the .rc file directly.
VC doesn't load it until you open it in the resource editor.
So you could write a script that opens it, writes out the new version when your project is opened.

I saw an example on how to implement an auto build version incrementor at either
http://www.devguru.com
or
http://www.codeguru.com
a long time ago..

Last edited by Austin; 01-03-2004 at 11:47..
  
Reply With Quote
Re: visual C++ 6.0 metamod compile question
Old
  (#9)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: visual C++ 6.0 metamod compile question - 02-03-2004

missed!
it's http://www.codeproject.com


http://www.codeproject.com/macro/autobuild.asp
thanks anyway



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: visual C++ 6.0 metamod compile question
Old
  (#10)
Austin
Moderator
 
Austin's Avatar
 
Status: Offline
Posts: 403
Join Date: Nov 2003
Default Re: visual C++ 6.0 metamod compile question - 02-03-2004

I forgot about codeproject.
I have been looking at that site. Nice site.
Nice method for auto build numbers.
I think I will start using it, thanks!
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com