Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Building foo_ape (Read 3370 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Building foo_ape

I'm trying to make a small modification to the foo_ape component (to make error messages more informative), but I'm having trouble even building the component "out of the box".

I'm not at all experienced with VC++ (I use normally Borland C++), but since the SDK comes pre-configured with a VC++ workspace, I figured that it would be simplest to use VC++. I've got as far as adding the Monkey's SDK so that things will compile, but getting the DLL linked has me stumped.

First attempt to link came up with an undefined external (_CreateIAPEDecompressEx@8). So I added Monkey's MACLib.lib to the foo_ape project and tried again. This time I get lots of duplicate definitions (as far as I can tell, MSVCRTD and LIBCMT are squabbling), plus some more undefined externals, this time to __ftol2

Can anyone tell me:
(a) how to configure VC++ to fix the conflict between MSVCRTD and LIBCMT? (VC++ tells me to use "/NODEFAULTLIB:library", but where do I set this?)
(b) what library contains __ftol2?

Thanks

Building foo_ape

Reply #1
Quote
(a) how to configure VC++ to fix the conflict between MSVCRTD and LIBCMT? (VC++ tells me to use "/NODEFAULTLIB:library", but where do I set this?)[a href="index.php?act=findpost&pid=282435"][{POST_SNAPBACK}][/a]
Open the project properties of the MACLib project, go to C++/Code Generation and set the runtime option to Multithreaded DLL (or the debug version thereof for the debug configuration).

 

Building foo_ape

Reply #2
Quote
Quote
(a) how to configure VC++ to fix the conflict between MSVCRTD and LIBCMT? (VC++ tells me to use "/NODEFAULTLIB:library", but where do I set this?)[a href="index.php?act=findpost&pid=282435"][{POST_SNAPBACK}][/a]
Open the project properties of the MACLib project, go to C++/Code Generation and set the runtime option to Multithreaded DLL (or the debug version thereof for the debug configuration).
[a href="index.php?act=findpost&pid=282646"][{POST_SNAPBACK}][/a]

Thanks for the advice. I had already checked that, and it was already set. I did eventually figure out how to add it as an extra option on the linker command, and that did the trick (leaving me with just the __ftol2 issue).

After a bit of grubbing around in Google Groups, it seems that __ftol2 is something that gets used when building in VC7 (I was using VC6). Looks as if the Monkey's SDK may be built with VC7. So I installed C++ from .NET and was then able to build the DLL. I've been able to do my minor update and it seems to be working OK. I'll do a bit more testing and then upload the amended foo_ape.dll in case anyone else would like it.