Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


not using default libraries (visual c 6)

This topic is 5601 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, for reasons that you dont want to worry about, I want to compile a program without the default libraries. Needless to say, when I do this I get a whole stack of errors. I cant seem to get anything working when I replace the functions, and I have gotten stuck on one function, which I am not too sure as to what it does. So, can anyone tell me if something is wrong with this:
//fix #1 - fltused

#if defined (__cplusplus) 
extern "C" {
int _fltused;
#if defined (__cplusplus) 

//fix #2 - calloc

#include <windows.h>
void *calloc(size_t num, size_t size) {
	return GlobalAlloc(GMEM_FIXED|GMEM_ZEROINIT,num*size);
//fix #3 - free

void free(void *data) { 
//fix #4 - ftol 

int _ftol(float x) {
	int y;
	__asm {
		fld DWORD PTR x
		fistp DWORD PTR y
	return y;
And the one last thing I cant figure out is what "error LNK2001: unresolved external symbol __CIpow" is supposed to do. (Is this just supposed to be a normal power function? - (Ive tried this) ) Also, does someone know of a freely available implementation of the standard libraries (so I can use printf & fopen etc..) ? Thanks! EDIT: Also, does anyone know how to implement the functionality of __chkesp ? (I know you can disable /GZ, but that always makes the program crash) [edited by - aboeing on August 10, 2003 12:51:00 PM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!